Skip to content

Commit

Permalink
Merge pull request #1090 from stripe/remi-add-pi-pmd
Browse files Browse the repository at this point in the history
Add support for `PaymentMethodData` on `PaymentIntent`
  • Loading branch information
remi-stripe authored Jun 15, 2020
2 parents d9fb62c + b269e74 commit 1ef9381
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type PaymentIntentConfirmParams struct {
MandateData *PaymentIntentMandateDataParams `form:"mandate_data"`
OffSession *bool `form:"off_session"`
PaymentMethod *string `form:"payment_method"`
PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"`
PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReceiptEmail *string `form:"receipt_email"`
Expand Down Expand Up @@ -164,6 +165,18 @@ type PaymentIntentMandateDataParams struct {
CustomerAcceptance *PaymentIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
}

// PaymentIntentPaymentMethodDataParams represents the type-specific parameters associated with a
// payment method on payment intent.
type PaymentIntentPaymentMethodDataParams struct {
AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`
BillingDetails *BillingDetailsParams `form:"billing_details"`
Card *PaymentMethodCardParams `form:"card"`
FPX *PaymentMethodFPXParams `form:"fpx"`
Ideal *PaymentMethodIdealParams `form:"ideal"`
SepaDebit *PaymentMethodSepaDebitParams `form:"sepa_debit"`
Type *string `form:"type"`
}

// PaymentIntentPaymentMethodOptionsBancontactParams represents the bancontact-specific options
// applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsBancontactParams struct {
Expand Down Expand Up @@ -222,6 +235,7 @@ type PaymentIntentParams struct {
MandateData *PaymentIntentMandateDataParams `form:"mandate_data"`
OnBehalfOf *string `form:"on_behalf_of"`
PaymentMethod *string `form:"payment_method"`
PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"`
PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReceiptEmail *string `form:"receipt_email"`
Expand Down

0 comments on commit 1ef9381

Please sign in to comment.