Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Express Checkout IPN Payment Module


AlexStudio

Recommended Posts

I have done every thing it says and it come up with this error

 

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

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

 

And on the ec_diagnostics.php page it has the quote bellow and is that all ok for it to work.

 

Paypal Express Checkout API

 

Diagnostics Program

 

Re-wrote for PayPal Express Checkout IPN

by AlexStudio

Original code for PayPal Website Payment Pro

by Brian Burton (dynamoeffects)

Basic Tests

Using at least PHP 4.3.0? Yes

Is OpenSSL installed? Yes

Does your store have an SSL certificate (shared/dedicated) installed and working? No

Is cURL installed? Yes

Does cURL work? (Simple HTTP test) Yes

API Certificate installed? Yes

API Username in place? Yes

API Password in place? Yes

XML Document "doExpressCheckout.xml" exists? Yes

XML Document "getExpressCheckoutDetails.xml" exists? Yes

XML Document "setExpressCheckout.xml" exists? Yes

XML Document "diagnostics.xml" exists? Yes

Advanced Diagnostics

Live server

Able to connect to PayPal through cURL? No

Error received: 58: unable to use client certificate (no key found or wrong pass phrase?)

Received a valid response? Yes

Did PayPal respond without errors? (If not, errors are below) Yes

Success!

 

Congratulations! This contribution appears to be correctly installed on your store!

 

Please note that if you're still having problems with your installation, it is most likely because you didn't completely integrate all of the code.

WARNING!! DO NOT keep this script in your host after use.

Keeping this diagnostics script in host could lead to possible security breaches!!

Edited by jnbits
Link to comment
Share on other sites

  • Replies 405
  • Created
  • Last Reply

Top Posters In This Topic

Able to connect to PayPal through cURL? No

Error received: 58: unable to use client certificate (no key found or wrong pass phrase?)

This error is fatal. Most likely you have downloaded a wrong certificate, or the username/password/certificate don't match.

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

You have a wrong API certificate. Please follow the install guide to download your API certificate at PayPal.

 

Content of the API certificate should read like this:

-----BEGIN RSA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QYDVQQD
FBJzYW5kYm94X2NhbWVyY2hhcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5j
b20wHhcNMDcwMTA1MTYyNjU4WhcNMTcwMTAyMTYyNjU4WjBHMRowGAYDVQQDFBFh
YWJiX2FwaTEuYWJjLmNvbTEPMA0GA1UEBxMGY2NjY2NjMQswCQYDVQQIEwJNRDEL
MAkGA1UEBhMCVVMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMbSIqQwxjJT
9EzgxzSWgIaQ2TCb1VN2ixm19gx4WnjR9vhVa9e1R4EVyfjv1kDHUSbfMekgzDX2
CssXn8KW7v8Od+sr966bBPpovAhmCmRZj/0U7KSVvcyUNoBCXo7hhgxWLADSZmfb
bHyYtRuzvbNPdDfn3XVKPeNc/vy0EyM/AgMBAAGjDTALMAkGA1UdEwQCMAAwDQYJ
KoZIhvcNAQEFBQADgYEAalDnDZR+vovk06GZdqnMChm24EyTdkmzWRdV9ZHl3XzE
As+fWKsP/BnTHNnOURGMY9q/As7AWnvqhq6mTpn1PX+cnlR21mwEnHAYr5LpmCKJ
KpMWMt6hXorDTk2SQbQOj1kKBMR+LwqNZaErB/D0Lnjdee77RzzXbfXRaeHVWBQ=
-----END CERTIFICATE-----

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 your setting is pointing at the wrong file.

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 v0.4.2 update ready, but need someone to test it with CCGV before releasing.

If you have CCGV installed and want to test v0.4.2, please PM me. I will send you a copy for testing. Please include in the PM which version of CCGV installed.

And make sure your server mets the requirements:

  • osCommerce 2.2ms2
  • PHP 4.3.0+
  • cURL

A PayPal premier or business account is required as well.

 

 

Hi Alex

 

In the osCommerce IPN thread you offered me the CCGV friendly version to beta test for you

Unfortunately my hosts for that project have just told me the php version is only 4.1.2

Curl version is 7.9.5

The store build underway is on the mid-July version of RC1

The PayPal account for the project is verified business account

 

I'd like to be able to get a working IPN without having to rip-out the CCGV(Trad) that is installed (feeling lazy about the prospect of having to do that :-" )

 

Is the php version critical to the operation of the contrib?

 

(Edit to add here instead of the other IPN thread)

 

The PayPal/Yahoo offer is of no interest or use as the store owner-to-be is not USA resident (one of the criteria for it) and the PayPal account for the project is a UK account.

 

Of serious concern though, is that in the 29 Jan 07 v0.4 update, you added -

- Added to reject shipping to a country different than the one registered in payer's PayPal account.

 

The project in question will be shipping a lot of product to expatriates (living / working outside their home country) - most, if not all, of these will have their PayPal account set up in their home country, but want goods delivered to where they are living & working.

 

Another group this will affect are Armed Forces personnel serving overseas - this project has one product in particular in extremely high demand for coalition forces in Afghanistan and Iraq (most sales right now are via eBay and the fees are getting ludicrous over there).

 

Any chance to make this (reject shipping to a country different than the one registered in payer's PayPal account) an admin-screen choice for the store owner?

 

Gaz

Edited by totalnumpty

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

I think this contribution probably will work with your server, but need to test it to be sure.

 

When using Express Checkout API, PayPal doesn't allow shipping to a different country than registered in payer's account, but there is an option added in v0.4 to bypass shipping address so the transactions still work. However, bypassing shipping address will make the payments not eligible for seller protection policy.

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

OK - let me know if the php version works out (v4.1.2) they've said they intend to upgrade as soon as they can allocate resources and a maintenance slot - if i hear from them before you finish testing, I'll let you know.

 

I'm particularly keen to have this running with CCGV(Trad) - can't give you a definitive version as the download has such a hodge-podge of versioning in the instructions "root" folder when extracted - it could be anywhere between 21 May 2007 and 12 April 2006 (the user guide is dated 22 May 2007 and is the newest file in the set)

 

Quite happy to worth through beta testing and bug fixing with you on this under the server config I'm using with RC1, however, this particular host does not have cpanel installed and I'm having a pig of a job getting an FTP client to maintain stable operations with the hosted space (keeps refusing to LIST the target - suspect there's a permissions issue, but until I can FTP in, I can't fix it, therefore have to rely on Windows Explorer "my network places" style connections for file transfers).

 

Gaz

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

Help!!

 

We're having a very frustrating problem where everything seems to go fine then clicking the final pay button to submit payment results in a redirection back to the oscommerce login screen.

 

Everything else works fine including the redirection to paypal then being redirected back with an updated shipping address it is only at the final stage that rather than the ordeer being compelted we get redirected back to the login page to start over again.

 

Any ideas?

 

 

John

Link to comment
Share on other sites

Hi AlexStudio,

 

in the ec_diagnostics.php

i got all yes except:

Does your store have an SSL certificate (shared/dedicated) installed and working? No

 

And it says:

===================================================

Success!

Congratulations! This contribution appears to be correctly installed on your store!

Please note that if you're still having problems with your installation, it is most likely because you didn't completely integrate all of the code.

===================================================

 

Is it ok if i don't have SSL in my website?

 

 

Acutally, i install this module and sucess. I go though the process also OK. It can checkout and create order. But i can't find the payment in paypal account. It seems success in the website but can't get the payment.

 

Another question, i set the Set Completed Order Status is Pending, but it shows process when new order arrival.

 

Thank you very much.

Link to comment
Share on other sites

The problem you got seems to be the cookies/sessions settings. Please search in the general support forum for how to properly setup cookies/sessions. If you don't want to use cookies, you need to modify 3 instances of
$this->form_action_url = FILENAME_CHECKOUT_PROCESS;

in catalof/includes/modules/payment/paypal_ec.php and change them to

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

 

Yes it works without SSL. If you test in sandbox, the payment goes to the account in sandbox. If you really can't find your payments, you need to talk with PayPal. You probably modified the orders status IDs after PayPal EC IPN installed. You need to remove PayPal EC IPN and install again in admin, so it can catch up with the new IDs.

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 AlexStudio,

 

Thanks alot for your reply.

 

I have update the files but the same problem occurs.

I test it in live server and 2 real paypal account.

I have 2 paypal account, 1 for customer and 1 for shop.

After check out, it shows sucess but no payment in these 2 paypal account.

Also, i found that the order status is process (no matter i set it to pending) and the following data are null:

Transaction ID:

Payment Type:

Payment Status:

 

Do you have any idea?

 

Thank you again for your help.

Link to comment
Share on other sites

Is your php register globals set to off?

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 Alex

 

Since last swapping info with you, I've read that CCGV does'nt work with either volume pricing discounts or SPPC - therefore I've just finished ripping out the files and will stick with the other IPN.

 

But I could do with a nudge on something - how do I get the CCGV tables out of the database ..... keep it simple, I'm a total numpty :lol: :-" I assume I have to use the phpMySQL control panel somehow?

 

Gaz

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

Are you using osCommerce 2.2RC1? What PHP, cURL and mySQL version do your have in your server? Please turn on the debug options including the successful transactions dumping. I need more info to find it 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

Hi AlexStudio,

 

I think i find out the reason, because i am not using osCommerce 2.2RC1

I need to update the checkout_process.php to fit your module.

I will try to update it.

 

Thank you very much for your help.

 

I hope i can solve it.

Link to comment
Share on other sites

Hi AlexStudio,

 

I am using the old version of OSC (Creloaded 5.0),

After add the following code in checkout_process.php , it solve my problem.

 

// BOF PayPal Express Checkout IPN v0.4 beta

if((MODULE_PAYMENT_PAYPAL_EC_STATUS == 'True')&&($payment == 'paypal_ec') ){

$payment_modules->before_process();

}

// EOF PayPal Express Checkout IPN v0.4 beta

 

 

It's hard for me to solve this problem without your help.

Again, thank you very much for your help and suggestion.

Also, thank you very much for your module.

Link to comment
Share on other sites

Could anybody confirm if this one works in 2.2RC1?

 

Yes. I am running osCommerce 2.2 RC1 with this module installed. I have only tested it with PayPal sandbox, however, as my site is not yet "live."

 

The only problem I have come across is if the order total is 0.00, it will show an error result from PayPal saying there is an invalid order total. I have a Points/Rewards module installed and an order total could be 0.00 if a customer uses points to pay for their entire order. Therefore, I had to modify this contribution just slightly to get around that problem. But, this error was due to mixing contributions (and the fact that PayPal won't accept 0.00 order totals). On its own it works great in RC1.

 

Thank you AlexStudio for an excellent contribution!

Link to comment
Share on other sites

Thank you KaleiDesigns for reply and that you AlexStudio for great contribution.

 

Yes. I am running osCommerce 2.2 RC1 with this module installed. I have only tested it with PayPal sandbox, however, as my site is not yet "live."
Link to comment
Share on other sites

  • 2 weeks later...

I ended up discovering and implementing this change and got the checkout working.

 

However - we now seem to routinely have customers who are unable to complete checkout when selecting paypal they get redirected back to the beginning of the checkout.

 

From our testing we've found that quitting the web browser and reattempting the order without selecting paypal fixes the problem.

 

Do you have any other ideas as to what the problem may be?

 

Thanks,

John

 

Hi AlexStudio,

 

in the ec_diagnostics.php

i got all yes except:

Does your store have an SSL certificate (shared/dedicated) installed and working? No

 

And it says:

===================================================

Success!

Congratulations! This contribution appears to be correctly installed on your store!

Please note that if you're still having problems with your installation, it is most likely because you didn't completely integrate all of the code.

===================================================

 

Is it ok if i don't have SSL in my website?

Acutally, i install this module and sucess. I go though the process also OK. It can checkout and create order. But i can't find the payment in paypal account. It seems success in the website but can't get the payment.

 

Another question, i set the Set Completed Order Status is Pending, but it shows process when new order arrival.

 

Thank you very much.

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