bugfix: add missing subscription properties

This commit is contained in:
AJ ONeal 2021-10-23 16:08:47 -06:00
parent 3d18aa00de
commit 70da150599
1 changed files with 5 additions and 0 deletions

View File

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