Page 1 of 1
PaypalGateway, Order Status, and Emails [Solved]
Posted: Fri Nov 13, 2009 4:15 am
by Remington
Thanks to Sonya for identifying the problem
First off, hello to the CMS:MS community, and thank you to the developers! I am building my first CMS:MS site, and am amazed at how easy the software is to use.
Unfortunately I am having some difficultly getting the e-commerce modules to work exactly as I need, and am looking for some help. I believe I have installed all of the required modules (listed below), and actually have most things working well. I am able to make a test purchase, go to PayPal Sandbox, and pay for the item. The problem is that even though I complete the transaction on PayPal, the status on the website never changes from "Proposed", and an email is never sent. If I use "manual checkout" instead of "PayPal Checkout" it will send the email.
This is what shows up on the Admin Log once I complete the payment on PayPal:
PaypalGateway:ipn IPN Transaction 5CM91687JU5413459 successful. Status: Pending
Orders:gateway_event Handled Async Transcation 5CM91687JU5413459 for order 12
And if I click the link to return to the store I get the following on the Admin Log:
PaypalGateway --Add Me - module:PaypalGateway string:error_transaction_id_missing--
I have tried with and without IPN to the same fate. Although IPN is important for me because my goal is to have an e-mail sent to a vendor when a PayPal payment is made. I have read the support documents, and also most posts on this forum that deal in related issues (including following kendo451's informative posting
here). Any suggestions about what piece of the puzzle I might be missing would be greatly appreciated.
Here is my setup with modules that I have installed:
Current PHP Version: 5.2.5
MySQL:5.0.67.d7
Linux 2.4.21-63.ELsmp On i686
CMS Version: 1.6.5
CMSMailer: 1.73.14
CGExtensions: 1.17.5
CGPaymentGatewayBase: 1.0.3
CGSimpleSmarty: 1.4.3
Products: 2.4.3
FrontEndUsers: 1.6.10
Orders: 1.6.7
FEUMailer: 0.9.2.BETA
Cart: 1.4.2
SelfRegistration: 1.2.5
Captcha: 0.4
PaypalGateway: 2.1.3
Re: PaypalGateway, Order Status, and Emails
Posted: Fri Nov 13, 2009 6:42 am
by Sonya
Re: PaypalGateway, Order Status, and Emails
Posted: Fri Nov 13, 2009 11:55 pm
by Remington
Many thanks for your post.
Now, on my website, I don't get any return message when I click PayPal's return link. Once I return to my website (page with {orders} tag) there is no success or failure message.
That's why I think that I'm missing something.
Re: PaypalGateway, Order Status, and Emails
Posted: Sat Nov 14, 2009 12:42 pm
by Sonya
1. Please check the bug for Paypal as well:
---------------------------------------------------------
http://dev.cmsmadesimple.org/bug/view/4306 (corrected in SVN)
2. Debug: before checking out with PayPal open the source of the page and look for the hidden input:
-------------------------------------------------------------------------------------------------------------------------------------------
Code: Select all
<input name="notify_url" value="http://yourdomain.com/index.php?mact=PaypalGateway,cntnt01,ipn,0&cntnt01order_id=15&cntnt01mycustom=05db2efd49ce4195d97efe01d4df00f4&cntnt01returnid=59" type="hidden">
<input name="return" value="http://yourdomain.com/index.php?mact=PaypalGateway,cntnt01,return_success,0&cntnt01order_id=15&cntnt01mycustom=05db2efd49ce4195d97efe01d4df00f4&cntnt01returnid=59" type="hidden">
<input name="cancel_return" value="http://yourdomain.com/index.php?mact=PaypalGateway,cntnt01,return_cancel,0&cntnt01order_id=15&cntnt01mycustom=05db2efd49ce4195d97efe01d4df00f4&cntnt01returnid=59" type="hidden">
Check the generated URLs. Is there something different or incomplete? Returnid should have the ID of the page where {Orders} is placed. Order_id should have the actual order number.
Re: PaypalGateway, Order Status, and Emails
Posted: Sun Nov 15, 2009 4:47 am
by Remington
I don't have a "notify_url" input, but the other two look like they have everything in your example. Can you check to see if you notice any problems?
Code: Select all
<input type="hidden" name="custom" value="abc953bbbcafc975d05ed5e747a22129"/>
<input type="hidden" name="return" value="http://www.mysite.com/red/index.php?mact=PaypalGateway,cntnt01,return_success,0&cntnt01order_id=14&cntnt01mycustom=abc953bbbcafc975d05ed5e747a22129&cntnt01returnid=66"/>
<input type="hidden" name="cancel_return" value="http://www.mysite.com/red/index.php?mact=PaypalGateway,cntnt01,return_cancel,0&cntnt01order_id=14&cntnt01mycustom=abc953bbbcafc975d05ed5e747a22129&cntnt01returnid=66"/>
Re: PaypalGateway, Order Status, and Emails
Posted: Sun Nov 15, 2009 7:51 pm
by Sonya
If you do not have notify_url, then you have not activated IPN in the module.
As for the inputs they look OK for me. You should check if PDT is active in your PayPal account.
Re: PaypalGateway, Order Status, and Emails
Posted: Mon Nov 16, 2009 12:01 am
by Remington
My fault, I had temporarily disabled IPN to test to see if that was the problem. I do indeed have notify_url, and PDT is active on PayPal. I put the PDT token in as well.
Here is my notify_url input on the checkout page:
Code: Select all
<input type="hidden" name="notify_url" value="http://www.mysite.com/red/index.php?mact=PaypalGateway,cntnt01,ipn,0&cntnt01order_id=15&cntnt01mycustom=483a16190ee9857bc406255d543ea4b2&cntnt01returnid=66"/>
Again, to me that looks like your example.
It seems that PayPal is correctly communicating with my CMS:MS install, but orders aren't being taken off of Pending status.
I guess the next thing for me to try is to test with a live PayPal account. Maybe this is just how PayPal Sandbox is?
Re: PaypalGateway, Order Status, and Emails
Posted: Mon Nov 16, 2009 2:18 pm
by Sonya
Remington wrote:
My fault, I had temporarily disabled IPN to test to see if that was the problem. I do indeed have notify_url, and PDT is active on PayPal. I put the PDT token in as well.
Check that PDT is activated AND the option Payment Data Transfer is set to on as well in the PayPal account.
Remington wrote:
I guess the next thing for me to try is to test with a live PayPal account. Maybe this is just how PayPal Sandbox is?
Definitely not. I have it run with sandbox and on real account the same way. It would not make any sense for testing environment to work different way as the real one. Agree? :)
Re: PaypalGateway, Order Status, and Emails
Posted: Tue Nov 17, 2009 3:09 am
by Remington
Sonya wrote:
Check that PDT is activated AND the option Payment Data Transfer is set to on as well in the PayPal account.
I have Payment Data Transfer set to on, and also auto return -- both under Website Payment Preferences. I don't see a separate option to activate PDT though. Is that on a different page?
Thanks again for sharing your ideas. I do appreciate the help.
Re: PaypalGateway, Order Status, and Emails
Posted: Tue Nov 17, 2009 6:57 am
by Sonya
Remington wrote:
I have Payment Data Transfer set to on, and also auto return -- both under Website Payment Preferences.
That is what I have meant. There is no other option. You can PM me your website with test account, so that I can look into installation. Out of ideas

Re: PaypalGateway, Order Status, and Emails
Posted: Wed Nov 18, 2009 11:34 pm
by Remington
Thanks Sonya. PM Inbound ...
Re: PaypalGateway, Order Status, and Emails
Posted: Thu Nov 19, 2009 5:59 pm
by Sonya
I have my steak now
1. In the PayPal module double check the field Business Mail for the merchant account. Normally, you have a generated e-mail address for the merchant account in the sandbox, not a real e-mail address.
2. The payment in PayPal is shown to me as unclaimed. You should check why the payment is on hold. It is a PayPal issue (Payment Receiving Preferences), not CMSMS. That's why the order status is returned to CMSMS as pending with IPN.
3. You have definetly an issue with Website Payment Preference (PayPal) as the PayPal website does not redirect to your website automatically after payment. Double check it as well. Click on the link Website Payment Preferences, turn on
Auto-Return option, and enter any URL of your website in the field Return URL. It does not matter what you enter here as this URL will be overridden by the module Paypal Gateway. Then turn on
Payment Data Transfer and save.
The message
Code: Select all
--Add Me - module:PaypalGateway string:error_transaction_id_missing--
means that paypal does not answer with proper $_POST to your website. So it is not a CMSMS issue, but more the configuration of PayPal account, I assume.
Re: PaypalGateway, Order Status, and Emails
Posted: Sat Nov 21, 2009 12:48 am
by Remington
Sonya, thank you very much, you solved my problem.
I was indeed using the wrong PayPal email address in the PayPalGateway module. I was using the one that I used to signup with PayPal's Sandbox, and not the one they generated for my seller testing account.
Although this was a major user error on my part, I will take it as a learning experience.
Thank you so much for all of your help identifying the problem. You are great!!