I'm using the new version of paypal Checkout Express API to impliment the parallel payment,
When i send the request I got an error:
The totals of the cart item amounts do not match order amounts.
This is the request and response from api debug:
INFO: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ebay:api:PayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes"><soapenv:Header><urn:RequesterCredentials><ebl:Credentials><ebl:Username>sdk-three_api1.sdk.com</ebl:Username><ebl:Password>QFZCWN5HZM8VBG7Q</ebl:Password><ebl:Signature>A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU</ebl:Signature></ebl:Credentials></urn:RequesterCredentials></soapenv:Header><soapenv:Body><urn:SetExpressCheckoutReq><urn:SetExpressCheckoutRequest><ebl:Version>92.0</ebl:Version><ebl:SetExpressCheckoutRequestDetails><ebl:ReturnURL>http://localhost:8080/EC/GetExpressCheckout?currencyCodeType=null</ebl:ReturnURL><ebl:CancelURL>http://localhost:8080/index.html</ebl:CancelURL><ebl:NoShipping>0</ebl:NoShipping><ebl:PaymentDetails><ebl:OrderTotal currencyID="USD">10.00</ebl:OrderTotal><ebl:ItemTotal currencyID="USD">10.0</ebl:ItemTotal><ebl:PaymentDetailsItem><ebl:Quantity>1</ebl:Quantity><ebl:Amount currencyID="USD">10.0</ebl:Amount></ebl:PaymentDetailsItem><ebl:PaymentDetailsItem><ebl:Quantity>1</ebl:Quantity><ebl:Amount currencyID="USD">10.0</ebl:Amount></ebl:PaymentDetailsItem><ebl:SellerDetails><ebl:PayPalAccountID>tarik._1341024461_biz#gmail.com</ebl:PayPalAccountID></ebl:SellerDetails><ebl:PaymentAction>Sale</ebl:PaymentAction><ebl:PaymentRequestID>1</ebl:PaymentRequestID></ebl:PaymentDetails><ebl:PaymentDetails><ebl:OrderTotal currencyID="USD">10.00</ebl:OrderTotal><ebl:ItemTotal currencyID="USD">10.0</ebl:ItemTotal><ebl:PaymentDetailsItem><ebl:Quantity>1</ebl:Quantity><ebl:Amount currencyID="USD">10.0</ebl:Amount></ebl:PaymentDetailsItem><ebl:PaymentDetailsItem><ebl:Quantity>1</ebl:Quantity><ebl:Amount currencyID="USD">10.0</ebl:Amount></ebl:PaymentDetailsItem><ebl:SellerDetails><ebl:PayPalAccountID> tarik._1341024461_biz#gmail.com</ebl:PayPalAccountID></ebl:SellerDetails><ebl:PaymentAction>Sale</ebl:PaymentAction><ebl:PaymentRequestID>2</ebl:PaymentRequestID></ebl:PaymentDetails></ebl:SetExpressCheckoutRequestDetails></urn:SetExpressCheckoutRequest></urn:SetExpressCheckoutReq></soapenv:Body></soapenv:Envelope>
9 août 2012 01:01:34 com.paypal.core.LoggingManager log
INFO: 2012-08-08T23:01:33ZFailure222642713a617Transaction refused because of an invalid argument. See additional error messages for details.The totals of the cart item amounts do not match order amounts.10413Error92.03386080
The problem is what it says:
The totals of the cart item amounts do not match order amounts.#
Make sure you are sending the same amount of items from the cart to match the order amount.
Related
For a Magento order, after the order has been placed and a Payflow payment has been authorized, I want to be able to add a charge to the order. I could capture a different amount from the one authorized but this brings in the limitation issue because for Paypal amount captured can only be 15% above/below the amount authorized. In order to overcome this issue, I want to allow the user to be able to pay separately for the remaining charge. However, when the user tries to pay for the rest using the Payflow credit card again, a full invoice is created which results in the cancellation of the current order and creation of new order with order id xxx-1.
What I want is to have multiple invoices for the same order and I believe this can be done usig partial invoices like so:
if($order->canInvoice()) {
$invoiceId = Mage::getModel('sales/order_invoice_api')
->create($order->getIncrementId(), $itemsarray ,'your_comment' ,1,1);
}
But how do I create a partial invoice for a given price that is not related to any items?
how do I create a partial invoice for a given price that is not related to any items?
Specify your own new $itemsarray replacement, that contains a single line item that describes the charge for a given price
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.
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.
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.
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?