Alex
Alex

Reputation: 1060

PayPal SetExpressCheckout flat-rate shipping methods incorrect tax

I am including multiple shipping methods in DoExpressCheckoutPayment so the customer can choose the shipping method inside PayPal. Including these inside the call works:

 L_SHIPPINGOPTIONISDEFAULT0 => true
 L_SHIPPINGOPTIONNAME0 => 'Shipping option 1'
 L_SHIPPINGOPTIONAMOUNT0 => 5.00
 L_SHIPPINGOPTIONISDEFAULT1 => false
 L_SHIPPINGOPTIONNAME1 => 'Shipping option 2'
 L_SHIPPINGOPTIONAMOUNT1 => 10.00

The problem is the tax within PayPal is not readjusted accordingly when the shipping method is changed, it always uses the tax from PAYMENTREQUEST_0_TAXAMT. I have tried things such as L_TAXAMT0/L_TAXAMT1 like how the tax override works in the instant update API and PAYMENTREQUEST_0_TAXAMT/PAYMENTREQUEST_1_TAXAMT but nothing works. Which extra fields do I need to include with the shipping methods for the correct tax?

Upvotes: 0

Views: 135

Answers (1)

Pavel Kenarov
Pavel Kenarov

Reputation: 964

I think the problem comes that the parameter L_PAYMENTREQUEST_n_TAXAMTm is not setted. From paypal site:

(Optional) Item sales tax. You can specify up to 10 payments, where n is a digit between 0 and 9, inclusive, and m specifies the list item within the payment; except for digital goods, which only supports single payments. These parameters must be ordered sequentially beginning with 0 (for example L_PAYMENTREQUEST_n_TAXAMT0, L_PAYMENTREQUEST_n_TAXAMT1).

Character length and limitations: Value is typically a positive number which cannot exceed 10,000.00 USD or the per transaction limit for the currency. It includes no currency symbol. Most currencies require two decimal places; the decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Some currencies do not allow decimals. See the currency codes page for details.

Try to set it also in the SetExpressCheckout method

Upvotes: 0

Related Questions