Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Express Checkout IPN Payment Module


AlexStudio

Recommended Posts

Dear Mr. Alex,

 

When we enabled "Utilize Express Checkout Button" [after making the changes to checkout_shipping.php], it showed the Express Checkout Button few times while testing. Mostly, after doing the Chekout, it is showing the ec_shipping.php with all the shipping options. After selecting one of the shipping options, it is directly taking us to the "express_checkout.php" without showing the "checkout_payment.php". Kindly do the needful so that "Express Checkout Button" is shown always at the ec_shipping.php when it is enabled.

 

Thanks,

 

Lakshmanan S.

If you clicked on the Express Checkout button, it should take you to PayPal. When you return to store, the button will not be shown again until you cancel the payment or pay. The checkout payment will be skipped because express checkout has already been chosen. This is to prevent leaving a unpaid token in your session. You must cancel the payment prior to choose other payment modules.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

  • Replies 405
  • Created
  • Last Reply

Top Posters In This Topic

If you clicked on the Express Checkout button, it should take you to PayPal. When you return to store, the button will not be shown again until you cancel the payment or pay. The checkout payment will be skipped because express checkout has already been chosen. This is to prevent leaving a unpaid token in your session. You must cancel the payment prior to choose other payment modules.

 

Dear Mr. Alex,

 

Okay. I would check once again. Even after completing the payment process in Sand Box for one order, it was not showing the "Express Checkout button" for the subsequent orders. If a button is provided for cancelling the payment in the store itself that may solve the problem. [This may be due to the Contribution "Customer Never Loses Cart - Even without Sign In" that we have which prolongs the Session].

 

Another problem is we are getting "PayPal EC IPN Error" emails with "Toatl amount did not match" for most of the payments even though the amounts are the same:

------------------------------------------------------------------

Order Number: 2139

Date Ordered: February 04, 2007

 

This order has been updated to the following status and requires your

attention.

 

New status: Pending

 

The IPN response contained following message:

 

[Completed (PayPal account:Verified; USD 47.41)]

Toatl amount did not match

Address status: confirmed

 

OrderTotal= USD 47.41

------------------------------------------------------------------

 

This may be due to the invisible difference [in the decimals] as INR gets converted to USD in our store.

 

Thanks,

 

Lakshmanan S.

Link to comment
Share on other sites

Okay. I would check once again. Even after completing the payment process in Sand Box for one order, it was not showing the "Express Checkout button" for the subsequent orders. If a button is provided for cancelling the payment in the store itself that may solve the problem. [This may be due to the Contribution "Customer Never Loses Cart - Even without Sign In" that we have which prolongs the Session].

I don't know how this "Customer Never Loses Cart - Even without Sign In" contrib interacts with EC IPN module. In your case, I would strongly recommend to disable Express Checkout Button.

 

Another problem is we are getting "PayPal EC IPN Error" emails with "Toatl amount did not match" for most of the payments even though the amounts are the same:

------------------------------------------------------------------

Order Number: 2139

Date Ordered: February 04, 2007

 

This order has been updated to the following status and requires your

attention.

 

New status: Pending

 

The IPN response contained following message:

 

[Completed (PayPal account:Verified; USD 47.41)]

Toatl amount did not match

Address status: confirmed

 

OrderTotal= USD 47.41

------------------------------------------------------------------

Seemed like the discrepency in total amount checking is not large enough to get around the osCommerce rounding bug with your currency.

 

Please find in catalog/ext/modules/payment/paypal_ec/ipn.php around line 141:

	  if (($_POST['mc_gross']/$order['currency_value'] >= $total['value'] || $total['value'] - $_POST['mc_gross']/$order['currency_value'] <= 0.02) && $_POST['payment_status'] == 'Completed') {

change that 0.02 to 2.

 

Thank you for reporting, I will improve the total amount checking in the next update.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

I don't know how this "Customer Never Loses Cart - Even without Sign In" contrib interacts with EC IPN module. In your case, I would strongly recommend to disable Express Checkout Button.

Seemed like the discrepency in total amount checking is not large enough to get around the osCommerce rounding bug with your currency.

 

Please find in catalog/ext/modules/payment/paypal_ec/ipn.php around line 141:

	  if (($_POST['mc_gross']/$order['currency_value'] >= $total['value'] || $total['value'] - $_POST['mc_gross']/$order['currency_value'] <= 0.02) && $_POST['payment_status'] == 'Completed') {

change that 0.02 to 2.

 

Thank you for reporting, I will improve the total amount checking in the next update.

 

Thanks. Express Checkout Button remains disabled in our website.

 

We have changed 0.02 to 0.2 in both the places in ipn.php.

 

Thanks.

 

Lakshmanan S.

Link to comment
Share on other sites

Hello,

 

I have installed the latest update of this module manually adding the modified code sections to our already modified os commerce installation (themed installation) and triple checked to make sure I wasn't missing any code.

 

The problem I'm having is that when someone clicks on a product and logs in etc and gets to the point where they want to check out and clicks the check out button, oscommerce then redirects them to ec_shipping.php but the main section is blank where I would normally except something from paypal or whatnot. I can only see part of the themed os commerce page. The main section is blank.

 

Any ideas as to what can be causing this? I have spent quite a bit of time trying to resolve this. I am not a professional PHP developer but I do understand the concepts of programming as I know other languages. I have checked the currency settings and made sure that it is configured the same as the module

 

What else could be causing this page to be blank?

Link to comment
Share on other sites

The $order->content_type is physical and is being redirected from the same ec_shipping.php file with only the oscommerce session id and the various cookies passed.

 

I have been trying to trace what is happening in the ec_shipping.php file but I'm unable to get any further.

 

Please reply ASAP

Link to comment
Share on other sites

The problem I'm having is that when someone clicks on a product and logs in etc and gets to the point where they want to check out and clicks the check out button, oscommerce then redirects them to ec_shipping.php but the main section is blank where I would normally except something from paypal or whatnot. I can only see part of the themed os commerce page. The main section is blank.

I need to see it in youe site. Please tell me your url.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

The site URL is www.youritmanager.biz

 

Thank you I appreciate your time and expertise

Your ec_shipping.php broke at <!-- left_navigation //-->, even before the EC IPN part loaded. Please check to see if you missed something in there.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Your ec_shipping.php broke at <!-- left_navigation //-->, even before the EC IPN part loaded. Please check to see if you missed something in there.

 

I've actually fixed it, It happens that it was include()ing header.php more than it needed. I found out by turning on PHP debugging using a .htaccess file.

 

Thanks for your time.

 

Now to just retheme everything..

Link to comment
Share on other sites

I've actually fixed it, It happens that it was include()ing header.php more than it needed. I found out by turning on PHP debugging using a .htaccess file.

 

Thanks for your time.

 

Now to just retheme everything..

 

OK Apparently not

 

In order to maintain a theme I must include the header file using include('includes/header.php'); but it produces this error

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /hsphere/local/home/yitmbiz/youritmanager.biz/includes/header.php:190) in /hsphere/local/home/yitmbiz/youritmanager.biz/includes/boxes/categories.php on line 13

 

If I remove the include('includes/header.php'); It works but it's unthemed.

 

I need this page themed, What do you suggest I do ?

Ive tried commenting out the other tep_show_category() definition but this breaks normal functionality

Link to comment
Share on other sites

OK Apparently not

 

In order to maintain a theme I must include the header file using include('includes/header.php'); but it produces this error

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /hsphere/local/home/yitmbiz/youritmanager.biz/includes/header.php:190) in /hsphere/local/home/yitmbiz/youritmanager.biz/includes/boxes/categories.php on line 13

 

If I remove the include('includes/header.php'); It works but it's unthemed.

 

I need this page themed, What do you suggest I do ?

Ive tried commenting out the other tep_show_category() definition but this breaks normal functionality

The tep_show_category() function is defined in catalog/includes/boxes/categories.php, I would suggest to check your header.php and replace the line required that file with require_once() statement. If the statement used is include(), then try include_once().

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

The tep_show_category() function is defined in catalog/includes/boxes/categories.php, I would suggest to check your header.php and replace the line required that file with require_once() statement. If the statement used is include(), then try include_once().

 

Thanks

 

Ended up renaming the function lucky..

Link to comment
Share on other sites

Hi

Thank you for your great works, it sounds just what I need as my existing official OSC paypal_ipn module gives us grief if a customer changes the shipping method or address after hitting the paypal button because the temporary order stores the incorrect shipping address. And the normal PayPal module gives us grief because some customers do not return to our site so we do not get the order just an email from paypal saying "Notification of Payment Received"

 

Anyhow I have searched all though this thread over and over but can not see where I have gone wrong :blush:

I have curl enabled and have the certificate in the correct place

 

PHP Version 4.4.4

CURL support enabled

CURL Information libcurl/7.10.3 OpenSSL/0.9.6g ipv6 zlib/1.2.1

 

 

I get this error message:

An error occured when we tried to establish a connection to PayPal's servers
Email dump
In function: pre_confirmation_check()

Response from PayPal:

 

 

 

From this request: (WARNING!!) DO NOT expose your API Username/Password to the public!!

 

[?xml version="1.0" encoding="utf-8"?]

[soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema]

[soap:Header]

[RequesterCredentials xmlns=urn:ebay:api:PayPalAPI] [Credentials xmlns=urn:ebay:apis:eBLBaseComponents]

[username]********[/username]

[Password]*********[/Password]

[subject][/subject]

[/Credentials]

[/RequesterCredentials]

[/soap:Header]

[soap:Body]

[setExpressCheckoutReq xmlns=urn:ebay:api:PayPalAPI] [setExpressCheckoutRequest] [Version xmlns=urn:ebay:apis:eBLBaseComponents]2.0[/Version]

[setExpressCheckoutRequestDetails xmlns=urn:ebay:apis:eBLBaseComponents]

[OrderTotal currencyID=GBP]1.52[/OrderTotal]

[ReturnURL]https://www.livefoods.co.uk/test/express_checkout.php[/ReturnURL]

[CancelURL]https://www.livefoods.co.uk/test/ec_shipping.php?address_error=0[/CancelURL]

[ReqConfirmShipping]0[/ReqConfirmShipping]

[NoShipping]0[/NoShipping]

[AddressOverride]0[/AddressOverride]

[LocaleCode]US[/LocaleCode]

[PageStyle]paypal[/PageStyle]

[Address]

[Name]steve Rolfe[/Name]

[street1]2 Uplands[/street1]

[street2]Gordon Road[/street2]

[CityName]High Wycombe[/CityName]

[stateOrProvince]Buckinghamshire[/stateOrProvince]

[PostalCode]HP13 6AT[/PostalCode]

[Country]GB[/Country]

[Phone]23213213[/Phone]

[/Address]

[buyerEmail][email protected][/buyerEmail]

[/setExpressCheckoutRequestDetails]

[/setExpressCheckoutRequest]

[/setExpressCheckoutReq]

[/soap:Body]

[/soap:Envelope]

 

If you could shed any light on this I would be most greatful

Best wishes

Steve

Link to comment
Share on other sites

Hi

Thank you for your great works, it sounds just what I need as my existing official OSC paypal_ipn module gives us grief if a customer changes the shipping method or address after hitting the paypal button because the temporary order stores the incorrect shipping address. And the normal PayPal module gives us grief because some customers do not return to our site so we do not get the order just an email from paypal saying "Notification of Payment Received"

 

Anyhow I have searched all though this thread over and over but can not see where I have gone wrong :blush:

I have curl enabled and have the certificate in the correct place

 

PHP Version 4.4.4

CURL support enabled

CURL Information libcurl/7.10.3 OpenSSL/0.9.6g ipv6 zlib/1.2.1

I get this error message:

Email dump

If you could shed any light on this I would be most greatful

Please make sure your Certificate file is good. Don't use the cert file you downloaded from sandbox to test with live server, nor vise versa. Make sure it is not API signature.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Please make sure your Certificate file is good. Don't use the cert file you downloaded from sandbox to test with live server, nor vise versa. Make sure it is not API signature.

I did all this exactly:

Log in to your PayPal Premier or Business account.

Click the Profile subtab located in the top navigation area.

Click the API Access link under the Account Information header.

Click the Request API Credentials link in API Set-up page.

Select API SSL Client-side certificate

 

I cancelled that one and did it again to be sure and the new certificate (and new password) gives the same problem!

 

The certificate looks like this:

 

-----BEGIN RSA PRIVATE KEY-----

MIICXQIBAAKBgQDWbLUYlp3LQdtiYVIWpx7i3jvYEBr06INpVH8THGQqvFjn1QuF

********************************************************

********************************************************

BwPYE/ia6jDWRprLvIWrVYyg8yDjjklObAWZL5gbgRkR

-----END RSA PRIVATE KEY-----

-----BEGIN CERTIFICATE-----

MIICkzCCAfygAwIBAgIDALvvMA0GCSqGSIb3DQEBBQUAMIGZMQswCQYDVQQGEwJV

************************************************************

************************************************************

VeSm7penopxB3cyggmOJw94B75g5wTVmeoYy92BTSB/9PxwFvAdL

-----END CERTIFICATE-----

 

I just put the whole txt file on my server, should I only use the certificate part and not the RSA private key part?

 

This was from my live paypal account and I have set it to "live" in OSC admin

Edited by livefooduk

Best wishes

Steve

Link to comment
Share on other sites

There seems to be some problem with UK accounts.

 

Please, if there is any one in UK who has tried this contribution, please report in this thread no matter succeeded or failed.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

PayPal EC IPN diagnostics v0.1 uploaded.

 

This is a modified version of Brian Burton's WPP + EC diagnostics script, to be used with PayPal Express Checkout IPN module v0.4 or above.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

PayPal EC IPN diagnostics v0.1 uploaded.

 

This is a modified version of Brian Burton's WPP + EC diagnostics script, to be used with PayPal Express Checkout IPN module v0.4 or above.

Hi thanks fot that, I ran the diagnostics and the page never loaded in IE7 and using mozilla firefox I get this error:

 

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

* This problem can sometimes be caused by disabling or refusing to accept

cookies.

Best wishes

Steve

Link to comment
Share on other sites

Hi thanks fot that, I ran the diagnostics and the page never loaded in IE7 and using mozilla firefox I get this error:

Do you have a SSL enabled domain?

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

I have uploaded another diagnostics script. Please try with the v0.2 script.

 

It has been tested in FireFox 2.0, IE6/IE7.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Hi

 

Was planning to use this for a new shop that i am just adding modifications to, but notice there could be problems with UK accounts. Has this been fixed yet?

 

Also i was just wondering if anyone that is using this on a live shop are getting people moaning about having to create an account first, or are people just not bothering to complete there purchases?

 

Plus i read further back on this thread (Post #19) that it is compatible with the "offical IPN module", can someone tell me which modification that is.

 

Cheers Richard

Link to comment
Share on other sites

Hi

 

Was planning to use this for a new shop that i am just adding modifications to, but notice there could be problems with UK accounts. Has this been fixed yet?

 

Also i was just wondering if anyone that is using this on a live shop are getting people moaning about having to create an account first, or are people just not bothering to complete there purchases?

 

Plus i read further back on this thread (Post #19) that it is compatible with the "offical IPN module", can someone tell me which modification that is.

 

Cheers Richard

Please try to test it with your UK account. I need to know if there really is an UK account issue. According to PayPal's Express Checkout API document, it should work with all countries supported.

 

Apparently PayPal wants to promote EC API and force sign up to pay with it. Your customers would think it tedious to create 2 accounts (one in your store and one at PayPal) to shop at your store. Actually to sign up with PayPal via EC API is faster. The 'PayPal Account Optional' feature came with PayPal's website payment standard requires payers to fill up a detailed billing info form. It doesn't skip anything but only the accont itself.

 

The 'official IPN module' mentioned in earlier posts is named 'osCommerce PayPal IPN module'.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

OK, I'm getting this message at the moment and I can't fix it:

 

We're sorry, but we were unable to process your payment.

The cURL library, which is required by the PayPal Website Payments Pro module, is not present. Please contact your webhost and request that it be installed.

 

If I look at the server info in the administration panel, it says:

 

curl

CURL support enabled

CURL Information libcurl/7.16.0 OpenSSL/0.9.8a zlib/1.2.3

 

Which to me suggests that it is working?

 

Using IIS on Win2k...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...