News:

Looking for documentation? Take a look on our wiki

Main Menu

Problems with PayPal in Version 2.0.26

Started by ZaubernLernen, December 16, 2013, 14:07:36 PM

Previous topic - Next topic

microtribe

I only have one address entered in Paypal settings. Using 2.0.26a and has worked fine with Paypal. Haven't changed anything. But getting this error on an order in which the customer entered / as their street address. Could that also generate this error?

By the way, I don't have paypal.1.log.php in my root logs file, and I have verified that the logs folder is in the same location set in the admin config. Any other ideas where it could be?


Jazajay

Virtuemart: 2.0.26d
Joomla: 2.5.18

Hi All
I am experiencing the same problem and can't find any lines of code outlined in this thread to change.

My email is all lowercase - we only have 1 of those in Paypal and it is correct in Virtuemat; but, I have noticed that on this order that the:

ERROR IPN notification with invalid amount or currency or email: Array

[payment_order_total] => 37.70000
[currency_code_3] => GBP

and the:

[mc_gross] => 37.72

It is also out for another one - that had the same issue - by 2p.

ERROR IPN notification with invalid amount or currency or email: Array

[mc_gross] => 219.68

[payment_order_total] => 219.66000
    [currency_code_3] => GBP


I am assuming that that is potentially causing the issue?

What setting could cause the 2 to be out by mere pence?

Tax calculation as we do add tax to our shipping???

Any help would be seriously appreciated.

Jaz

jjk

Quote from: microtribe on February 09, 2014, 18:28:53 PM
By the way, I don't have paypal.1.log.php in my root logs file, and I have verified that the logs folder is in the same location set in the admin config. Any other ideas where it could be?

The file is generated only if you enabled 'Debug' and 'Log debug in file' in the VM-PayPal configuration and somebody uses or tries to use PayPal for payment in your shop.
It probably also works when using the PayPal sandbox for testing.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

consolecustoms

I have the same problem as Jazajay when the order contains Tax, the information is not being sent to paypal properly. I will be looking to see if I can find out where but if alatak can chime in I am sure it will be found faster.

No only are the amounts wrong the buyer gets charged tax twice!! this is very bad.

Example order log, some information removed. I made this order myself since my own address would create a Tax situation.

Real order total is $2.90 but In paypal was charged $2.93 Tax was $0.03 as you can see so paypal took order total from virtuemart and added tax on top of it but the order total already included the tax. So when paypal passed back the total of $2.93 it failed and created the error message because totals do not match.

Please help to fix asap.



2014-02-13 20:46:50 ERROR IPN notification with invalid amount or currency or email: Array
(
    [paypal_data] => Array
        (
            [mc_gross_1] => 0.55
            [mc_handling1] => 0.00
            [num_cart_items] => 1
            [payer_id] => 44UXMPXPS2MUW
            [address_country_code] => US
            [ipn_track_id] => 762176ba62ba
            [address_zip] => 29369
            [invoice] => 20119
            [charset] => windows-1252
            [payment_gross] => 2.93
            [address_status] => confirmed
            [address_street] =>
            [receipt_id] =>
            [verify_sign] =>
            [tax1] => 0.00
            [mc_shipping] => 0.00
            [txn_type] => cart
            [receiver_id] =>
            [payment_fee] => 0.36
            [item_number1] => 0805-Y
            [mc_currency] => USD
            [transaction_subject] =>
            [custom] =>
            [protection_eligibility] => Eligible
            [quantity1] => 1
            [address_country] => United States
            [payer_status] => unverified
            [first_name] => Christopher
            [item_name1] => 0805 Surface Mount LED Yellow
            [address_name] => Christopher Schultz
            [mc_gross] => 2.93
            [mc_shipping1] => 0.00
            [payment_date] => 12:25:35 Feb 13, 2014 PST
            [payment_status] => Completed
            [business] => consolecustoms@yahoo.com
            [mc_handling] => 2.35
            [last_name] => Schultz
            [address_state] => SC
            [txn_id] =>
            [mc_fee] => 0.36
            [resend] => true
            [payment_type] => instant
            [notify_version] => 3.7
            [payer_email] => chris@consolecustoms.com
            [receiver_email] => consolecustoms@yahoo.com
            [address_city] => Moore
            [tax] => 0.03
            [residence_country] => US
        )

    [payment_order_total] => 2.90000
    [currency_code_3] => USD
)
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

consolecustoms

Additional information, the tax looks to be getting added to the shipping amount. See attached pictures of order from virtuemart backend shipping is $2.32 (this is the correct amount), second picture of paypal transaction shipping is $2.35.  Actually this shows up as "handling" this is probably minor but would be nice if correct field was used when passing info to paypal.

[attachment cleanup by admin]
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

jus2sho

#65
I'm currently testing my checkout system with the Paypal sandbox.  I'm having an issue with the customer's selected state and Paypal recognizing the actual state.  For instance, the customer enters their address and selects "OHIO" from the VM dropdown list.  When they confirm their order on my site and they're forwarded to Paypal to complete their payment, Paypal suggest that the customer's address be changed to "OH" instead of "OHIO".  I'm sure I'm not the only one to have this issue.  I've tried doing a quick search, but maybe I'm not searching with the correct keywords.  Thanks in advance for any advice.

Edit: Finally found the solution.

http://forum.virtuemart.net/index.php?topic=115604.0
Joomla 2.5.9
VM 2.0.26d

consolecustoms

Quote from: consolecustoms on February 13, 2014, 22:08:28 PM
I have the same problem as Jazajay when the order contains Tax, the information is not being sent to paypal properly. I will be looking to see if I can find out where but if alatak can chime in I am sure it will be found faster.

No only are the amounts wrong the buyer gets charged tax twice!! this is very bad.

Example order log, some information removed. I made this order myself since my own address would create a Tax situation.

Real order total is $2.90 but In paypal was charged $2.93 Tax was $0.03 as you can see so paypal took order total from virtuemart and added tax on top of it but the order total already included the tax. So when paypal passed back the total of $2.93 it failed and created the error message because totals do not match.

Please help to fix asap.



2014-02-13 20:46:50 ERROR IPN notification with invalid amount or currency or email: Array
(
    [paypal_data] => Array
        (
            [mc_gross_1] => 0.55
            [mc_handling1] => 0.00
            [num_cart_items] => 1
            [payer_id] => 44UXMPXPS2MUW
            [address_country_code] => US
            [ipn_track_id] => 762176ba62ba
            [address_zip] => 29369
            [invoice] => 20119
            [charset] => windows-1252
            [payment_gross] => 2.93
            [address_status] => confirmed
            [address_street] =>
            [receipt_id] =>
            [verify_sign] =>
            [tax1] => 0.00
            [mc_shipping] => 0.00
            [txn_type] => cart
            [receiver_id] =>
            [payment_fee] => 0.36
            [item_number1] => 0805-Y
            [mc_currency] => USD
            [transaction_subject] =>
            [custom] =>
            [protection_eligibility] => Eligible
            [quantity1] => 1
            [address_country] => United States
            [payer_status] => unverified
            [first_name] => Christopher
            [item_name1] => 0805 Surface Mount LED Yellow
            [address_name] => Christopher Schultz
            [mc_gross] => 2.93
            [mc_shipping1] => 0.00
            [payment_date] => 12:25:35 Feb 13, 2014 PST
            [payment_status] => Completed
            [business] => consolecustoms@yahoo.com
            [mc_handling] => 2.35
            [last_name] => Schultz
            [address_state] => SC
            [txn_id] =>
            [mc_fee] => 0.36
            [resend] => true
            [payment_type] => instant
            [notify_version] => 3.7
            [payer_email] => chris@consolecustoms.com
            [receiver_email] => consolecustoms@yahoo.com
            [address_city] => Moore
            [tax] => 0.03
            [residence_country] => US
        )

    [payment_order_total] => 2.90000
    [currency_code_3] => USD
)



figured this out on my own and hopefull will solve others problems as well.

In /plugins/vmpayment/paypal/paypal/helpers/paypalstd.php - Tax not being sent correctly to Paypal it is being added to Handling and also being sent seperately as per item tax. Changed lines below. the function getHandlingAmount() is actually getting the tax amount not handling and then being added to the shipping/handling. I Changed this so it is sending the tax as the tax total to paypal and not adding it the handling.
Also changed the varialbe being sent for shipping, it was sending it as handling "handling_cart" changed this to "shipping_1" so it shows as shipping in paypal. This does not have to be changed but this way it shows the shipping as "shipping fees" in paypal transaction details instead of "handling fees"

$post_variables["handling_cart"] = $this->getHandlingAmount();
$post_variables["handling_cart"] += vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceShipment'], $this->_method->payment_currency);


to

// Function get handlingamount actually gets tax amount
$post_variables["tax_cart"] = $this->getHandlingAmount();
// changed from "handing_cart" to "shipping_1" so shipping shows up as shipping in paypal instead of handling.
$post_variables["shipping_1"] = vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceShipment'], $this->_method->payment_currency);
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

Jazajay

Hi consolecustoms
Aww brilliant. Have you tested this?

consolecustoms

Quote from: Jazajay on February 18, 2014, 21:46:54 PM
Hi consolecustoms
Aww brilliant. Have you tested this?

Yes, I have tested and this worked for me. For you it may be different if you actually charge tax on shipping but I think it should still work for you.
You will already see a difference just by starting a paypal checkout (you do not need to complete it). Checkout from your site with paypal and when transferred to paypal you will see before the changes there is not a separate tax line and the shipping and tax are combined into the "shipping/handling" line.
After this change when you get to this point in the checkout there will be a separate "tax" line and the "shipping/handling" line will display only the shipping cost.

I did complete a full paypal checkout with a real account as well just to be sure everything was OK and everything was correct in all locations and I did not receive the Error message as in the past.

I hope it works for you too.
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

rfperez

I recently upgraded to 2.0.26d and started getting the "ERROR IPN notification: wrong merchant_email" errors. I removed the secondary email address from the PayPal account  and the "ERROR IPN notification: wrong merchant_email" problem is still present.
As I understand it the error is generated from the following code contained in the plugin at /plugins/vmpayment/paypal/paypal/helpers/paypal.php :
if (strcasecmp($paypal_data['receiver_email'],$this->merchant_email)!=0 ) {

The values of the [receiver_email] and the [merchant_email] from the log file are as follows:
    [receiver_email] => storeadmin@MYDOMAIN.com
    [merchant_email] =>  storeadmin@MYDOMAIN.com

The actual domain name were replaced by MYDOMAIN for privacy but otherwise characters are exactly as contained in the Log file.

The two values look identical, could it be possible that there is a hidden or blank character at the beginning of the merchant_email?
Did I miss a solution to this issue in the forum?

Jazajay

Hi rfperez
Do you add tax to your shipping?
If so I believe that is causing my issue - which give me the same problem. No fix for this yet - you have to manually confirm all affected orders otherwise the user wont get any notification.

Waiting on the next system fix - to hopefully resolve this.

Jaz

rfperez

We are a non-profit organization and do not charge tax, or charge shipping either.

ozzz

#72
Hi there,

I have the same issue, order status stays pending even when a payment is succesful. This error is also in 2.6.8, perhaps because my website's email is not added in my PayPal account? I prefer not to; is this possible? Or is it required to have the website email in my paypal account?

Hope someone can help me.. Thanks!

carsten888


jjk

Quote from: carsten888 on October 14, 2014, 17:57:41 PM
problem is still in VirtueMart 2.6.10
Which one of the (different) problems described above?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations