PayPal gateway has rejected request. Item amount is invalid (#10630: Item amount is invalid) - paypal

When i generate invoice selecting option "online capture" option from magento admin then i am getting error please read below:
"PayPal gateway has rejected request. Item amount is invalid (#10630: Item amount is invalid)."
Order detail is
Subtotal = $349.00
You Redeemed(0 Reward points ($0.00))= $0.00
Grand Total = $349.00
Please help me, Having this issue since many days.

Related

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.

PayPal amount_x in IPN?

What's variable name for amount_x (item price) that is submited back from PayPals IPN?
Im searching everywhere but cant find the name of this item price variable in IPN?!
I can get it like:
$_POST['mc_gross_'.$i] / $_POST['quantity'.$i]
But I'm not sure because of rounding, etc.
$_POST['mc_gross'] is the total amount for the payment. Are you wanting individual item prices?

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?

Paypal IPN using PHP to get customized Quantity and Amount

I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).

PayPal (ExpressCheckoutAPI) Shipping Tax

Okay, so I've searched, and asked on the PayPal forum but no one will respond. My problem is as follows. When specifiying the Shipping Cost in the PaymentDetails sent to paypal, PayPal will not accept the Tax on this in the Tax and Order totals.
For example:
Item Cost = £1
Item Tax = £0.20
Shipping Cost = £1
Shipping Tax = £0.20
I would send these values:
PaymentDetailsType paymentDetails = new PaymentDetailsType()
{
ItemTotal = ItemCost
ShippingTotal = ShippingCost,
TaxTotal = ItemTax + ShippingTax,
OrderTotal = ItemCost + ShippingCost + ItemTax + ShippingTax,
};
However, PayPal will say the item totals dont match.. This is because it will not accept ShippingTax to be added?
Has anyone got a work around for this? I need to show customers what portion of their shipping is cost, and what the total vat is on the paypal page? Not sending the shipping tax in TaxTotal and OrderTotal gets round the error, but then the tax is not shown or charged!
Getting desperate on this issue... please lend a hand if you use PayPal express checkout.
In the end, PayPal responded and said they do not support this scenario of charging tax on shipping. Very poor for an international payment provider.
I have changed my code to now put through an item of Web Order with the total, and the vat on this.
I will be changing PayPal out for something else better as soon as possible.