VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: DarkeEdge on November 25, 2008, 03:15:03 AM

Title: Paypal not changing status to confirmed
Post by: DarkeEdge on November 25, 2008, 03:15:03 AM
I am running a Joomla 1.0.15 site with Virtuemart 1.1.0 RC2 and I was wondering if anyone could help me with a problem we're having.

Paypal seems to work fine in the purchase, but when the payment is made, the status doesn't change off of pending.  The config has it set to change to confirmed.  I tried debugging to a file, and it was no help.  We've already done a lot of customization to the site's VM files in non-payment areas, so upgrading versions would be a large task.  Authorize.net purchases work fine, just to note.

If anyone can offer any suggestions, please let me know, I'm pulling what's left of my hair out on this one.

DarkeEdge
Title: Re: Paypal not changing status to confirmed
Post by: magiashok on November 25, 2008, 13:07:19 PM
Can you confirm your paypal configuration setup first.

And then, check with your paypal cfg file config variables, is it all are set in correctly?

Because, we have faced same problem in our development, but now we have fixed this one.
Title: Re: Paypal not changing status to confirmed
Post by: hoppe on November 26, 2008, 01:06:05 AM
I have the same problem, and I canĀ“t fixed it.

How to do this?
Title: Re: Paypal not changing status to confirmed
Post by: DarkeEdge on November 26, 2008, 21:04:28 PM
Quote from: magiashok on November 25, 2008, 13:07:19 PM
Can you confirm your paypal configuration setup first.
And then, check with your paypal cfg file config variables, is it all are set in correctly?
Because, we have faced same problem in our development, but now we have fixed this one.
I unfortunately was called away from the project for yesterday and today, but I wanted to thank you for answering so fast.  I know my config in virtuemart's payment sections is correct, but I didn't check the CFG file for errors, will look tomorrow and let you know.

DE
Title: Re: Paypal not changing status to confirmed
Post by: DarkeEdge on November 29, 2008, 16:49:47 PM
Paypal CFG file:
define ('PAYPAL_DEBUG', '0');
define ('PAYPAL_EMAIL', 'mail@mysite.com');
define ('PAYPAL_VERIFIED_ONLY', '1');
define ('PAYPAL_VERIFIED_STATUS', 'C');
define ('PAYPAL_PENDING_STATUS', 'P');
define ('PAYPAL_INVALID_STATUS', 'X');

I'm supposing that looks good, unless I need to modify 'verified status'
Title: Re: Paypal not changing status to confirmed
Post by: DarkeEdge on December 01, 2008, 20:26:56 PM
I would greatly appreciate any assistance if someone has come across this problem.
Title: Re: Paypal not changing status to confirmed
Post by: hoppe on December 20, 2008, 01:05:13 AM
DarkeEdge, have you solved it?  ???
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on December 20, 2008, 15:09:05 PM
Anyone manage to work out why this doesn't return 'confirmed' ?
Title: Re: Paypal not changing status to confirmed
Post by: devilman on January 26, 2009, 14:01:58 PM
Having the same issue here too.  VM 1.1.3 and Joomla 1.5.2 (didn't realise I was a little behind in Joomla versions so I've just upgraded to 1.5.9 but I doubt that will have too much of an impact).  The last couple of paypal transactions just haven't changed the order status to confirmed either through the 'verified' or 'pending' flags in the config. It was never a problem on my old site using Joomla 1.0.x and the appropriate VM for it.
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on January 26, 2009, 14:07:30 PM
I think this is down to the payment module you use. I had this issue when I was using the paypal payment module from http://www.virtuemart-solutions.com/index.php (http://www.virtuemart-solutions.com/index.php)

I have since changed to another paypal module and I'm getting the correct return. I can't remember who's module I used though - sorry.

Title: Re: Paypal not changing status to confirmed
Post by: devilman on January 26, 2009, 16:01:42 PM
Hmm, I'm just using the default one that came with VM - I didn't realise there were others so I'll have to take a look around. :)
Title: Re: Paypal not changing status to confirmed
Post by: angek on January 29, 2009, 02:24:01 AM
are you also able to confirm that the post back from paypal actually includes the correct order_status? In your paypal configuration you should have a notify_uri which points to notify.php it is this file that handles the response from paypal.

A simple way to verify this is to create a file called ipntest.php (or whatever you like) and upload it to the root directory of your joomla installation. This file should contain the following:

<?php
$fromname"Your name here";
$from_email "your email here";
$recipient_email "recipients email here";
$subject "Paypal IPN Test";
$body null;
$header "From: ".$fromname" <".$from_email.">\r\n";
foreach($_POST as $var=>$val){
$body .= $var.":".$val."/n";
}
mail($recipient_email$subject$body$header);
?>


Then update your paypal configuration and modify the notify_uri to point to this newly created file. Now make a purchase (I'm assuming you have set everything to test mode :) ).

You should receive an email with the info that PayPal returns to your site after the purchase.

Take a look at this email and confirm that the order_status is "Confirmed".
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on January 29, 2009, 02:34:12 AM
Yep it was confirmed status but the paypal pro module did not pass back the info. Anyway I'm ok now as I'm using a solution that works :-)
Title: Re: Paypal not changing status to confirmed
Post by: angek on January 29, 2009, 02:41:32 AM
care to share?
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on January 29, 2009, 02:49:31 AM
It's a paypal pro module (US) not the standard paypal module. The thing is I don't remember which one was the successful module. I downloaded half a dozen from different sites and the code does not have any indication of who was the creator.

I'm using it for the UK however, just had to apply for the api credentials - but all is well. It was a free extension not a commercial one.

Title: Re: Paypal not changing status to confirmed
Post by: angek on January 29, 2009, 02:57:57 AM
cheers :)
Title: Re: Paypal not changing status to confirmed
Post by: blindMoe on January 29, 2009, 20:43:46 PM
I am having the same problem.. what is weird is that everything was working OK and then one day it just stopped.  Nothing changed in the code but the confirmations stopped automatically processing. Maybe this thread should now be directed to "Can someone give the name of a Paypal Module that Works" :)
Title: Re: Paypal not changing status to confirmed
Post by: blindMoe on February 07, 2009, 02:07:47 AM
I think that the order status was not changing due to having a .htaccess rule that protected the /administrator/ folder.  Because the notify.php script is inside the folder I believe the access rule was stopping paypal from contacting the script.  I removed the rule and it seems to work properly now.
Title: Re: Paypal not changing status to confirmed
Post by: devilman on February 25, 2009, 13:12:15 PM
I'm still having this problem - not a single order has been changed to 'confirmed' as yet.  Could it be something related to sh404sef at all?  That's the only thing on my site that would differ from a normal installation of VM as far as I can tell.
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on February 25, 2009, 13:30:12 PM
I'm using the paypal and paypal pro payment modules on my site with sh404sef and all is ok.

May need to get a coder for a paid job me thinks !
Title: Re: Paypal not changing status to confirmed
Post by: belindab on March 01, 2009, 11:51:11 AM
I'm having this problem too. The PayPal status comes back as 'Pending', even though the Payment is made instantly in PayPal, it never gets set to Confirmed. I think it's very confusing. I'm running 1.5.8 with VM 1.1.2 and SEF is off.
If anyone has the solution to this, please share.
Title: Re: Paypal not changing status to confirmed
Post by: devilman on March 02, 2009, 22:29:04 PM
Sorted it on my site now.  The bit in the Paypal setup about trying to access the notify.php script helped me track the problem down - when I access that page in a browser, I'd get a 500 Internal Server error.  When I looked into the Cpanel error logs, it was telling me that the Administrator folder had Group Write permissions, so I switched it from 777 to 755 and that seems to have worked.  I even had the confirmations come through that had been outstanding over the past week.
Title: Re: Paypal not changing status to confirmed
Post by: belindab on March 03, 2009, 20:14:24 PM
Hmm, nice thought there, but I get no errors when i try to access notify.php and I do get all the messages I'm expecting.
I'm wondering whether it is because we are using a French PayPal account, rather than a UK or US one - perhaps it has a slightly different protocol?
Title: Re: Paypal not changing status to confirmed
Post by: frank walls on March 04, 2009, 22:49:41 PM
We've been having the same problem in our store, and it just started up out of the blue. I already posted this in a couple of wrong places on here, but here's what I've got. I'm not the tech guy, but he's not sure what the problem is either. So if there's any solution I can pass it on to him.

Previously when a transaction completed it would say this under the payment log:

Payment information captured for later processing.

Then just about a week or 2 ago it started saying this:

./.

As far as I know nothing was changed anywhere in the settings. Also, products that cost $0.00 still finish the transaction correctly.

Here's the code from the payment method form configuration:

<?php
$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"cmd" => "_xclick",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,
"item_name" => $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER.": ". $db->f("order_id"),
"order_id" => $db->f("order_id"),
"invoice" => $db->f("order_number"),
"amount" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address_street" => $dbbt->f('address_1'),
"address_zip" => $dbbt->f('zip'),
"address_city" => $dbbt->f('city'),
"address_state" => $dbbt->f('state'),
"address_country" => $dbbt->f('country'),
"image_url" => $vendor_image_url,
"return" => SECUREURL ."index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
"notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",
"cancel_return" => SECUREURL ."index.php",
"undefined_quantity" => "0",
"test_ipn" => PAYPAL_DEBUG,
"pal" => "NRUBJXESJTY24",
"no_shipping" => "1",
"no_note" => "1"
);
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
}
mosRedirect( $url . $query_string );
} else {

echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it is fast, free, and secure!" />';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
}

echo '</form>';

}
?>

Any help would be greatly appreciated. I now have to check our store every hour or two and manually confirm all sales.
Title: Re: Paypal not changing status to confirmed
Post by: cchhita on March 05, 2009, 18:34:24 PM
Hi There,
Same problem here! I have read the post from Soeren but that did not help.  I have also tried several other things such as creating a notify.php in the root of my site with a php includes pointing to the main notify.php script, but that does nothing either. 

My client gets lots of orders, and the orders are in the $1000's of dollars, so would like to get this correct for him. 
Am willing to get a paid solution to this, as many people are asking the same question.

I have also setup a test site with the latest version of virtuemart, but still get the same problem of status never changing from Pending. 

The email error I get is:
Subject: PayPal IPN Fatal Error on your Site

Hello,
        A fatal error occured while processing a paypal transaction.
        ----------------------------------
        Hostname: www.paypal.com
        URI: /cgi-bin/webscr
        Connection timed out (110)
        Status: FAILED

Any help on this would be appreciated.

Thanks
Title: Re: Paypal not changing status to confirmed
Post by: Lee Wilson on March 05, 2009, 18:49:42 PM
If I were you I would post this in the paid work forum as it is likley to not get acted upon in this thread.


Title: Re: Paypal not changing status to confirmed
Post by: cchhita on March 06, 2009, 17:28:07 PM
Thanks for that.  I have posted on a few other sites to see if I can get a paid solution.  It seems from reading other threads that people have either given up on finding the solution.
I have tried all the possible fixes, but one has yet to work!
Title: Re: Paypal not changing status to confirmed
Post by: belindab on March 06, 2009, 18:06:57 PM
Hi cchhita,
If you do find a solution, I hope that you will come back here to let us know; this is really frustrating, but I don't have the resources to do anything to solve it right now.
Good luck!
Title: Re: Paypal not changing status to confirmed
Post by: gboy on August 19, 2009, 00:55:16 AM
Quote from: blindMoe on February 07, 2009, 02:07:47 AM
I think that the order status was not changing due to having a .htaccess rule that protected the /administrator/ folder.  Because the notify.php script is inside the folder I believe the access rule was stopping paypal from contacting the script.  I removed the rule and it seems to work properly now.

I agree, I have been testing a new site I'm building today and I was receiving confirmed emails up until I added htaccess to administrator folder to lock down the backend. I then tested again and no confirmation, removed the htaccess from administrator folder and re-tested and confirmed emails now coming through.

Is there anyway you can have htaccess for admin folder but allow notify.php to stay unlocked?

Title: Re: Paypal not changing status to confirmed
Post by: Maxmmize on August 19, 2009, 17:08:11 PM
For the IPN and IDN notify issue:

The solution is here

http://myjoomlaextensions.com (http://myjoomlaextensions.com)

They have the solution for PayPal Pro US, PayPal Pro UK, PayPal Pro Ca, Canada

You should pay special attention to modifying the database as described in their documentation. If you find it useful and it works, let everyone know. As far as I know, on thousands of Joomla servers this solution works and has never failed.

Title: Re: Paypal not changing status to confirmed
Post by: Gary on August 19, 2009, 17:21:52 PM
Any developments on this? Its causing us big problems...
Title: Re: Paypal not changing status to confirmed
Post by: Gary on August 24, 2009, 12:03:38 PM
ANYONE??
Title: Re: Paypal not changing status to confirmed
Post by: Gary on September 01, 2009, 10:05:09 AM
This is a joke.
Title: Re: Paypal not changing status to confirmed
Post by: fredzebu on September 01, 2009, 22:46:35 PM
Quote from: Gary on September 01, 2009, 10:05:09 AM
This is a joke.
you haven't contributed much here Gary?

try reading this forum, and tell us your version of joomla and vm, and the results of your testing.
Title: Re: Paypal not changing status to confirmed
Post by: Gary on September 02, 2009, 10:08:15 AM
Quote from: fredzebu on September 01, 2009, 22:46:35 PM
Quote from: Gary on September 01, 2009, 10:05:09 AM
This is a joke.

No I can see that, but I have spent hours and hours searching the forums, sending private messages to the mods and developers (who have ignored them all) and even on the phone to paypal.


you haven't contributed much here Gary?

try reading this forum, and tell us your version of joomla and vm, and the results of your testing.
Title: Re: Paypal not changing status to confirmed
Post by: fredzebu on September 02, 2009, 12:55:32 PM
Quote from: Gary on September 02, 2009, 10:08:15 AM
Quote from: fredzebu on September 01, 2009, 22:46:35 PM
Quote from: Gary on September 01, 2009, 10:05:09 AM
This is a joke.

No I can see that, but I have spent hours and hours searching the forums, sending private messages to the mods and developers (who have ignored them all) and even on the phone to paypal.


you haven't contributed much here Gary?

try reading this forum, and tell us your version of joomla and vm, and the results of your testing.
no mate, you aren't getting the message. unless you tell the forum your version of joomla and your version of vm, and PUBLISH what testing you have done, nobody learns anything.

why would you send private messages? no one on the forums learns anything from that. contribute something!

ok, now check out this forum:
http://forum.virtuemart.net/index.php?topic=56318.0

and tell us something useful.
Title: Re: Paypal not changing status to confirmed
Post by: daxander on September 05, 2009, 14:35:10 PM
there is also another problem.

My PayPal fee is -3.50 percent.
On 21.00 USD, this amount is 0.74

But is shows Paypal(+0.62) !!!!

And THEN when I select next..  I see a fee of 0.74
So it does show he right amount, but it is crazy.

When I finally select next and go to the Paypal site, the amount is changed again !!  But now the total amount is not 21.74, BUT 21.72.

Can somebody please tell me what the hell is going on and why Virtuemart does not give support or updates on the Paypal module ?  It is totally crap.. everybody has he same problems.

Who can help ?
Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on September 05, 2009, 23:21:02 PM
Thought I'd try and get this thread back on track after it was partly thrown off course by two posters.

I have recently setup a site with a standard Paypal account, default paypal config as standard with VM, and the 'Confirmed' work straight off. One thing I know about this particular site is that the hosting is very good, configured specifically for Joomla, and the paypal account had been used for a few years for direct payments (paypal email) in different currencies.

Makes me wonder what differences in setup there might be for those that can not get this to work. Could well be something external to Virtuemart.
Title: Re: Paypal not changing status to confirmed
Post by: fredzebu on September 06, 2009, 00:59:30 AM
Quote from: MikeUK on September 05, 2009, 23:21:02 PM
Thought I'd try and get this thread back on track after it was partly thrown off course by two posters.

I have recently setup a site with a standard Paypal account, default paypal config as standard with VM, and the 'Confirmed' work straight off. One thing I know about this particular site is that the hosting is very good, configured specifically for Joomla, and the paypal account had been used for a few years for direct payments (paypal email) in different currencies.

Makes me wonder what differences in setup there might be for those that can not get this to work. Could well be something external to Virtuemart.

hi mike,
yes it is good to keep the thread on topic. there is a very similar thread entitled "Order status not updating event though transaction successful":
http://forum.virtuemart.net/index.php?topic=56318.15

on that thread, a number of posters (self included) have reported detailed testing. see my posts on that thread (replies #17 and #18).

i also setup a site with a standard Paypal account, default paypal config as standard with VM (Joomla 1.5.9, vm1.1.2 stable). In my case, Paypal was definitely returning status=Pending, even though the cc has been debited and both seller and buyer logon to Paypal and find that the transaction was successful. In this case the Paypal sellers account is new so maybe Paypal won't return status=Confirmed until the sellers account has been operating for some time and has been verified.
Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on September 06, 2009, 01:08:03 AM
Quote from: fredzebu on September 06, 2009, 00:59:30 AM
In this case the Paypal sellers account is new so maybe Paypal won't return status=Confirmed until the sellers account has been operating for some time and has been verified.

Will check out that other thread, but can tell you for almost 100% that the Paypal account has to be verified.
Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on September 06, 2009, 01:24:40 AM
Ok, so picked this thread as a place to continue this as it has a bigger history and more overall interest.

Some ideas that may help. Some may have done all this already as it's not new by any means.

A brief checklist of things I know about (will add more as I think about them). Would be worth ticking these off:

1) Paypal account is verified

2) Account has successfully taken transactions manually (paypal email payment) in the same currency as the site

3) the notify.php file is accessible (not blocked by folder / file permissions)

4) The VM paypal config has 'Confirmed' as the 'Order Status for successful transactions' setting
Title: Re: Paypal not changing status to confirmed
Post by: fredzebu on September 06, 2009, 01:34:36 AM
Quote from: MikeUK on September 06, 2009, 01:08:03 AM
Quote from: fredzebu on September 06, 2009, 00:59:30 AM
In this case the Paypal sellers account is new so maybe Paypal won't return status=Confirmed until the sellers account has been operating for some time and has been verified.

Will check out that other thread, but can tell you for almost 100% that the Paypal account has to be verified.

That makes sense. When I was making the purchases to test the site, the account was new and NOT verified (they had to prove their status as a not-for-profit association in Australia). The account is now verified but I will have to wait until some new purchases are made.
Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on September 06, 2009, 22:53:37 PM
It will be interesting to see if that makes a difference. Useful info if it does.
Title: Re: Paypal not changing status to confirmed
Post by: fredzebu on September 07, 2009, 01:25:38 AM
Quote from: MikeUK on September 06, 2009, 22:53:37 PM
It will be interesting to see if that makes a difference. Useful info if it does.
I'll have to wait until the next Paypal sale is made and then I'll post the results.
Title: Re: Paypal not changing status to confirmed
Post by: sept171787 on September 09, 2009, 07:57:25 AM
I am complete new to VM. SO I started off poking in the dark to figure out this issue. I did two things which have solved my issue.

First I was getting erros in the error logs about path could not be found. I hard coded my path in the notify.php file. I was still having issue but the first error went away.

I then performed a TCPDUMP durn a transaction and saw I was getting a response back. So I....

....added this line into my .htaccess file and it started working.
RewriteRule ^(checkout.result.php) - [L]

Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on September 09, 2009, 09:06:25 AM
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.
Title: Re: Paypal not changing status to confirmed
Post by: volksman3 on November 24, 2009, 19:30:06 PM
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
Title: Re: Paypal not changing status to confirmed
Post by: stinga on November 24, 2009, 21:03:53 PM
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!)
Title: Re: Paypal not changing status to confirmed
Post by: kreativeone on December 12, 2009, 01:08:32 AM
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.
Title: Re: Paypal not changing status to confirmed
Post by: stinga on December 12, 2009, 15:29:51 PM
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.
Title: Re: Paypal not changing status to confirmed
Post by: 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.
Title: Re: Paypal not changing status to confirmed
Post by: John2400 on January 19, 2010, 12:02:13 PM
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.
Title: Re: Paypal not changing status to confirmed
Post by: webuser on January 22, 2010, 06:36:28 AM
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.
Title: Re: Paypal not changing status to confirmed
Post by: webuser on January 22, 2010, 06:54:30 AM
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.
Title: Re: Paypal not changing status to confirmed
Post by: webuser on January 22, 2010, 07:10:24 AM
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?
Title: Re: Paypal not changing status to confirmed
Post by: ukituki on February 26, 2010, 12:35:23 PM
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
Title: Re: Paypal not changing status to confirmed
Post by: marc4444 on March 06, 2010, 21:12:21 PM
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

Title: Re: Paypal not changing status to confirmed
Post by: stinga on March 10, 2010, 13:40:40 PM
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.
Title: Re: Paypal not changing status to confirmed
Post by: ctf on March 12, 2010, 23:45:59 PM
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.

Title: Re: Paypal not changing status to confirmed
Post by: stinga on March 13, 2010, 09:41:37 AM
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.
Title: Re: Paypal not changing status to confirmed
Post by: Vitriol on April 29, 2010, 08:25:09 AM
Hi there,

Same problem - many tests (pratically all of them) and nothing.

Joomla 1.5.15
VM 1.1.4

Thnaks in advance,

V.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 13, 2010, 03:59:59 AM
We are having the same problem. Any solutions to this yet?
I am actually running the same version of Joomla and the same version of VM on two different sites on the same server, both set up the same (only different paypal accounts) and one works and the other does not.
Very strange....
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 13, 2010, 22:50:39 PM
PayPal or PayPal Pro, there is a difference.
I use PayPal and the IPN works, you can login to your PP account and have a look at the IPN log so you can see what PP has tried to do.
Title: Re: Paypal not changing status to confirmed
Post by: MikeUK on May 14, 2010, 15:52:33 PM
Quote from: spyderwoman on May 13, 2010, 03:59:59 AM
We are having the same problem. Any solutions to this yet?
I am actually running the same version of Joomla and the same version of VM on two different sites on the same server, both set up the same (only different paypal accounts) and one works and the other does not.
Very strange....

spyderwoman, I would say that it is probably not the same problem as the poster before. In your case, it would seem to show that the Paypal account is making the difference, not VM.

You are in a fairly unique position as 1) you can compare the two paypal accounts closely, 2) you may be able to provide some very useful feedback here regarding the setup of the accounts.

Certainly, when I last worked with Paypal, the setup of the account made a difference. I don't remember the specifics of it though as it was a long time ago.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 15, 2010, 03:19:31 AM
You are absolutely right! It was not a VM thing but the one account didnt have the notify turned on or the return url set in paypal. A complete oversight on my side. I hope everyone else's issues are solved. Thanks for the help!
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 17, 2010, 19:31:19 PM
You should not need to set the return address in PayPal since VM sends it to PayPal.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 17, 2010, 20:20:53 PM
That is what I thought but my status was not being updated so I thought IPN had to be turned on...
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 17, 2010, 20:30:42 PM
I have multiple projects I am working on now where the order status is not being updated.
All three are Joomla 1.5 and VM 1.1.4
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 18, 2010, 08:29:37 AM
It could mean the data you are sending to PP is incorrect.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 18, 2010, 13:52:35 PM
Thanks Stinga, can you clarify what can be wrong. The only information sent is that for the order using the paypal username. Am I missing something?
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 19, 2010, 00:08:56 AM
If you change the paypal url to http://www.recovery-cd-disk.com/cgi-bin/data_dump.pl it will display all the data that is sent to paypal, we can then pull that to bits.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 19, 2010, 03:17:19 AM
change the paypal ipn notify?
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 19, 2010, 09:24:26 AM
In your extra info page thee is a url that points to PP, change that. Or search for data_dump.pl on this forum and see what others have done.
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 19, 2010, 18:01:11 PM
wow, cool. Here is the information dump. I have only XXXed out personal information

QuoteInformation passed to this script

Environment

SCRIPT_NAME=/cgi-bin/data_dump.pl
SERVER_NAME=www.recovery-cd-disk.com
HTTP_REFERER=http://preciouspetalsdesigns.com/index.php?page=checkout.index&payment_method_id=4&ship_to_info_id=bc6765501054da59306350ea50d73880&shipping_rate_id=&checkout_stage=4&option=com_virtuemart&Itemid=3
SERVER_ADMIN=domain@squangle.net
HTTP_ACCEPT_ENCODING=gzip,deflate,sdch
HTTP_CONNECTION=keep-alive
REQUEST_METHOD=GET
HTTP_ACCEPT=application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
SCRIPT_URI=http://www.recovery-cd-disk.com/cgi-bin/data_dump.pl
SCRIPT_FILENAME=/home/www/recovery-cd-disk.com/cgi-bin/data_dump.pl
SERVER_SOFTWARE=Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch proxy_html/3.1.2 mod_perl/2.0.4 Perl/v5.10.0
HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.3
QUERY_STRING=cmd=_ext-enter&redirect_cmd=_xclick&upload=1&business=dkjaxn%40yahoo.com&receiver_email=xxxx%40yahoo.com&item_name=Order+Number%3A+6&order_id=6&invoice=55_1590e9e1b521b8048cc42cef06087&amount=106.75&shipping=0.00&currency_code=USD&address_override=1&first_name=xxxx&last_name=xxxx&address1=5448+xxxx+peakway&address2=&zip=xxxx&city=Apex&state=NC&country=US&email=xxxx.xxxx%40xxxx.com&night_phone_b=xxxx&cpp_header_image=http%3A%2F%2Fpreciouspetalsdesigns.com%2Fcomponents%2Fcom_virtuemart%2Fshop_image%2Fvendor%2FPrecious_Petals_4b8f0aa643750.png&return=http%3A%2F%2Fpreciouspetalsdesigns.com%2Findex.php%3Foption%3Dcom_virtuemart%26page%3Dcheckout.result%26order_id%3D6&notify_url=http%3A%2F%2Fpreciouspetalsdesigns.com%2Fadministrator%2Fcomponents%2Fcom_virtuemart%2Fnotify.php&cancel_return=http%3A%2F%2Fpreciouspetalsdesigns.com%2Findex.php&undefined_quantity=0&test_ipn=1&pal=NRUBJXESJTY24&no_shipping=1&no_note=1&
REMOTE_PORT=49230
HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5
SERVER_PORT=80
SERVER_SIGNATURE=
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch proxy_html/3.1.2 mod_perl/2.0.4 Perl/v5.10.0 Server at www.recovery-cd-disk.com Port 80


HTTP_CACHE_CONTROL=max-age=0
HTTP_ACCEPT_LANGUAGE=en-US,en;q=0.8
REMOTE_ADDR=72.148.40.47
SERVER_PROTOCOL=HTTP/1.1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REQUEST_URI=/cgi-bin/data_dump.pl?cmd=_ext-enter&redirect_cmd=_xclick&upload=1&business=dkjaxn%40yahoo.com&receiver_email=dkjaxn%40yahoo.com&item_name=Order+Number%3A+6&order_id=6&invoice=55_1590e9e1b521b8048cc42cef06087&amount=106.75&shipping=0.00&currency_code=USD&address_override=1&first_name=xxx&last_name=xxx&address1=5448+xxx+peakway&address2=&zip=xxx&city=Apex&state=NC&country=US&email=xxx.xxx%40xxx.com&night_phone_b=9196108532&cpp_header_image=http%3A%2F%2Fpreciouspetalsdesigns.com%2Fcomponents%2Fcom_virtuemart%2Fshop_image%2Fvendor%2FPrecious_Petals_4b8f0aa643750.png&return=http%3A%2F%2Fpreciouspetalsdesigns.com%2Findex.php%3Foption%3Dcom_virtuemart%26page%3Dcheckout.result%26order_id%3D6&notify_url=http%3A%2F%2Fpreciouspetalsdesigns.com%2Fadministrator%2Fcomponents%2Fcom_virtuemart%2Fnotify.php&cancel_return=http%3A%2F%2Fpreciouspetalsdesigns.com%2Findex.php&undefined_quantity=0&test_ipn=1&pal=NRUBJXESJTY24&no_shipping=1&no_note=1&
GATEWAY_INTERFACE=CGI/1.1
SERVER_ADDR=91.197.33.52
HTTP_AUTHORIZATION=
SCRIPT_URL=/cgi-bin/data_dump.pl
DOCUMENT_ROOT=/home/www/recovery-cd-disk.com
HTTP_HOST=www.recovery-cd-disk.com
These Form-variables exists

redirect_cmd=_xclick
state=NC
last_name=xxx
night_phone_b=xxx
email=xxx.xxx@xxx.com
receiver_email=xxxx@yahoo.com
city=Apex
no_note=1
address_override=1
upload=1
business=xxxx@yahoo.com
pal=NRUBJXESJTY24
shipping=0.00
country=US
cmd=_ext-enter
currency_code=USD
test_ipn=1
cancel_return=http://preciouspetalsdesigns.com/index.php
order_id=6
notify_url=http://preciouspetalsdesigns.com/administrator/components/com_virtuemart/notify.php
cpp_header_image=http://preciouspetalsdesigns.com/components/com_virtuemart/shop_image/vendor/Precious_Petals_4b8f0aa643750.png
item_name=Order Number: 6
return=http://preciouspetalsdesigns.com/index.php?option=com_virtuemart&page=checkout.result&order_id=6
address2=
undefined_quantity=0
zip=27502
amount=106.75
invoice=55_1590e9e1b521b8048cc42cef06087
address1=5448 xxxx peakway
no_shipping=1
first_name=xxx
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 20, 2010, 00:20:35 AM
OK, that data looks OK, nothing stands out as being incorrect, so change the URL back to PP.
Next is to have a look in PP and have a look at the IPN data that PP logs. It might tell you what is happeninf, it will tell you the status it got from your server.

Then we will want to have a look at notify.php, you might have to put some echo commands in there so we can get a track on what is happening.
You can sprinkle

file_put_contents('/tmp/PP_notify', __FILE__.":".__LINE__."\n", FILE_APPEND);
[\code]
into notify.php and then have a look at /tmp/PP_notify and you can see what happens. (This is for linux, if using windows you are your own!)
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 20, 2010, 01:43:55 AM
Thank you. do you have any idea of where I can find the pp data logs? I have searched all over pp and through their help desk and have found nothing.
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 20, 2010, 12:01:58 PM
history > ipn history
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 20, 2010, 14:18:54 PM
Here is what I grabbed from the IPN History (xxx out personal data)
Quote
mc_gross=106.75&invoice=56_4d487bac81aa9604ee12bf84d62a1&protection_eligibility=PartiallyEligible&address_status=unconfirmed&payer_id=AUE6WS7LP9EVA&tax=0.00&address_street=5448 xxxx peakway&payment_date=18:14:40 May 18, 2010 PDT&payment_status=Completed&charset=windows-1252&address_zip=xxx&first_name=xxxx&mc_fee=3.40&address_country_code=US&address_name=xxxx&notify_version=2.9&custom=&payer_status=verified&business=xxxx@yahoo.com&address_country=United States&address_city=apex&quantity=1&verify_sign=AiKZhEEPLJjSIccz.2M.tbyW5YFwAAH672D69td5a.19DzqPEo4RcR1f&payer_email=xx.xxx@xxxx.com&txn_id=1AW79863R9490501E&payment_type=instant&payer_business_name=xxxx, LLC&last_name=xxx&address_state=NC&receiver_email=xxx@yahoo.com&payment_fee=3.40&receiver_id=Y8CG4JS7NM2FL&txn_type=web_accept&item_name=Order Number: 5&mc_currency=USD&item_number=&residence_country=US&handling_amount=0.00&transaction_subject=Order Number: 5&payment_gross=106.75&shipping=0.00
Title: Re: Paypal not changing status to confirmed
Post by: stinga on May 20, 2010, 19:47:19 PM
also need the rest of the data, HTTP response code etc
Title: Re: Paypal not changing status to confirmed
Post by: spyderwoman on May 20, 2010, 19:49:45 PM
That is all that was there... Is that the problem?
Title: Re: Paypal not changing status to confirmed
Post by: beriskunk on August 25, 2010, 17:22:47 PM
Hi there...

I'm havig a huge trouble with this... then i decided to rewrite notify.php to change the order status in the database at the moment of receiving the IPN Notify. Then, when i put this code on it:

<?php
$fromname"Your name here";
$from_email "your email here";
$recipient_email "recipients email here";
$subject "Paypal IPN Test";
$body null;
$header "From: ".$fromname" <".$from_email.">\r\n";
foreach($_POST as $var=>$val){
$body .= $var.":".$val."/n";
}
mail($recipient_email$subject$body$header);
?>


I receive the notification correctly. But, someone know how to put that POST data inside variables instead?

Thanks!
Title: Re: Paypal not changing status to confirmed
Post by: beriskunk on August 26, 2010, 01:08:16 AM
Yeaaah! Forgive my last post... I solved it ;D I finally rewrited notify.php for fill it to my purposes: I just need to change the order_status automatically to "completed" when the transaction is for a digital download (and when the buyer has paid, of course!)

Then, i want to share ;)

there are the steps that i followed before to do it (Note that it's only fot developing, sandbox must be disabled in production environment)

Quote#create buyer & seller accounts in https://developer.paypal.com/
#Inside VMart configuration => Shop => Payment methods => paypal => Config

  • Set testmode = NO
  • put the sandbox seller account in the seller email field.
  • enable sandbox in extra info on paypal payment method.
#access to https://www.sandbox.paypal.com with the seller account.
#On profile => more options => Instant Payment Notify => Activate and modify the IPN URL to target my notify.php

  • http://www.mycompany.com/administrator/components/com_virtuemart/notify.php
#On profile => more options => payment preferences in the web site

  • forwarding web > Activate
  • Checkout URL: http://www.company.com/index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id")
  • Transfer payment data > Activated

And now... my new notify.php:

<?php

//SEND IPN TEST TO SELLER (test purposes)

$fromname"IPN Test";
$from_email "ipn@sandbox.paypal.com";
$recipient_email "shop@company.net";
$subject "Paypal IPN Test";
$body null;
$header "From: ".$fromname" <".$from_email.">\r\n";
foreach($_POST as $var=>$val){
$body .= $var.":".$val."<br />";
}

mail($recipient_email$subject$body$header);


// assign posted variables FROM PAYPAL to local variables
$item_name $_POST['item_name'];
$item_number $_POST['item_number'];
$payment_status $_POST['payment_status'];
$payment_amount $_POST['mc_gross'];
$payment_currency $_POST['mc_currency'];
$txn_id $_POST['tnx_id'];
$receiver_email $_POST['receiver_email'];
$payer_email $_POST['payer_email'];
$invoice $_POST['invoice'];

// WRITE DATA.TXT FILE (tracking purposes)
$fp fopen ('data.txt''w');
fwrite ($fp$payment_status);
fwrite ($fp":");
fwrite ($fp$invoice);
fclose ($fp);

// CHANGE ORDER STATUS IN DATABASE

if ($payment_status "Completed") {

// PREPARE VARIABLES FOR CONNECT TO THIS DATABASE
$myServer "localhost";
$myUser "xxxxxxx";
$myPass "*******";
$myDB "database";

//connection to the database
$dbhandle mysql_connect($myServer$myUser$myPass)
  or die("Couldn't connect to SQL Server on $myServer");

//select a database to work with
$selected mysql_select_db($myDB$dbhandle)
  or die("Couldn't open database $myDB");

//declare the SQL statement that will query the database

 
$sqlsprintf ("UPDATE jos_vm_orders SET order_status = 'C' WHERE order_number='%s';"mysql_real_escape_string($invoice)); 

$sql2=$sql;

$result=mysql_query($sql2);


if (!$result
{
die('Invalid query: ' mysql_error());
}

//execute the SQL query and return records

$result mysql_query($query);

if (!$result
{
    
$message  'Invalid query: ' mysql_error() . "\n";
    
$message .= 'Whole query: ' $query;
    die(
$message);


// Use result
// Attempting to print $result won't allow access to information in the resource
// One of the mysql result functions must be used
// See also , mysql_fetch_array(), mysql_fetch_row(), etc.
while ($row mysql_fetch_assoc($result)) 
{
mysql_result(order_status);
mysql_free_result($result);
mysql_close($dbhandle);
}
}
}
?>



That's all! hope this may be usefull for someone... for my that was a nightmare due to my low level skill with PHP, then you can imagine how happy i am now :D

Note:
The e-mail with the download links are not sent  ??? but the buyer can access downloads throught the confirmation order email or the checkout results page. If someone knows how to do it, tell me please!

PD: I translated directly from Spanish, maybe not well done!  :P
Title: Re: Paypal not changing status to confirmed
Post by: Vitriol on October 02, 2010, 21:18:35 PM
Hi there,

I'am still having the same problem - many tests (pratically all of them) and nothing. Paypal not changing status to confirmed.

Joomla 1.5.20
VM 1.1.5

Thanks in advance,

V.