Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe's fast_automatic_capture_beta API changes #74

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeafHacker
Copy link
Contributor

Stripe are asking for feedback on their fast_automatic_capture_beta. This commit attempts to update our code to support the new API.

This PR is untested.

Stripe are asking for feedback on their fast_automatic_capture_beta. This commit attempts to update our code to support the new API.
return c.String(http.StatusUnprocessableEntity, "Cannot handle a charge that has been refunded")
}
if charge.TransferGroup != "" {
return c.String(http.StatusUnprocessableEntity, "Cannot handle a charge that has already been distributed")
Copy link
Contributor Author

@LeafHacker LeafHacker Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this reliable? This check assumes that calling transfer.New() with SourceTransaction set to the charge's ID will update the charge's transfer group.

This is intended as a way to check if our DistributeDonation func has already been run against this charge, since we don't want to run it twice for a given charge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant