Jump to content
AlexStudio

PayPal Express Checkout IPN Payment Module

Recommended Posts

I seem to be going around in a loop here. Currently i am only testing on Sandbox.

 

I checkout, i get directed to the PayPal site, put in my PayPal username/password, i get directed back to my website and then when i click the PAY button, i get my username/password box screen as if am logging back into my account (website account).

 

Does this work with shared SSL?

 

Thanks

Hi, I seem to be having the same problem, except i've got full control of the server and openssl/apache php etc.

 

I have created and installed a test certificate from thawte on our development machine. https works OK with apache.

 

The module is configured correctly with my sandbox API credentials and certificate.

 

'https://my_development_host/catalog/ec_diagnostics.php' shows that OpenSSL was not detected.

 

How is this possible?

Can someone shed some light on this please?

 

Thanks

Share this post


Link to post
Share on other sites

Jokaeff Stansfield, the reason ec_diagnostics.php showed 'OpenSSL is not detected' can be varied. It uses getenv('HTTPS') or $_SERVER['HTTPS'] (php version > 4.3) or getenv('SERVER_PORT') to check if the script is loaded in HTTPS mode.

 

If the first method, getenv('HTTPS'), doesn't get a result as 'on' or '1', it switches to check if the php version > 4.3 and uses the 2nd method, $_SERVER['HTTPS'], and see if it match the string 'on' or '1'. If the php version < 4.3, then it switches to the 3rd method and see if the port is 443 (standard SSL port).

 

In your case, if your server doesn't return 'on' or '1' on getenv('HTTPS') and $_SERVER['HTTPS'], the OpenSSL can not be detected. Please check your server and see what you got for the getenv('HTTPS') result.


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.

Share this post


Link to post
Share on other sites
Jokaeff Stansfield, the reason ec_diagnostics.php showed 'OpenSSL is not detected' can be varied. It uses getenv('HTTPS') or $_SERVER['HTTPS'] (php version > 4.3) or getenv('SERVER_PORT') to check if the script is loaded in HTTPS mode.

 

If the first method, getenv('HTTPS'), doesn't get a result as 'on' or '1', it switches to check if the php version > 4.3 and uses the 2nd method, $_SERVER['HTTPS'], and see if it match the string 'on' or '1'. If the php version < 4.3, then it switches to the 3rd method and see if the port is 443 (standard SSL port).

 

In your case, if your server doesn't return 'on' or '1' on getenv('HTTPS') and $_SERVER['HTTPS'], the OpenSSL can not be detected. Please check your server and see what you got for the getenv('HTTPS') result.

This is what my server[Apache/1.3.37 mod_jk/1.2.18 PHP/4.4.4 mod_ssl/2.8.28 OpenSSL/0.9.8b] returns:

 

getenv('HTTPS') and $_SERVER['HTTPS'] -- both return 'on'.

getenv('SERVER_PORT') -- returns '443'

 

I believe it is failing on the following check in ec_diagnostics.php:

 

if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) $ssl_error = false;

else $ssl_error = true;

 

Can you explain what this does and why it may have failed?

 

Cheers

Share this post


Link to post
Share on other sites

OK, i recompiled PHP --with-openssl and the required functions are there.

 

I restarted and tested diagnostics - ALL OK.

 

But the original problem still exists, ie, goes through the paypal process, comes back to 'review and pay', when i click pay it goes to the login.php page?

 

Anybody else experienced this problem?

Share this post


Link to post
Share on other sites

As answered to the post you quoted from, your sessions broke after returned from PayPal pages. Do NOT set 'Force Cookie use' to true if you're not using a dedicated SSL certificate. Please also check your cookie domain and cookie path settings.

 

The 'return URL' doesn't come with a trailing session ID, there for it relies on the cookie. Please make sure your session/cookie settings are good.


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.

Share this post


Link to post
Share on other sites
OK, i recompiled PHP --with-openssl and the required functions are there.

 

I restarted and tested diagnostics - ALL OK.

 

But the original problem still exists, ie, goes through the paypal process, comes back to 'Review your Payment', when i click 'PAY' it goes to the 'login.php' page?

 

Anybody else experienced this problem?

On the express_checkout.php 'Review Your Payment' page, the form action looks like this:

 

<form name="checkout_confirmation" action="checkout_process.php" method="post">

<input type="hidden" name="cmd" value="_express-checkout">

<input type="hidden" name="token" value="EC-8T8435586X638244N">

<input type="hidden" name="useraction" value="continue">

 

Does 'checkout_process.php' need to be modified?

Share this post


Link to post
Share on other sites
As answered to the post you quoted from, your sessions broke after returned from PayPal pages. Do NOT set 'Force Cookie use' to true if you're not using a dedicated SSL certificate. Please also check your cookie domain and cookie path settings.

 

The 'return URL' doesn't come with a trailing session ID, there for it relies on the cookie. Please make sure your session/cookie settings are good.

 

OK, i think i figured it out, as i don't want to use cookies.

 

In 'paypal_ec.php', i modify the following lines:

 

3 instances of:

$this->form_action_url = FILENAME_CHECKOUT_PROCESS;

modify to

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

 

Seems to work fine.

 

Thanks

Share this post


Link to post
Share on other sites
ok. interesting. i think i will use but maybe a future release when it has been tested a little bit more. i did read about paypal express on the paypal site and it sounded quite cool.

 

what sort of files are the 3 that you need to modify and how will that impact the installation of other contributions?

 

thanks for taking the time to respond.

Yhis discussion ha been value to me thanks ... also a simpler question .. how do you access the files for contributions .. ?

David

Share this post


Link to post
Share on other sites

Two problems with shop running the module.

 

I just upgraded to version 0.4.1 but it still has the same issues:

1) customer chooses paypal express as a payment method -

2) from express_checkout.php he decides to change his mind and clicks on EDIT payment info

3) from checkout_payment.php he chooses credit card and inputs CC details

4) click on continue to go to the confirmation page but it still redirects to paypal express_confirmation page

- doesn't matter how many times you click back to change the payment info - it will not allow you to switch it once it was selected, not until new window is open

- same behavior if i click CANCEL from paypal login page to cancel the paypal payment, it takes me back to the checkout_payment.php page saying that i should try again or change payment method, i change payment method but it goes to paypal express again

 

CONFIRMED ADDRESS

in the settings of the module there's an option to Accept Only Confirmed Address Payments, I have it set to Yes, however it never declines my transactions from an unconfirmed address.

 

Please let me know if there's a fix for this or maybe i'm just not using the option properly.

 

Thanks,

Alex.

Share this post


Link to post
Share on other sites
It seems to me that the installation was not completed. The problem exists before you upgraded to v0.4.1, so it's difficult to tell exactly what went wrong. I would suggest you to remove this contribution completely, and then install v0.4.1 directly, not upgrading from early versions.

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.

Share this post


Link to post
Share on other sites

hi there,

can anyone help me out with a question.

 

This paypal module does it default to one language ie english when sent to paypal unlike others it defaults to language of the customer registered country in their address.

 

For example an english expat living in Spain it sends them to paypal in spanish not english.

Share this post


Link to post
Share on other sites

The latest supported languages are:

  • AU
  • DE
  • FR
  • IT
  • GB
  • ES
  • US

To support Spain in this contribution, you need to add it to catalog/includes/modules/payment/paypal_ec.php after line 433:

			case 'es':
		  $lang_code = 'ES';
		  break;

This will be included 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.

Share this post


Link to post
Share on other sites

im just speaking for a lot of people using paypal modules as payment:

 

the issue we are having is that the payment + item title is not being transferred over. Therfore the customer has to input the data manually.

 

what are people suggetsions for the problem?

Share this post


Link to post
Share on other sites

Dean, I don't think your question is relevant to this contribution. This one shows item details and payment amount in the PayPal receipt.


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.

Share this post


Link to post
Share on other sites

I've just installed this contribution and when I click the massive blue 'pay' button it redirects to the login page. There are no install instructions with this contribution so there is really no way to check if I have done everything correctly as using a file-merge program is pretty hard when you have a 9 month old code base with literally hundreds of contributions installed.

 

I don't really care for the 'express checkout' part of this contribution but I seem to remember that paypal insist that merchants show it as a payment option.

 

I think I'm going to uninstall this, try some others and if they are worse come back to this one. This seems to work fine apart from the redirect on the pay button. Maybe I need to use the same email address at paypal as I am using to create the account in oscommerce?

 

Regards,

 

Richard

Share this post


Link to post
Share on other sites
There are no install instructions with this contribution so there is really no way to check if I have done everything correctly as using a file-merge program is pretty hard when you have a 9 month old code base with literally hundreds of contributions installed.
Which contribution were you talking about? There is a install.html covering every detail you need to setup this contribution, and a diagnostics script for testing your installation.

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.

Share this post


Link to post
Share on other sites

I'm talking about:

 

Plaese use file comparing tool like WinMerge to make modifications to

 

catalog/checkout_payment.php

catalog/checkout_shipping.php

 

I found it fairly easy to install this contribution by adding the code between the comments in those files. I don't know if there were any other modifications that were not commented. As I had changed my layout quite a bit I had to convert the added files to match my layout. This was not too much of a problem to put me off.

 

I think there should also be some step-by-step instructions as are found with most other contributions. I think it would make it easier for people who may not be used to using a file comparison program.

 

Have you managed to test this contribution on localhost? I can't seem to get it to work. I receive the dumps by email which say 'success' but I don't get an order because the big blue button redirects to the login.php page. Why would this happen?

 

Since only two files were modified (not including filenames.php) and since I made a backup of these files and I turned off this module in the admin, do you think it would be fine to rename the newly modified versions of these files and replace them with the backups, then if I find a way to make this contribution work I can just switch the files again and everything should be back?

 

I need to check out that diagnostic script I guess.

Edited by psynaptic

Share this post


Link to post
Share on other sites
I think there should also be some step-by-step instructions as are found with most other contributions. I think it would make it easier for people who may not be used to using a file comparison program.
All modified code are well commented. It's easier for 'newbie' store owners this way. For those who have heavily modified their store, it's quite easy to find differences by first comapring the modified files with officail osCommerce release.

 

Have you managed to test this contribution on localhost? I can't seem to get it to work. I receive the dumps by email which say 'success' but I don't get an order because the big blue button redirects to the login.php page. Why would this happen?
The 'success dump' means that the communication between your host (localhost) and PayPal API server is working, but not necessarily the transaction itself. The big blue 'PAY' button redirects you to login page because the session has been dropped. This means your sessions/cookies is not setup correctly, or not working.

 

Since only two files were modified (not including filenames.php) and since I made a backup of these files and I turned off this module in the admin, do you think it would be fine to rename the newly modified versions of these files and replace them with the backups, then if I find a way to make this contribution work I can just switch the files again and everything should be back?
Actually you can leave the modified files without restoring backup files, and remove this module in admin.

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.

Share this post


Link to post
Share on other sites
The big blue 'PAY' button redirects you to login page because the session has been dropped. This means your sessions/cookies is not setup correctly, or not working.

 

I have never had a problem with sessions before until now. Is there anything specific I should be looking at to fix this problem with the 'PAY' button?

 

Actually you can leave the modified files without restoring backup files, and remove this module in admin.

 

Well, I did mean that I was going to try another paypal contribution but I guess I'll leave things as they are for now and install them on a fresh installation.

 

The contribution is working apart from the session problem at the end of checkout. Thanks for all your efforts creating this contribution. I hope I can manage to get it working.

Share this post


Link to post
Share on other sites
I have never had a problem with sessions before until now. Is there anything specific I should be looking at to fix this problem with the 'PAY' button?

Well, I did mean that I was going to try another paypal contribution but I guess I'll leave things as they are for now and install them on a fresh installation.

 

The contribution is working apart from the session problem at the end of checkout. Thanks for all your efforts creating this contribution. I hope I can manage to get it working.

This was all due to working on localhost. Anyone having problems with this contribution when trying to test it on localhost should try it on their hosted server.

 

Alex: Sorry for the hassle.

Edited by psynaptic

Share this post


Link to post
Share on other sites

Hi Alex: According to our paypal account manager, this module does not eligible for "Express checkout promotion" since the promotion require that customs can make payment without log into the ecommerce site. Is it true? Will you have a new release which has PWA feature later on?

 

I installed your module and it 's more stable and reliable then the module be dynamoeffects. However I have to stick with his module for now since it's eligible for "Express checkout promotion".

Share this post


Link to post
Share on other sites
I'm sorry that v0.4.1 is still not eligible for the promotion. PayPal document was not clear enough at the time I tried to make this contribution qualified. I'll put PWA support back into the next update release.

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.

Share this post


Link to post
Share on other sites
I'm sorry that v0.4.1 is still not eligible for the promotion. PayPal document was not clear enough at the time I tried to make this contribution qualified. I'll put PWA support back into the next update release.

Extremely looking forward to it!

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

×