Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Express Checkout IPN Payment Module


AlexStudio

Recommended Posts

PayPal Express Checkout IPN v0.3.1 released

- v0.3.1 :

  • Bug Fixed - The shipping address query from databse didn't work well and cuased in some cases an endless loop between checkout shipping and express checkout. Rewrote the shipping address checking and the endless loop problem fixed.
  • Minor Improvement - Added extra checking in checkout shipping to decide to enable EC IPN or not. Now you can add condition checkings in function update_status().
  • Added to Known Issues section regarding the extra condition checkings.
  • PayPal live server behavior changed and when the payment exceeds the maximum amount allowed, PayPal will reject the payment and send the payer back to store. There for it has been removed from the known issues section in this guide.

Upgrade from v0.3 only need to replace catalog/includes/modules/payment/paypal_ec.php and make few lines of changes in catalog/checkout_shipping.php

 

Please upgrade to it.

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

PayPal released Official osCommerce Pro modules today.

 

It is for website payment pro, but the express checkout API is the same AFAIK. Brian Burton's (dynamoeffects) code is in there. I'm studying the code and will make use of some if I find them useful. Future upgrade of this EC IPN module will base on the offical module, too.

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 was told by Graham at PayPal that the currencies CZK/HUF/PLN are working in live server, and the NZD issue solved as well. I will enable these currencies in the next upgdate.

 

However, testing these currencies in sandbox still has problems. They only work in live server.

 

Alex,

 

I have confirmed that CZK/HUF/PLN are works on the live site. NZD works correctly on live as well.

 

NZD has caused me to not be able to log into my sandbox account so I would test it any more if I was you.

 

I am working with engineering to try to figure out what is cause this problem. We had a similar issue on beta-sandbox so we believe the same thing will fix the sandbox.

 

Best Regards,

-Graham

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

That probably because your previous mistake left an token in session. You can try to continue that process and cancel it once you have a chance, or simply close your browser and kill the session.

 

This can happen if your installation not completed or broken.

 

well unfortunately the addresses used for testing match, so this is not the case....

 

enclosed ill send the debugging-emails if this helps....

 

additional information: using swiss franks, if this could cause problems

 

 

In function: ec_get_detail()

Response from PayPal:

 

[security] = N/A

[RequesterCredentials]-

[0]-

[Credentials]-

[0]-

[username] = N/A

[Password] = N/A

[subject] = N/A

 

[GetExpressCheckoutDetailsResponse]-

[0]-

[Timestamp] = 2007-01-27T19:47:56Z

[Ack] = Success

[CorrelationID] = 4be8734f5fb1c

[Version] = 2.000000

[build] = 1.0006

[GetExpressCheckoutDetailsResponseDetails]-

[0]-

[Token] = EC-64W98870PN6419517

[PayerInfo]-

[0]-

[Payer] = "email-address"

[PayerID] = A2NY7E72N8JTS

[PayerStatus] = unverified

[PayerName]-

[0]-

[salutation] = N/A

[FirstName] = Bruno

[MiddleName] = N/A

[LastName] = Bruno

[suffix] = N/A

 

[PayerCountry] = CH

[PayerBusiness] = N/A

[Address]-

[0]-

[Name] = Bruno Bruno

[street1] = Bruno

[street2] = N/A

[CityName] = Bruno

[stateOrProvince] = N/A

[Country] = CH

[CountryName] = Switzerland

[PostalCode] = 7777

[AddressOwner] = PayPal

[AddressStatus] = Unconfirmed

 

 

 

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

[ebl:Password xmlns:ebl=urn:ebay:apis:eBLBaseComponents]K7SLBZTQFMQSLZG7[/ebl:Password]

[/Credentials]

[/RequesterCredentials]

[/soap:Header]

[soap:Body]

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

[GetExpressCheckoutDetailsRequest]

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

[Token]EC-64W98870PN6419517[/Token]

[/GetExpressCheckoutDetailsRequest]

[/GetExpressCheckoutDetailsReq]

[/soap:Body]

[/soap:Envelope]

 

 

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] = 2007-01-27T19:47:03Z

[Ack] = Success

[CorrelationID] = 14c49d8428b2b

[Version] = 2.000000

[build] = 1.0006

[Token] = EC-64W98870PN6419517

 

 

 

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

[Password]K7SLBZTQFMQSLZG7[/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=CHF]104[/OrderTotal]

[ReturnURL]http://www.xxx.ch/express_checkout.php?osCsid=d5388c6166608d5aaad2f7c275c5c7fa[/ReturnURL]

[CancelURL]http://www.xxx.ch/checkout_shipping.php?address_error=0&osCsid=d5388c6166608d5aaad2f7c275c5c7fa[/CancelURL]

[ReqConfirmShipping]0[/ReqConfirmShipping]

[NoShipping]0[/NoShipping]

[AddressOverride]0[/AddressOverride]

[LocaleCode]US[/LocaleCode]

[PageStyle]PayPal[/PageStyle]

[Address]

[Name]Bruno Bruno[/Name]

[street1]Bruno[/street1]

[street2][/street2]

[CityName]Bruno[/CityName]

[stateOrProvince][/stateOrProvince]

[PostalCode]7777[/PostalCode]

[Country]CH[/Country]

[Phone]081 302 24 29[/Phone]

[/Address]

[buyerEmail]"email"[/buyerEmail]

[/setExpressCheckoutRequestDetails]

[/setExpressCheckoutRequest]

[/setExpressCheckoutReq]

[/soap:Body]

[/soap:Envelope]

Edited by a.niedermann
Link to comment
Share on other sites

I upgrade to the new IPN but I still keep getting this error.

 

An error occured when we tried to establish a connection to PayPal's servers.<br><br>

 

Can someone give me some direction on where to look.

 

Thanks

 

David

 

http://www.tranquilsense.com

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

Will this mod work in Canada?

Yes, it wokrs in any countries PayPal supported.

 

There seemed no response from PayPal in your request. Please check if your host needs to go through a proxy server for cURL to work.

Edited by AlexStudio

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

well unfortunately the addresses used for testing match, so this is not the case....

 

enclosed ill send the debugging-emails if this helps....

 

additional information: using swiss franks, if this could cause problems

Ok, the shipping address problem fix in v0.3.1 still doesn't work well in some cases. PayPal tended to send back a different address Name and capitalized state code which causes the shipping address matching failed.

 

This has been fixed in v0.4, and the new package will be uploaded very soon.

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 checked and I do not have a proxy go through.

Edited by tranquilsense

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

I checked and I do not have a proxy go through.

OK, which gateway are you testing with? Live or Sandbox?

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 tried both

Then this must be something with your host's cURL and PHP setup. In your case, you have the certificate file located, cURL functions checked, XML files found, but no response from PayPal servers.

 

Please show me your PHP.ini settings via PM, I need to dig further into it to see what went wrong.

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

Then this must be something with your host's cURL and PHP setup. In your case, you have the certificate file located, cURL functions checked, XML files found, but no response from PayPal servers.

 

Please show me your PHP.ini settings via PM, I need to dig further into it to see what went wrong.

 

No Problem.

 

The certificate file.

this is a txt file with the api signature pasted in it?

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

No Problem.

 

The certificate file.

this is a txt file with the api signature pasted in it?

NO.

 

This module needs the certificate downloaded from API Access page at PayPal, not the Signature. You need to follow the pre-install preparation in install guide and remove your signature, then request for Certificate.

 

Please let me know if this works in your PHP 5.x enviroment.

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

NO.

 

This module needs the certificate downloaded from API Access page at PayPal, not the Signature. You need to follow the pre-install preparation in install guide and remove your signature, then request for Certificate.

 

Please let me know if this works in your PHP 5.x enviroment.

 

Thanks I will try

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

Thanks I will try

 

 

We have success. It works. (helps if I read this fully)

 

The sandbox did not work, but the live setting does.

 

Great.

 

:thumbsup:

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

PayPal Express Checkout IPN Payment Module v0.4 released.

 

- v0.4 :

  • Bug Fixed - The shipping address fix in v0.3.1 still didn't work well. PayPal tended to send back different address Names and capitalized state code, which caused the address checking fail in some cases. Re-wrote the address checking code and now if the address found in database, it will use the name in databse rather than the one PayPal sent back.
  • Added a new file catalog/ec_shipping.php to cut down modifications in checkout_shipping.php to minimum. Now the Express Checkout Button flow changed to show only the EC button and a continue button (normal checkout flow) prior to shipping method selection.
  • Changed express_checkout.php to pick up the order and shipping conditions prior to enable EC IPN module, for condition checkings to work properly.
  • Added to reject shipping to a country different than the one registered in payer's PayPal account.
  • Added multi-language support for IPN to load the customer's language file to be used with the notification email. (IPN bug fixed by Terra)
  • All 16 'supported' currencies now enabled in the code.

Please report bugs/issues/problems in this thread.

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 Express Checkout IPN Payment Module v0.4 released.

 

- v0.4 :

  • Bug Fixed - The shipping address fix in v0.3.1 still didn't work well. PayPal tended to send back different address Names and capitalized state code, which caused the address checking fail in some cases. Re-wrote the address checking code and now if the address found in database, it will use the name in databse rather than the one PayPal sent back.
  • Added a new file catalog/ec_shipping.php to cut down modifications in checkout_shipping.php to minimum. Now the Express Checkout Button flow changed to show only the EC button and a continue button (normal checkout flow) prior to shipping method selection.
  • Changed express_checkout.php to pick up the order and shipping conditions prior to enable EC IPN module, for condition checkings to work properly.
  • Added to reject shipping to a country different than the one registered in payer's PayPal account.
  • Added multi-language support for IPN to load the customer's language file to be used with the notification email. (IPN bug fixed by Terra)
  • All 16 'supported' currencies now enabled in the code.

Please report bugs/issues/problems in this thread.

 

Dear Mr. Alex,

 

Thanks for posting this new version.

 

This version is working fine [in the SandBox] even without implementing your modifications to our existing checkout_shipping.php. We do not want to modify this file as that process gets skipped in our Live Store if the total weight is "0". Kindly confirm that it [not modifying checkout_shipping.php] would not affect the other functions of this "PayPal Express Checkout IPN Payment Module".

 

Thanking you,

 

Lakshmanan S.

Link to comment
Share on other sites

Dear Mr. Alex,

 

Thanks for posting this new version.

 

This version is working fine [in the SandBox] even without implementing your modifications to our existing checkout_shipping.php. We do not want to modify this file as that process gets skipped in our Live Store if the total weight is "0". Kindly confirm that it [not modifying checkout_shipping.php] would not affect the other functions of this "PayPal Express Checkout IPN Payment Module".

 

Thanking you,

 

Lakshmanan S.

Yes it works. If you don't need the Express Checkout Button, you don't need to modify checkout_shipping.php.

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

A quick inquiry:

 

When a customer goes to check out they come to a screen where it gives an option to pay first and then select a shipping method later.

 

Why would you want to do this?

 

To me Would you not want all $$ in the price for the user to pay ??

 

(Sorry for the silly question)

 

Thanks

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

A quick inquiry:

 

When a customer goes to check out they come to a screen where it gives an option to pay first and then select a shipping method later.

 

Why would you want to do this?

 

To me Would you not want all $$ in the price for the user to pay ??

 

(Sorry for the silly question)

 

Thanks

You're asking about the Button Checkout Flow, it sends customers to PayPal before selecting shipping address and method, but it's not my idea. It is required by PayPal API, to put the button in the first step of checkout. However, if you don't like it, or you don't need to be eligible for the promotion, you can disable the button in admin.

 

The shipping cost will be added after the customer return from PayPal, and the final price includes everything. If the customer changed the shipping address or shipping method after return from PayPal, the shipping cost will be updated before the final transaction request sent out.

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

So it just checks the user has a paypal account before it goes an further?

Edited by tranquilsense

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

So it just checks the user has a paypal account before it goes an further?

It sends customers to PayPal to authorize the payments, and then back to store to review the payments and pay in store.

 

There is no total amount shown at PayPal page, the final total amount only shown in the review payment page in store.

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

It sends customers to PayPal to authorize the payments, and then back to store to review the payments and pay in store.

 

There is no total amount shown at PayPal page, the final total amount only shown in the review payment page in store.

 

 

Perfect

 

Thanks

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

PayPal Express Checkout IPN Payment Module v0.4 released.

 

- v0.4 :

  • Bug Fixed - The shipping address fix in v0.3.1 still didn't work well. PayPal tended to send back different address Names and capitalized state code, which caused the address checking fail in some cases. Re-wrote the address checking code and now if the address found in database, it will use the name in databse rather than the one PayPal sent back.
  • Added a new file catalog/ec_shipping.php to cut down modifications in checkout_shipping.php to minimum. Now the Express Checkout Button flow changed to show only the EC button and a continue button (normal checkout flow) prior to shipping method selection.
  • Changed express_checkout.php to pick up the order and shipping conditions prior to enable EC IPN module, for condition checkings to work properly.
  • Added to reject shipping to a country different than the one registered in payer's PayPal account.
  • Added multi-language support for IPN to load the customer's language file to be used with the notification email. (IPN bug fixed by Terra)
  • All 16 'supported' currencies now enabled in the code.

Please report bugs/issues/problems in this thread.

 

 

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.

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...