News:

Support the VirtueMart project and become a member

Main Menu

Paypal not changing status to confirmed

Started by DarkeEdge, November 25, 2008, 03:15:03 AM

Previous topic - Next topic

MikeUK

For a new user that's a great contribution, thanks. If we get more people like you here I reckon this will get sorted out for those that haven't already much quicker.
Get answers faster:
    [li]
Search forum. You might find answer[/li]
[li]Use existing threads. Keep Q + A consolidated[/li]
[li]Troubleshooting? See http://forum.virtuemart.net/index.php?topic=60033.0[/li]
[li]For admin user manual - http://virtuemart.net/documentation/User_Manual/index.html[/li]
[li]For coding (developer manual) - http://virtuemart.net/documentation/Developer_Manual/index.html[/li][/list]

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info

volksman3

Thanks for the info, worked a treat for me, the big mystery for me is why it started doing it as it was working fine and to my knowledge i had not changed anything but glad it is working fine now. Thanks again
Parachutes are like minds, they only work when they are open!
http://www.akirastudio.co.uk

stinga

G'day all,

One thing I have noticed with paypal that is different to all the other payment processors is that paypal can return you to your joomla site and not have confirmed your transaction.
You can see this because there are 3 return URL's that are set.
Success
Fail
Notify

Normally Success and Fail are the same, probably shouldn't be.

So what can happen is the customer returns to your site, order is still pending because PayPal as not called notify.php yet.

Something worth checking for.

If you have a dedicated Linux host then tcpdump could be your friend
Failing that, hack notify.php and echo some sort of output to a file so you can see what is happening.

You probably need someone to look at your system to work out what is actually going on, be logged on and running some traces.
I took me awhile to get my latest PayPal payament stuff working.
We have three order success status codes.
Build - Build the disk
Ship - Ship the product
Download - Well, you can guess!.

We then move the status on so the customer can see what is happening.

If you want some debugging help with any of this I am quite willing to help out, but you are going to have to let me loose on your system to try it out and see what is happening (Most, if any, would not be happy with that, which is strange since some are willing to pay complete strangers to help out!)
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

kreativeone

Thanks for the ipntest.php! That was very helpful to determine what the PayPal sandbox was sending back.

I was somewhat confused at first so just to clarify for others as well, in the notify.php script, I changed the line starting with "notify_url" to the following:

"notify_url" => SECUREURL ."ipntest.php",

I put the new ipntest.php in my root folder and made it executable.

I changed the ipntest.php slightly to provide a better format for Html email, changing the $body variable from:

$body .= $var.":".$val."/n";

to

$body .= $var.":".$val."<BR>";

Sandbox is working for me so I do get a IPN reponse back to this script followed shortly by the email. This makes it very clear what you get back but I still can't get any status other than pending.
========
Joomla 1.5.14 / VirtueMart 1.1.4

stinga

#49
G'day,

Is the ipntest.php setting the status? It is notify.php that sets the status.
PayPal just sends success or failure (hmm maybe some others) it is up to us to set the VM status.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

kreativeone

It is the notify.php that sets the status. You send the notify URL in your VM extra info on the PayPal configuration screen. I changed the notify URL to the ipntest.php so that I could get the IPN response contents sent to me by email; this test script does not set the status. Changing the URL back to the notify.php ("notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",) works to set the status. I highly recommend adding new status types (e.g. "PayPal_Confirmed", "PayPal_Pending", "PayPal_Cancelled") so that it forces a change in status even if you only get a pending status back from PayPal.
========
Joomla 1.5.14 / VirtueMart 1.1.4

John2400

I was getting a pending and no confirmed but it was not because of virtuemart- it was becasue of paypal.

After a while paypal was picking up that I was adding a shipping cost- even if it was free-. Paypal was by default trying to add a shipping cost itself.

I went into the paypal site - under profiles and then postage cost - go to the bottom and tick the box saying that the vendor and not paypal will determine the shipping cost. after that perfect. In fact there is a video on youtube http://www.youtube.com/watch?v=8rvdRMiuNfk
it helped me??

bit odd , but I found it worked for me.

webuser

Hello this is all very interesting. I have used the paypal module a lot however I have never hacked it, just used it as is. The problem I am having is the same as everyone else (i.e. payments are staying at pending when they are paid) however it doesn't happen every time so the majority of the solutions aren't relevant to me (making sure notify.php is accessible etc) because 99% of the time it works fine.

A few months ago we noticed 1 or 2 transactions then yesterday we noticved about 10 transactions just randomly weren't updated to confirmed. Is anyone else having this same intermittant issue? Does anyone have any suggestions? Thanks.
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

webuser

Sorry I should mention my setup. I use Joomla 1.5.9, VM1.1.3, server running suPHP permissions all good, paypal account verified. I haven't tried the gateway from My Joomla Extensions because there is another similar thread http://forum.virtuemart.net/index.php?topic=62590.0  and someone on there mentions the files don't work plus in in Australia I'm not sure if that matters, their site only talks about US and UK etc. I also haven't really seen anything that confirms if it would fix this problem.
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

webuser

Sorry to slam this thread but I had one other idea which I thought might be useful. Is it possible to create new statuses so say every order is pending until it goes to paypal then when it comes back from paypal it is updated to something - say if it comes back from paypal with confirmed we update to confirmed, same with cancelled but if it comes back with pending we update it to "Please Check" or something and we send an email or something? Given its an occasional problem I'm wondering if this would work? Has anyone tried this?
http://www.webcircle.com.au - Gold Coast Web Design
http://awebsitedesigner.com.au - Website Design

ukituki

Quote from: kreativeone on December 12, 2009, 17:42:20 PM
It is the notify.php that sets the status. You send the notify URL in your VM extra info on the PayPal configuration screen. I changed the notify URL to the ipntest.php so that I could get the IPN response contents sent to me by email; this test script does not set the status. Changing the URL back to the notify.php ("notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",) works to set the status. I highly recommend adding new status types (e.g. "PayPal_Confirmed", "PayPal_Pending", "PayPal_Cancelled") so that it forces a change in status even if you only get a pending status back from PayPal.

I have done the test. Paypal have send me info that the status is pending and the pending reason is "multi_currency". The payment itself was successful and instant. I actually did the multicurrency transfer, so i checked again doing the single currency ($) sale. I know that paypal is sending the info to the notify as when i refused one of the payments status of order was changed to cancelled. so the only problem i have is how to make paypal to send confirmed status. Can you explain how to implement those order statuses (paypal_confirmed, paypal_pending. I have tried creating them, but although the payment is successful checkout result gives me failure sign if i mess with the paypal cfg file (the same happens if i choose option confirmed for pending payments in paypal config tab)
Any help would be appreciated

marc4444

We have to figure this out. Using Joomla! 1.5.9 and VirtueMart 1.1.3 stable, the webhost is 1&1.com. 

Current status:
I setup my notify.php to email me the info from paypal. Part of the emails I get read: payment_status:Completed

Theories:
1) notify.php needs something other than the payment status to update the order and PayPal is not sending the correct info

2)notify.php is receiving the correct info and the server won't let it update the table


stinga

G'day,

notify.php should be emailing you info when ever a trx happens. Are you getting emails?

I would sprinkle a few

file_put_contents('/tmp/recoverycddisk', __FILE__.":".__LINE__." Payment is completed\n", FILE_APPEND);

around the place just to see what you are getting.
Change filename ('/tmp/recoverycddisk') if needed and change message "Payment is completed".

Then have a look at the file. So I get...

/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:386 (258) paypal status is Completed
/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:393 Payment is completed
/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:398 missing = 0
/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:408 Not building
/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:415 Setting status to D
/home/www/tst.recovery-cd-disk.com/administrator/components/com_virtuemart/notify.php:432 setting status to D


The other things I have just noticed...
What do you have in 'Accept only verified buyers'? If no you will accept everything if yes your customer will pay and you will get money but the status will not be changed.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

ctf

I also have this problem

am having this problem too!

Joomla 1.5.0.51
VM 1.1.4


and have read this whole thread.  Can anyone give some SIMPLE advice for a REAL NOVICE?

thanks!

i have another site that IS returning as confirmed after they pay.  but this site i'm working on now that i just upgraded to new joomla and vm did not change to confirmed after I paid with paypal.


stinga

G'day ctf,

At the moment you are just going to have to wait it out, we are trying to work out what the problem is. Not everybody as the problem so we have to work remotely with those that do.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4