Skip to content

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.

2 participants