Payments are left as "pending" when they go through to Paypal, otherwise all working fine. Can someone help me please with the error which doesnt mean anything to me, i have found a few similar issues while googling but nothing that has solved it so far. IPN is enabled in Paypal account.
I have removed correct emails and personal details from the below error.
2019-02-18 11:34:48 ERROR IPN notification with invalid amount or currency or email: Array
(
[paypal_data] => Array
(
[mc_gross] => 14.43
[invoice] => KGCG05
[protection_eligibility] => Eligible
[address_status] => confirmed
[payer_id] => Z4EAXV7YPYFZ6
[address_street] => Address here
[payment_date] => 03:34:40 Feb 18, 2019 PST
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => EXPOSTCODE
[first_name] => Richard
[mc_fee] => 0.69
[address_country_code] => GB
[address_name] => Name Here
[notify_version] => 3.9
[custom] => b5c8693144ebb3fbb895bec5f151a320
[payer_status] => verified
[business] => email@addresshere.co.uk
[address_country] => United Kingdom
[address_city] => Town Here
[quantity] => 1
[verify_sign] => AilRlM2K-12r5vHGroVpSbu42v8xAq-cszjoC2256qg-3Wp2MAOimKz4
[payer_email] => address@ishere.co.uk
[txn_id] => 5LU82109PA506024V
[payment_type] => instant
[last_name] => Hughes
[address_state] => EN
[receiver_email] => email@ishere.co.uk
[payment_fee] =>
[shipping_discount] => 0.00
[insurance_amount] => 0.00
[receiver_id] => B6QUHPLLQLNM8
[txn_type] => web_accept
[item_name] => Order Number: KGCG05
[discount] => 0.00
[mc_currency] => GBP
[item_number] =>
[residence_country] => GB
[shipping_method] => Default
[transaction_subject] =>
[payment_gross] =>
[shipping] => 3.99
[ipn_track_id] => 83f499fc44b26
)
[payment_order_total] => 10.44000
[currency_code_3] => GBP
[testing Total-mc-gross] => -3.99
[testing Compare] => 0.01443
[testing Result] => 1
)
Many thanks
no idea why but the payment is
[mc_gross] => 14.43
but the returned tested result is
[payment_order_total] => 10.44000
[currency_code_3] => GBP
[testing Total-mc-gross] => -3.99
as it says - 3.99 short (10.44 + 3.99 = 14.43)
why?
shipping is => [shipping] => 3.99 - is that a clue?
these figures are tested in plugins\vmpayment\paypal\paypal\helpers\paypal.php
by
"paypal_data" => $paypal_data,
'payment_order_total' => $payments[0]->payment_order_total,
'currency_code_3' => $this->currency_code_3,
'testing Total-mc-gross' => ($payments[0]->payment_order_total - $paypal_data['mc_gross']),
'testing Compare' => ($paypal_data['mc_gross'] * 0.001),
'testing Result' =>(int) (abs($payments[0]->payment_order_total - $paypal_data['mc_gross'] < abs($paypal_data['mc_gross'] * 0.001)) )
Thanks for having a look.
The first level of postage (done by weight) is set as £4.45 with no tax rule applied so im not sure where it gets the 3.99 from at all.
Do you have any suggestions about what might be best to do next please?
sorry .. none at all except check check and double check
only u know your settings in VM and Paypal - 99.9% of users have no problems so it is something in your setup
the amount that is supposedly to be charged doesn't match what Paypal sends back that it charged .. so of course the order cannot go to confirmed
Again thanks for reply.
Still not found the issue but...
It works fine in Sandbox mode - does that mean the issue is at Paypal account end?
For some reason it is charging an extra 3.99 when it gets to the first paypal screen (see screenshot)
where the hell is that 3.99 coming from!!? I have deleted and remade the shipping and payment plugins - at a bit of a loss now
Figured it out!
Doh!
The Paypal account had a previous load of postage settings 3.99 etc from the previous website that i had nothing to do with. Once i removed that it all worked fine. It was testing it in the sandbox and seeing it was working that kicked me in the backside!!
Hope this helps someone else as daft as me :-)
Thanks for your help GJC !!
hello, we are experiencing same issue "ERROR IPN notification with invalid amount or currency or email: Array" but with a different setup:
1. we are using "shopping cart" mode in paypal, so it sends items
when investigating this problem, the IPN is:
[paypal_data] => Array
(
[mc_gross] => 354.85
[invoice] => 0070974
[protection_eligibility] => Eligible
[address_status] => confirmed
[item_number1] => {REMOVED}
[item_number2] => {REMOVED}
[payer_id] => {REMOVED}
[address_street] => 15 {REMOVED}
[payment_date] => 08:19:20 Feb 05, 2021 PST
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => 25300
[mc_handling] => 76.85
[first_name] => {REMOVED}
[mc_fee] => 14.90
[address_country_code] => FR
[address_name] => {REMOVED}
[notify_version] => 3.9
[custom] => {REMOVED}
[payer_status] => verified
[business] => {REMOVED}
[address_country] => France
[num_cart_items] => 2
[address_city] => {REMOVED}
[verify_sign] => {REMOVED}
[payer_email] => {REMOVED}
[txn_id] => 59660466BP287111S
[payment_type] => instant
[last_name] => {REMOVED}
[address_state] =>
[item_name1] => {REMOVED - PRODUCT1}
[receiver_email] => {REMOVED}
[item_name2] => {REMOVED - PRODUCT2}
[payment_fee] =>
[shipping_discount] => 0.00
[quantity1] => 1
[insurance_amount] => 0.00
[quantity2] => 1
[receiver_id] => {REMOVED}
[txn_type] => cart
[discount] => 0.00
[mc_gross_1] => 0.00
[mc_currency] => EUR
[mc_gross_2] => 278.00
[residence_country] => CH
[shipping_method] => Default
[transaction_subject] =>
[payment_gross] =>
[ipn_track_id] => 3dd9c78b9e6c1
)
[payment_order_total] => 384.85000
[currency_code_3] => EUR
[testing Total-mc-gross] => 30
[testing Compare] => 0.35485
[testing Result] => 0
)
and the problem here is that
[mc_gross_1] => 0.00
and
[mc_gross_2] => 278.00
while mc_gross_2 of 278 is price of PRODUCT1
so it seems that the problem is caused by missing prices of PRODUCT2 as the sent items were shifted.
this only happens on a very few orders out of thousands and we cannot reproduce this yet. it just happens in 1 to a few hundred cases.
best regards, stan