Skip to content

Conversation

@imartingraham
Copy link

Currently it's not possible to set the payment action, the tax amount, max amount or the shipping amount without just setting setting the payOptions object explicitly like this:

paypal.payOptions = {
    PAYMENTREQUEST_0_SHIPPINGAMT: 4.99,
    PAYMENTREQUEST_0_PAYMENTACTION: 'Authorization',
    PAYMENTREQUEST_0_TAXAMT: 12.45,
    MAXAMT: 99.00
}

This pull request adds methods for adding those using methods to avoid accidentally overwriting any of the other options set on the payOptions object.

paypal.setShippingAmount(4.99)
    .setPaymentAction('Authorization')
    .setTaxAmount(12.45)
    .setMaxAmount(99.99);

…al, tax amount, shipping amount and max amount
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.

1 participant