News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[Urgent] Paypal IPN not working after going live

Started by Cameleon, April 12, 2017, 10:32:10 AM

Previous topic - Next topic

Cameleon

Version : VirtueMart 3.0.18
Payment : Paypal standard

Good morning,

We currently have a problem with paypal's IPN after going live.

Everithing was going fine on sandbox mode, but when we switched to live we now receive these emails :
Hello, An error with your payment method Paypal on your store . The details are logged in the file paypal.3.log.php. The VirtueMart Team

The problem is now the order's status aren't automatically updated by the ipn anymore.

Here is a log :

2017-04-12 03:58:45 DEBUG plgVmConfirmedOrder: order number: 1AGI025667
2017-04-12 03:58:45 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 246.46 paymentcurrency 47 orderusercurrency61
2017-04-12 04:00:02 DEBUG plgVmOnPaymentResponseReceived: stdClass Object
(
    [id] => 235
    [virtuemart_order_id] => 26664
    [order_number] => 1AGI025667
    [virtuemart_paymentmethod_id] => 3
    [payment_name] => <span class="vmpayment_name">Paypal</span>
    [payment_order_total] => 246.46000
    [payment_currency] => 47
    [email_currency] => 47
    [cost_per_transaction] => 0.00
    [cost_percent_total] => 0.00
    [tax_id] => -1
    [paypal_custom] => pmsp0b8no25bm3v23u7m49efu1
    [paypal_method] => 0
    [paypal_response_mc_gross] => 0.00
    [paypal_response_mc_currency] => 0
    [paypal_response_invoice] => 0
    [paypal_response_protection_eligibility] => 0
    [paypal_response_payer_id] => 0
    [paypal_response_tax] => 0.00
    [paypal_response_payment_date] => 0
    [paypal_response_payment_status] => 0
    [paypal_response_pending_reason] => 0
    [paypal_response_mc_fee] => 0.00
    [paypal_response_payer_email] => 0
    [paypal_response_last_name] => 0
    [paypal_response_first_name] => 0
    [paypal_response_business] => 0
    [paypal_response_receiver_email] => 0
    [paypal_response_transaction_subject] => 0
    [paypal_response_residence_country] => 0
    [paypal_response_txn_id] => 0
    [paypal_response_txn_type] => 0
    [paypal_response_parent_txn_id] => 0
    [paypal_response_case_creation_date] => 0
    [paypal_response_case_id] => 0
    [paypal_response_case_type] => 0
    [paypal_response_reason_code] => 0
    [paypalresponse_raw] => 0
    [paypal_fullresponse] => 0
    [created_on] => 2017-04-12 03:58:45
    [created_by] => 8986
    [modified_on] => 2017-04-12 03:58:45
    [modified_by] => 8986
    [locked_on] => 0000-00-00 00:00:00
    [locked_by] => 0
)

Which is strange, since we doesn't have an error in the logs.

Do we have to go in our paypal account to set the ipn url ? : http://www.virtuemartrewardspoints.com/documentation/54-virtuemart-paypal-ipn-order-confirmation
Is yes, which url do we have to use for virtuemart 3 ?

Thanks,

Cam


EDIT :


The function plgVmOnPaymentNotification() is triggered (i inserted an alert in it).

So the notification is sent by Paypal and received by the plugin.

I don't see what is causing the problem.

kishoreonwork


There is no need to setup ipn url in paypal.  It is done by the virtuemart paypal payment plugin.

The problem i see here is the payment currency currency id 47 - refers to EURO and currency id 61 Hong Kong Dollars.
I believe your website is setup in Euro and client made a payment in HongKong dollars.
Please check your list of accepted currency's.

Thanks
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

Cameleon

#2
Hi, thanks for your answer.

The website is in euros, and we allow the Hong Kong dollars (for the currency converter).

In the cart, the prices are displayed in the chosen currency, with a notification of the total in euros.
When sent to paypal, the total is in euros, whatever the currency chosen.

That how it works currently.

After checking the logs, i have the same problem even for the order on the same currency. (47 - 47)

Cameleon

#3
I just saw this post : http://forum.virtuemart.net/index.php?topic=128518.msg442586#msg442586

Since we are using a CDN, could we have a problem with the Headers ?
But it'll be weird since the function plgVmOnPaymentNotification() is triggering.

EDIT : We tried to deactivate it, wasn't working either

kishoreonwork

Are you sure paypal ipn are triggered by paypal ? You must see your server access log to confirm if  paypal server has posted ipn data to notification url.

The most common reason is checkPaypalIps function return wrong ip address of paypal server. You should try to by pass this function and see if it works.

The file is plugins\vmpayment\paypal\paypal\helpers\paypal.php and in function "processIPN" look for
if (!$this->checkPaypalIps($paypal_data)) {
return false;
}


comment this code


/*if (!$this->checkPaypalIps($paypal_data)) {
return false;
}
*/



May be it will help






I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607