Skip to content

Conversation

@bdugan14
Copy link

  • Adds support for "createBillingAgreement", for creating a Billing Agreement - a legacy PayPal flow that creates an agreement for recurring payments for goods or services (docs)

  • This callback is supported in paypal-js

  • This is an alternative use for the button - the createBillingAgreement callback is called on button click, instead of one of the createOrder callbacks.

Happy to add more details if needed :)

export type PaypalLandingPage = "LOGIN" | "BILLING";

export type OrderIntent = "CAPTURE" | "AUTHORIZE" | "subscription";
export type OrderIntent = "CAPTURE" | "AUTHORIZE" | "subscription" | "tokenize";
Copy link
Author

Choose a reason for hiding this comment

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

We use intent: "tokenize" with createBillingAgreement - here's paypal's docs

I didn't add any validation in this PR - the PayPal SDK will complain if we don't pass intent=tokenize and vault=true with createBillingAgreement, though

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