PayPal SetExpressCheckout flat-rate shipping methods incorrect tax - paypal

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?

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

Related

Having a paypal calculating VAT issue?

I am developing a simple shopping cart with paypal checkout, but i am stuck with the VAT processing part on paypal's side.
Paypal seems to add up total +VAT+ shipping. But when i substract the VAT from the $grandtotal variable in my shopping cart i get the error message:
The totals of the cart item amounts do not match order amounts.
I am using Paypal's SetExpressCheckout.
My questions:
1/ for parameter PAYMENTREQUEST_0_AMT should i use the total with or without the VAT
2/ should i use parameter PAYMENTREQUEST_0_TAXAMT? if so how do i prevent paypal from adding it up
regards
Please see the following extracts from the PayPal site :
PAYMENTREQUEST_n_AMT - (Required) Total cost of the transaction to the
buyer. If shipping cost and tax charges are known, include them in
this value. If not, this value should be the current sub-total of the
order. If the transaction includes one or more one-time purchases,
this field must be equal to the sum of the purchases. Set this field
to 0 if the transaction does not include a one-time purchase such as
when you set up a billing agreement for a recurring payment that is
not immediately charged. When the field is set to 0, purchase-specific
fields are ignored.
PAYMENTREQUEST_n_ITEMAMT - Sum of cost of all items in this order. For digital goods, this field is required. You can specify up to 10
payments, where n is a digit between 0 and 9, inclusive; except for
digital goods, which supports single payments only.
PAYMENTREQUEST_n_TAXAMT - (Optional) Sum of tax for all items in this order. You can specify up to 10 payments, where n is a digit
between 0 and 9, inclusive; except for digital goods, which supports
single payments only.
AMT = item amt + tax amt + shipping amt + handle amt - discount.
So if your item amt already includes tax, then don't use tax amt, otherwise, make sure item amt doesn't include tax and put tax in tax amt.

I'm using Express Checkout in Paypal and trying to pass discount of cart total

I have passed the following request (full discount on an item, but required to pay shipping):
$nvstr = "
&L_PAYMENTREQUEST_0_NAME0=IOB+Joining+Package+Fee
&L_PAYMENTREQUEST_0_QTY0=3
&L_PAYMENTREQUEST_0_AMT0=.1
&L_PAYMENTREQUEST_0_NAME1=Discount
&L_PAYMENTREQUEST_0_QTY1=1
&L_PAYMENTREQUEST_0_AMT1=-.1
&PAYMENTREQUEST_0_ITEMAMT=0.2
&PAYMENTREQUEST_0_TAXAMT=0
&PAYMENTREQUEST_0_SHIPDISCAMT=0
&MAXAMT=0
&PAYMENTREQUEST_0_SHIPPINGAMT=0.3
&PAYMENTREQUEST_0_HANDLINGAMT=0
&PAYMENTREQUEST_0_AMT=0.5
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&CUSTOM=.1
&SOLUTIONTYPE=Sole";
after payment I see that the discount price is multiplied by quantity.
That's intended. Express checkout supports Discount by Passing negative amount in the line item. It works as other line items and it will be multiplied by quantity.
You could change your quantity to adjust with your discount amount.

can't pay with undefined currency in facebook Local Currency Payments

my app product defined USD,and not defined GBP.when I use GBP to pay, the pay dialog return
the error that Sorry, there was a problem and we can’t complete your request. Please try again later.
I'm confusion about that,the facebook offical doucument show that If you do not define a price point for a particular local currency, users of that currency will have their price automatically calculated based upon the current exchange rate between the first currency you specify and that target currency.
Can anyone help me?
Could it be that you were trying 0.01 USD? that converts to less than 0.01 GBP
Defining a single unit of in-game currency that has a product:price:amount less than 0.01. For example, selling 1,000 Coins for USD 1.00 would require a unit price of 0.001, which is not supported.
https://developers.facebook.com/docs/howtos/payments/definingproducts/#pricing_static

Recurring payments: how to specify an initial payment TAX value different than the subsequent cycles?

If I do a request with the INITAMT equal to the recurring payment amount, it works.
But if I try to bill a different INITAMT (and so different TAX), I get this error:
Tax calculation mismatch. The tax amount for the regular non-trial billing period is different than the sum of the tax for each item in the cart.
My actual request:
I have an initial payment of 4.84€ including 0.84€ of VAT tax.
The next month the amount to bill should be 25.09€ (including 6.09€ VAT).
The request I send is basically this:
Method: CreateRecurringPaymentsProfile
"CURRENCYCODE":"EUR",
"INITAMT":4.84,
"TAXAMT":0.84,
"DESC":"Subscription",
"BILLINGPERIOD":"Month",
"BILLINGFREQUENCY":1,
"AMT":29,
"L_PAYMENTREQUEST_0_ITEMCATEGORY0":"Digital",
"L_PAYMENTREQUEST_0_NAME0":"Subscription",
"L_PAYMENTREQUEST_0_AMT0":29,
"L_PAYMENTREQUEST_0_TAXAMT0":6.09,
"L_PAYMENTREQUEST_0_QTY0":1
"PROFILEREFERENCE":"51a1f8f4732baf580a000031",
"PAYMENTREQUEST_0_INVNUM":"51a1f8f4732baf580a000031",
"INVNUM":"51a1f8f4732baf580a000031",
"PROFILESTARTDATE":"2013-06-26T11:59:12+0000",
And the response:
"TIMESTAMP":"2013-05-27T10:55:46Z",
"CORRELATIONID":"969d07e2cef8a",
"ACK":"Failure",
"VERSION":"74",
"BUILD":"5908853",
"L_ERRORCODE0":"10004",
"L_SHORTMESSAGE0":"Tax calculation mismatch.",
"L_LONGMESSAGE0":"Tax calculation mismatch. The tax amount for the regular non-trial billing period is different than the sum of the tax for each item in the cart.",
"L_SEVERITYCODE0":"Error"
I'd like to do this with the INITAMT value, so that the user can see the two purchases as correlated in the Paypal private area (ie: a subscription with an inital payment).
Otherwise I'll have to do a separate DoExpressCheckout for the initial payment.
What's happening is that you cannot (I believe) set a tax amount for the Initial Amount.
The TAXAMT is for the recurring payment, not the Initial Amount.
Your statement is saying "Billing 29€ with a tax of 0.84€".
However your item list says the tax should be 6.09€
Change your TAXAMT to 6.09€ and it should be fine.

Pass variable cart total to PayPal for Subscription (using Enhanced Recurring Payments w. Website Payments Standard)

Summary: Trying to pass along a variable Monthly Subscription cost to PayPal based on user-selected options on a form I created. Working within Website Payments Standard with Enhanced Recurring Payment option, is this possible?
Details:
User visits "shop" page, which is a form with 4 line items, each line item consisting of 2-7 options, each option with an associated price.
For example, line item 1 is "size of business" with the options being:
a) 1-3 employees - $10
b) 4+ employees - $12.50
User goes through the list and chooses 1 option for each line item and some javascript calculates the total due on the fly.
Is it possible to pass this total to PayPal, not as a one-time cost, rather as the base cost for a monthly subscription?
Yes. Just change the value you're passing for a3, rather than amount.
Is there a problem you're running into?