From 70da150599ccebd7e682854b602d4b632424b407 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 23 Oct 2021 16:08:47 -0600 Subject: [PATCH] bugfix: add missing subscription properties --- paypal-checkout.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paypal-checkout.js b/paypal-checkout.js index 8555748..a25d543 100644 --- a/paypal-checkout.js +++ b/paypal-checkout.js @@ -441,6 +441,7 @@ Subscription.payee_preferences = { IMMEDIATE_PAYMENT_REQUIRED: "IMMEDIATE_PAYMENT_REQUIRED", }; +// See https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_create Subscription.createRequest = async function _createSubscription({ request_id, plan_id, @@ -449,6 +450,8 @@ Subscription.createRequest = async function _createSubscription({ shipping_amount, subscriber, application_context, + custom_id, + plan, }) { return await PayPal.request({ method: "POST", @@ -496,6 +499,8 @@ Subscription.createRequest = async function _createSubscription({ } */ application_context: application_context, + custom_id: custom_id, + plan: plan, }, }) .then(must201or200)