News:

Looking for documentation? Take a look on our wiki

Main Menu

Paypal IPN Notification

Started by chancehoggan, October 28, 2011, 16:42:50 PM

Previous topic - Next topic

chancehoggan

I get this error and have no idea how to fix it:

Hello abc abc,

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

http://www.website.com/administrator/components/com_virtuemart/notify.php

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.


Thanks,

PayPal

alatak

Hi,

How do you get that?
This IPN URL does not exist in VM2.

chancehoggan

Thats the url that the system is generating - do you know the right url?

alatak

Hi,

Please be more specific.
This URL does not exist in VM2. It is an URL from VM1.
VirtueMart does not generate that URL.

What are you trying to do? Are you tring to test IPN notification via the IPN test tool?

If it is the case, please have a look here:
http://forum.virtuemart.net/index.php?topic=92050.0

chancehoggan

I upgraded a site from vm1 to vm2 and everything works great.

Paypal keep sending the client an error message about notify.php not responding...

I think I need to specify the new url in paypal for VM2

I dont know what this url is?


chancehoggan

I think i got the answer from the link you specified:

index.php?option=com_virtuemart&view=paymentresponse&task=paymentnotification&tmpl=component&pelement=paypal&pm="your order number"

Is this right?


mitchie

#6
Hallo,
I'm testing paypal plugin.

This thread looks like to one opened by milemaker on 21 October and like to one opened by nicole2292 on 20 November.
I'm getting the same result.

I'm working on online site (not local server), with paypal sandbox, joomla 1.7.3, vm 1.9.8RC2M.
Result I'm getting: Paypal accepts the payments, redirect to the merchant site, the site shows the Thank your for your order" message, the order number and the order import, the order status is still "pending", paypal transaction data are correctly saved into database.

I've tested the IPN itself.
I think a possible bug could be here:
message: plgVmOnPaymentNotification return new_statusArray
Please, note that "Array".
This message is generated by [root]/pluins/vmpayment/paypal/paypal.php line #452:
       if (strcmp($paypal_status, 'Completed') == 0) {
$new_status = $params->get('status_success');
    }

and inserted in the log file at line #457
   $this->logInfo('plgVmOnPaymentNotification return new_status' . $new_status, 'message');

Now, I receipt your (alatak) answer to nicole2292:
QuoteQuote

    As I said the return URL is http://www.mydomain.com/index.php?option=com_virtuemart&view=paymentresponse&task=paymentresponsereceived&pelement=paypal&pm=1

This is the retourn URL from paypa, but it is not this URL that will update the order status.
The order status is updated with a server-to-server call notification.

anyway (!) if the same function is used to get the order status on payment success (even via server-to-server), the db update could fails beacause it returns an array.
Maybe this is not the answer, but can you specify the function that is called to update the db?
You could also specify how the db is updated server-to-server. I'm really interested to know this point.

Thank you for your help.

BTW: that array is $new_status[0]=C.

Joseph Kwan

Not sure why the orderstatus is set as multi-select field. Maybe the development team have their reasons. Anyway, try adding this line

            if (is_array($new_status)) $new_status=$new_status[0]; //bugfix by JK

after

      $new_status = $params->get('status_success');
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

alatak

Hi,

I understand that you need a fix now. And probably the fix that you gave is correct.
It is true that i had not much time to check this problem those last days.

Anyway, he problem has been solved and fixed for the next version. I will double check before we actually do the release :)

mitchie

Quote from: alatak on November 25, 2011, 21:49:26 PM
Hi,

I understand that you need a fix now. And probably the fix that you gave is correct.
It is true that i had not much time to check this problem those last days.

Anyway, he problem has been solved and fixed for the next version. I will double check before we actually do the release :)
Great news!
Thank you.

@Joseph Kwan: yes, I "fixed" like your advice but, as you say, I Dunno why the orderstatus is set as multi-select field. So I prefereed to report it as a bug to get an official answer and let the team have a look at it.
Thank you!

alatak

Hi

Quote@Joseph Kwan: yes, I "fixed" like your advice but, as you say, I Dunno why the orderstatus is set as multi-select field. So I prefereed to report it as a bug to get an official answer and let the team have a look at it.
Thank you!

You are completly rigth.

The problem is in the file administrator/components/com_virtuemart/element/vmorderstate.php
replace this line
        return JHTML::_('select.genericlist', $fields, $control_name . '[' . $name . '][]', $class, 'value', 'text', $value, $control_name . $name);

by

        return JHTML::_('select.genericlist', $fields, $control_name . '[' . $name . ']', $class, 'value', 'text', $value, $control_name . $name);





Joseph Kwan

This may cause problems somewhere when it is possible to select more than one order status. But I think you know better than I do whether multiselect order status is possible.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

alatak

Hi,

QuoteThis may cause problems somewhere when it is possible to select more than one order status.
Ofc. But this element is used in to specify what shall be the new status depending of events. I do not want a multiple select.

So the fix is correct.

Joseph Kwan

I understand your point. My concern is whether the vmorderstatus element is used somewhere else. There is no indication that this element is only restricted to usage in paypal payment plugin. It can be used, for example, in the order list page where you can change the orderstatus in bulk. The name of the select field may need to include the square bracket [] to pass back an array.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

alatak

#14
Hi,

QuoteI understand your point. My concern is whether the vmorderstatus element is used somewhere else.
It is an element, to be used by the xml files.
Not the select list used in to update the order status.
And even though, when the order status is updated, it is a single select, and not a multiselect in that case :)

QuoteThere is no indication that this element is only restricted to usage in paypal payment plugin.
vmorderstatus element can be used by all plugins: payment or shipment, custom, or shoppers, ...