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

Add support for "createBillingAgreement" #224

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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 :)

@@ -293,7 +299,7 @@ export type ShippingPreference =

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