AlexStudio

PayPal Express Checkout IPN Payment Module

406 posts in this topic

Hi Alex:

After I install it, run checkout, go to paypal , it display : Connection timed out.

 

ec_diagnostics.php okay except SSL is NO.

 

But Standard Paypal checkout is okay.

 

Would you please give some advise asap?

 

Thanks & Best Regards,

Share this post


Link to post
Share on other sites

Hi Alex:

Here is the dump report i receive:

In function: pre_confirmation_check()
Response from PayPal:
[Security] = N/A
[RequesterCredentials]
  [0]
   [Credentials]
	   [0]
		   [Username] = N/A
		   [Password] = N/A
		   [Subject] = N/A
[SetExpressCheckoutResponse]
  [0]
   [Timestamp] = 2008-05-20T07:22:22Z
   [Ack] = Success
   [CorrelationID] = a43d53d5c3aad
   [Version] = 2.000000
   [Build] = 576518
   [Token] = EC-6DF00473xxxx59152

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="[url="http://schemas.xmlsoap.org/soap/envelope/"]http://schemas.xmlsoap.org/soap/envelope/[/url]" xmlns:xsi="[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]" xmlns:xsd="[url="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/url]"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username][url="http://paypal_api1.daurian.com/"]xxxx[/url][/Username]
[Password]xxxxxxxx[/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="EUR"]10.48[/OrderTotal]
[ReturnURL][url="http://xxx.com/en/express_checkout.php[/ReturnURL]"]http://xxx.com/en/express_checkout.php[/ReturnURL][/url]
[CancelURL][url="http://xxx.com/en/checkout_payment.php?payment_error=paypal_ec[/CancelURL]"]http://xxx.com/en/checkout_payment.php?payment_error=paypal_ec[/CancelURL][/url]
[ReqConfirmShipping]0[/ReqConfirmShipping]
[NoShipping]0[/NoShipping]
[AddressOverride]0[/AddressOverride]
[LocaleCode]US[/LocaleCode]
[PageStyle]PayPal[/PageStyle]
[Address]
[Name]sunrise sunrise[/Name]
[Street1]aaaawewqe[/Street1]
[Street2][/Street2]
[CityName]aaaa[/CityName]
[StateOrProvince][/StateOrProvince]
[PostalCode]213213[/PostalCode]
[Country]BE[/Country]
[Phone][/Phone]
[/Address]
[BuyerEmail]xxx[email="xxx@gmail.com"]@gmail.com[/email][/BuyerEmail]
[/SetExpressCheckoutRequestDetails]
[/SetExpressCheckoutRequest]
[/SetExpressCheckoutReq]
[/soap:Body]
[/soap:Envelope]

 

any help would be GREATLY appreciated! Thanks!!

Edited by sunrise99

Share this post


Link to post
Share on other sites
[setExpressCheckoutResponse]

[0]

[Timestamp] = 2008-05-20T03:52:02Z

[Ack] = Success

[CorrelationID] = 492dd73f40166

[Version] = 2.000000

[build] = 576518

[Token] = EC-8NL35362A2714091A

There seems to be no problem at all. Please refer to install guide if you don't want to get Every Transaction Dumping Email.

Share this post


Link to post
Share on other sites
There seems to be no problem at all. Please refer to install guide if you don't want to get Every Transaction Dumping Email.

 

But the issue is Connection timed out under www.xxx.com/express_checkout.php

 

Would you please give some advise asap?

 

Thanks & Best Regards,

Share this post


Link to post
Share on other sites
php code has nothing to do with connection problems. Please ask your host for help.

Share this post


Link to post
Share on other sites

Hi Alex,

 

Great contribution btw. Just would like to double check something with you regarding the Paypal IPN dump email. My shopping cart is in MYR(Malaysian Currency) i have set the following options within paypal to accept payments in other currencies and convert to USD which is the currency set for both test merchant and buyer accounts.

 

Though the transactions are going through completed I am getting this below on the dump (bold text):

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 3.19)]
[b]Total amount did not match
Address status: unconfirmed[/b]

OrderTotal= MYR 10.28

 

As well as on my admin orders page:

PayPal IPN Verified
[Completed (PayPal account:Verified; USD 3.19)] --> though it has converted the amount to usd correctly
Total amount did not match
Address status: unconfirmed

 

Sorry I am not sure exactly what is the correct output of the IPN email dump. Is this something I should be worried about? as in would that be a problem with the transaction through IPN? If you could kindly explain what it means it would be much appreciated.

 

Thanks alot

Share this post


Link to post
Share on other sites
There is a bug in the ipn.php where it checks the order total with the payment amount if you have some complicated currencies setup. It's redundant and I have posted in this thread about how to comment off the checking. Please search for it.

Share this post


Link to post
Share on other sites

 

Hi Alex,

 

Thanks for replying so quickly, I have actually did the fix in the ipn.php searched on one of your threads. Its not displaying in admin anymore but still is in the email labelled:

PayPal EC IPN Error

[Completed (PayPal account:Verified; USD 3.19)]
Toatl amount did not match
Address status: unconfirmed

 

But the IPN contribution is fine right? Theres no problems with the transactions going back and forth at all in the long term? Sorry just double checking before going live.

 

 

Another question is if I would like to change anything on the language file do I have to reinstall the paypal IPN to show the changes?

Thanks alot :)

Edited by potatocake

Share this post


Link to post
Share on other sites

Hi all,

I just finished installing paypal_express_checkout_IPN_v0.4.1

 

ALL the files are properly uploaded in their respective locations as instructed; new files have been added and the required files have been modified.

 

At a glance everything works but when a transaction is attempted I get the error:

 

PayPal Express Checkout IPN module installation incomplete! There should be XML files located in [blah blah blah] /store//catalogincludes/ec_xml/ !

 

I've done my fair amount of research on the topic.

 

My host is Netfirms, and the Register Globals are turned on.

My configure.php looks like this (and has the final '/' ) :

 

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://canadabicycleparts.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://secure.sslpowered.com/canadabicycleparts.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'canadabicycleparts.com');
 define('HTTPS_COOKIE_DOMAIN', 'secure.sslpowered.com');
 define('HTTP_COOKIE_PATH', '/store//catalog/');
 define('HTTPS_COOKIE_PATH', '/store//catalog/');
 define('DIR_WS_HTTP_CATALOG', '/store//catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/store//catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'MYSQLHOST'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'u70433059');
 define('DB_SERVER_PASSWORD', '41b9f3');
 define('DB_DATABASE', 'd60393742');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

Like I said, all files are there I can see them.

 

Any ideas ????????

Thanks so much!

Share this post


Link to post
Share on other sites

After countless trial and error checks.....double checking the installation, configuration, server settings, permissions, I had a thought.

I also had the money order module installed. I unistalled it and voila, everything works A1.

Edited by yacpro13

Share this post


Link to post
Share on other sites

Does this contribution allow clients to have a shipping address different from the billing address?

Share this post


Link to post
Share on other sites

Hi

I would like some help please.

I have just installed this module and am getting the following.

Select item

go to checkout

select delivery details (which includes shipping charge)

order confirmation - select paypal (get success dump email)

Login to paypal

select continue (get success dump email)

returns to delivery details!

confirm again

paypal again

back to shop

displays payment information screen with

"PayPal returned invalid or incomplete data to complete your order. Please try again or select an alternate payment method."

 

Any ideas?

Thanks

Share this post


Link to post
Share on other sites
Please provide more info such as the error dump email (with personal info removed) and/or the PayPal Error code/message.

Share this post


Link to post
Share on other sites

Hi Alex

I do not get an error dump email ( there is a success on the way to paypal).

Where do I find Paypal error code/messages? nothing is displayed.

 

Pete

Share this post


Link to post
Share on other sites
Did you pass the diagnostics.php test?

Share this post


Link to post
Share on other sites

Hi Alex

Yes but:

1. I get 404 if I try running it as https://xxxxx.co.uk/ec_diagnostics.php

2 just running at as xxxxxx.co.uk/ec_diagnostics.php Success except for store does not have an SSL certificate installed

 

Pete

Edited by strider34

Share this post


Link to post
Share on other sites
You got redirected to checkout_payment.php page when returning from PayPal because there was something wrong fetching the payer's detail, and there should be an error message returned from PayPal. The error dump email with 'PayPal EC Error Dump' subject should have been sent if you've set it up correctly. Edited by AlexStudio

Share this post


Link to post
Share on other sites

Hi Alex

I am guessing I have the setup right for error dump because I set it to send every transaction which is working.

Here is the success email when going to paypal:

 

In function: pre_confirmation_check()

Response from PayPal:

 

[security] = N/A

[RequesterCredentials]

[0]

[Credentials]

[0]

[username] = N/A

[Password] = N/A

[subject] = N/A

 

[setExpressCheckoutResponse]

[0]

[Timestamp] = 2008-06-12T07:42:15Z

[Ack] = Success

[CorrelationID] = e7caeca3dc58d

[Version] = 2.000000

[build] = 600904

[Token] = EC-5X8203055P4376052

 

 

 

>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]xxxxxxxxxxx[/username]

[Password]xxxxxxxx[/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]3.85[/OrderTotal]

[ReturnURL]http://www.xxxxx.co.uk/express_checkout.php[/ReturnURL]

[CancelURL]http://www.xxxxxx.co.uk/checkout_payment.php?payment_error=paypal_ec[/CancelURL]

[ReqConfirmShipping]1[/ReqConfirmShipping]

[NoShipping]0[/NoShipping]

[AddressOverride]0[/AddressOverride]

[LocaleCode]US[/LocaleCode]

[PageStyle]PayPal[/PageStyle]

[Address]

[Name]xxxxxxx/Name]

[street1]xxxxx[/street1]

[street2][/street2]

[CityName]xxxxxxx[/CityName]

[stateOrProvince]xxxxxxxx[/stateOrProvince]

[PostalCode]xxxxxxxx[/PostalCode]

[Country]GB[/Country]

[Phone]xxxxxxxx[/Phone]

[/Address]

[buyerEmail]xxxxxxxxx[/buyerEmail]

[/setExpressCheckoutRequestDetails]

[/setExpressCheckoutRequest]

[/setExpressCheckoutReq]

[/soap:Body]

[/soap:Envelope]

Share this post


Link to post
Share on other sites
The only reason for getting redirected to payment page without any error message is the session problem. The token was lost when you returned from PayPal. Please make sure you have sessions setup properly, and if possible, turn register globals on. Since you don't have an SSL, you can try 'Force Cookies Usage'.

Share this post


Link to post
Share on other sites

Hi Alex

I really appreciate your help but I am struggling!

I have set force cookies on.

Sessions appear to be working but I am not sure what to check.

The reason for installing your module is because the server got upgraded at the weekend to php5 and so on Monday morning I had to fix various things to get the site running.

Amongst other things the server now has register globals off so I have added

php_flag register_globals on to the .htaccess files in /var/www/html and /var/www/html/includes.

I also modded files according to the contrib "Register Globals Off Workaround for PHP4 and PHP5".

That seemed to get everything going except that the paypal module (unknown origin, I did not create site) happily took money but returned no information about what they had bought.

I then installed the paypal official express checkout which worked fine apart from overriding the shipping which was no good.

Then I tried another module which fell over.

So after much more research found your contribution which looked good and well supported.

 

Any more suggestions please?

Best Regards

Pete

Share this post


Link to post
Share on other sites

Hello Alex,

 

Well i got to say..great coding and easy to use contribution. Simply add to request my API certificate from my old sandboy accoubnt and it worked like a charm.

 

I do however have a couple of comments/requests.

I so far used the original PayPal IPN mod with the flow we all know and a specific checkout_success page. This used to be a pain and not compatible with some other mods, but welll, to worked and customer payed :) However, one bit of functionality also came with the original contribution, which I think is required on the express checkout one:

The notification was also storing the paypal fee on the database! A quiet neat layout box with the paypal logo would also show on the order (if paid by paypal), and this was containing the gross paid , fee, status and also a link to more details.

 

Would it be easy to include this features? Knowing the paypal fee is of great importance when doing the monthly account.

 

Are you planning on doing this? And if not, could you provide me with pointer as to where to look to make this changes?

I will also look into making this compatible with the GV mod (I think u already work on this), and the PWA mod .. .should be fun :)

 

Thanks

Share this post


Link to post
Share on other sites

The issue I am having is Web payments pro is working jsut fine using the API signature. But my customer also want to use paypal express checkout. When I enable the express checkout module and attemp to use it. I get a page not fount (404 error) for the checkout_confirmation.php. But if i use just the web payments pro the checkout_confirmation.php workds just fine.

 

Any thoughts to what would cause this?

Share this post


Link to post
Share on other sites

Hi Alex,

 

I hope you can help me - been using the module fine for 6months or so - then 12 hours ago however we started getting masses of complaints from customers they are getting the following error and log below. I tried doing the checkout with a test out and couldn't replicate the problem!!!

 

 

Hope you can help!

Kind Regards

John____________

 

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

An error occured when we tried to process your payment. Please contact the store owner for assistance.

 

Invalid Data (10413)

The totals of the cart item amounts do not match order amounts.''

 

 

 

 

In function: before_process()

Response from PayPal:

 

[security] = N/A

[RequesterCredentials]

[0]

[Credentials]

[0]

[username] = N/A

[Password] = N/A

[subject] = N/A

 

[DoExpressCheckoutPaymentResponse]

[0]

[Timestamp] = 2008-06-26T20:07:44Z

[Ack] = Failure

[CorrelationID] = 77e3f98ea92cc

[Errors]

[0]

[shortMessage] = Invalid Data

[LongMessage] = The totals of the cart item amounts do not match order amounts.

[ErrorCode] = 10413

[severityCode] = Error

 

[Version] = 2.000000

[build] = 600904

[DoExpressCheckoutPaymentResponseDetails]

[0]

[PaymentInfo]

[0]

[TransactionType] = none

[PaymentType] = none

[PaymentStatus] = None

[PendingReason] = none

[ReasonCode] = none

 

 

 

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]xxxxx[/username]

[Password]xxxxx[/Password]

[/Credentials]

[/RequesterCredentials]

[/soap:Header]

[soap:Body]

[DoExpressCheckoutPaymentReq xmlns=urn:ebay:api:PayPalAPI]

[DoExpressCheckoutPaymentRequest]

[Version xmlns=urn:ebay:apis:eBLBaseComponents]2.0[/Version]

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

[PaymentAction]Sale[/PaymentAction]

[Token]EC-4E8757012L507735G[/Token]

[PayerID]KB5WM3DTD7CX8[/PayerID]

[PaymentDetails]

[OrderTotal currencyID=AUD]36.99[/OrderTotal]

[OrderDescription]Order placed on June 27, 2008, 6:07 am by xxxxxx)[/OrderDescription]

[itemTotal currencyID=AUD]26.99[/itemTotal]

[shippingTotal currencyID=AUD]10[/shippingTotal]

[HandlingTotal currencyID=AUD]-3.36[/HandlingTotal]

[TaxTotal currencyID=AUD]3.36[/TaxTotal]

[NotifyURL]https://www.jja-entertainment.com.au/ext/modules/payment/paypal_ec/ipn.php?language=english[/NotifyURL]

[Custom]Phone: -- Email: xxxxx[/Custom]

[shipToAddress]

[Name]xxxx[/Name]

[street1]xxxx[/street1]

[street2][/street2]

[CityName]xxxx[/CityName]

[stateOrProvince][/stateOrProvince]

[PostalCode]xxxxx[/PostalCode]

[Country]Xx[/Country]

[/shipToAddress]

[PaymentDetailsItem][Name]xxxxx[/Name][Number]21671 (790)[/Number][Amount currencyID=AUD]24.54[/Amount][Quantity]1[/Quantity][Tax currencyID=AUD]2.45[/Tax][/PaymentDetailsItem]

[/PaymentDetails]

[/DoExpressCheckoutPaymentRequestDetails]

[/DoExpressCheckoutPaymentRequest]

[/DoExpressCheckoutPaymentReq]

[/soap:Body]

[/soap:Envelope]

Share this post


Link to post
Share on other sites

is an SSL a must for this to work?

 

everything passed in the diagnostics, except the SSL. Also getting a blank checkout page.

 

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]xxx[/username]

[Password]xxx[/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=USD]0.01[/OrderTotal]

[ReturnURL]http://travelcardpr.com/cart/catalog/express_checkout.php[/ReturnURL]

[CancelURL]http://travelcardpr.com/cart/catalog/ec_shipping.php?address_error=0[/CancelURL]

[ReqConfirmShipping]1[/ReqConfirmShipping]

[NoShipping]0[/NoShipping]

[AddressOverride]0[/AddressOverride]

[LocaleCode]US[/LocaleCode]

[PageStyle]PayPal[/PageStyle]

[Address]

[Name]xxx[/Name]

[street1]xxx[/street1]

[street2][/street2]

[CityName]xxx[/CityName]

[stateOrProvince]xxx[/stateOrProvince]

[PostalCode]xxx[/PostalCode]

[Country]xxx[/Country]

[Phone]xxx[/Phone]

[/Address]

[buyerEmail]xxx[/buyerEmail]

[/setExpressCheckoutRequestDetails]

[/setExpressCheckoutRequest]

[/setExpressCheckoutReq]

[/soap:Body]

[/soap:Envelope]

 

Thanks =)

Share this post


Link to post
Share on other sites
Hi Alex

I really appreciate your help but I am struggling!

I have set force cookies on.

Sessions appear to be working but I am not sure what to check.

The reason for installing your module is because the server got upgraded at the weekend to php5 and so on Monday morning I had to fix various things to get the site running.

Amongst other things the server now has register globals off so I have added

php_flag register_globals on to the .htaccess files in /var/www/html and /var/www/html/includes.

I also modded files according to the contrib "Register Globals Off Workaround for PHP4 and PHP5".

That seemed to get everything going except that the paypal module (unknown origin, I did not create site) happily took money but returned no information about what they had bought.

I then installed the paypal official express checkout which worked fine apart from overriding the shipping which was no good.

Then I tried another module which fell over.

So after much more research found your contribution which looked good and well supported.

 

Any more suggestions please?

Best Regards

Pete

 

Thanks to Gorf the answer is:

Just use the session.php files (catalog and admin) from the 2.2rc2a download (along with what was already installed from this contribution) and everything looks good.

 

Pete

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now