Jump to content
Sign in to follow this  
aarsenca

Testing Paypal sandbox IPN on localhost

Recommended Posts

I've been trying for a couple of days to figure out how to test IPN on a Windows XP localhost PC. I read several posts on the subject and I just can't find what I'm doing wrong, unless this is just not possible.

 

I am running OSC 2.2RC2 with WAMP on a Windows XP computer which is behind a firewall. I have opened ports 80 and 343 (for SSL?) and directed them to this PC (192.168.0.100).

 

I installed the standard OSC distribution with IPN v2.3.4.7. I used OpenSSL to generate my private and public keys.

 

Enable PayPal IPN Module: True

Gateway Server: Testing

E-Mail Address: xxx@yyy.ca (same as Paypal Sandbox Biz account)

Sort order of display: 0

Transaction Currency: Only CAD

Payment Zone: --none--

Set Preparing Order Status: Preparing [PayPal IPN]

Set PayPal Acknowledged Order Status: default

Set PayPal Completed Order Status: default

Transaction Type: Aggregate

Move tax to total amount: True

Page Style:

Debug E-Mail Address: aaa@bbb.ca (not same as Paypal Sandbox Biz account)

cURL Proxy server (I don't have curl installed, could this be an issue?)

Enable Encrypted Web Payments: True

Your Private Key: C:/Progra~1/OpenSSL/bin/my-prvkey.pem

Your Public Certificate: C:/Progra~1/OpenSSL/bin/my-pubcert.pem

PayPals Public Certificate: C:/Progra~1/OpenSSL/bin/paypal_cert_pem.txt

Your PayPal Public Certificate ID: A**********U (from Paypal's Website Payment Certificates)

Working Directory: c:/wamp/www/ipn_tmp/

OpenSSL Location: C:/Progra~1/OpenSSL/bin/openssl.exe

 

Test workflow:

 

1. I create an OSC customer account with the same email address as my sandbox "PER" address and login as this customer.

 

2. I buy an item from the catalog and proceed to checkout with the IPN payment option.

 

3. I confirm the order: this correctly creates an order with the "Preparing [PayPal IPN]" status and takes me to the Paypal sandbox for payment.

 

4. In Paypal sandbox, I login with the "PER" address and perform payment.

 

5. In the sandbox, on the Paypal site, I confirm at this point that an IPN record has been generated:

 

Message ID: 3WH36683JH469135D

Date/time created: 10/29/2009 14:46 GMT-04:00

Original/Resent: Original

Latest delivery attempt date/time: 10/29/2009 14:49 GMT-04:00

Notification URL: http://localhost/ext/modules/payment/paypal_ipn/ipn.php?language=english

HTTP response code

Delivery status: Failed

No. of retries: 4

Transaction ID: 23C76962VW819932B

IPN Type: Transaction made

 

Note that the notification URL uses "localhost" as IP address. The result is the same if I edit the sandbox IPN settings to my IP address:

 

Notification URL: http://999.999.999.999:343/ext/modules/payment/paypal_ipn/

 

The port number (343 in this case, for SSL) does not change the result. Paypal always uses "localhost" in the notification URL.

 

6. At this point, I check the order status in OSC and it has not changed. It is still "Preparing [PayPal IPN]".

 

7. I check my server access.log file and all entries are from 127.0.0.1. This tells me that the Paypal server never accesses my server to deliver the IPN update.

 

Any ideas what I'm doing wrong? Suggestions would be much appreciated.

 

Thanks!

Share this post


Link to post
Share on other sites

I've been trying for a couple of days to figure out how to test IPN on a Windows XP localhost PC. I read several posts on the subject and I just can't find what I'm doing wrong, unless this is just not possible.

 

I am running OSC 2.2RC2 with WAMP on a Windows XP computer which is behind a firewall. I have opened ports 80 and 343 (for SSL?) and directed them to this PC (192.168.0.100).

 

I installed the standard OSC distribution with IPN v2.3.4.7. I used OpenSSL to generate my private and public keys.

 

Enable PayPal IPN Module: True

Gateway Server: Testing

E-Mail Address: xxx@yyy.ca (same as Paypal Sandbox Biz account)

Sort order of display: 0

Transaction Currency: Only CAD

Payment Zone: --none--

Set Preparing Order Status: Preparing [PayPal IPN]

Set PayPal Acknowledged Order Status: default

Set PayPal Completed Order Status: default

Transaction Type: Aggregate

Move tax to total amount: True

Page Style:

Debug E-Mail Address: aaa@bbb.ca (not same as Paypal Sandbox Biz account)

cURL Proxy server (I don't have curl installed, could this be an issue?)

Enable Encrypted Web Payments: True

Your Private Key: C:/Progra~1/OpenSSL/bin/my-prvkey.pem

Your Public Certificate: C:/Progra~1/OpenSSL/bin/my-pubcert.pem

PayPals Public Certificate: C:/Progra~1/OpenSSL/bin/paypal_cert_pem.txt

Your PayPal Public Certificate ID: A**********U (from Paypal's Website Payment Certificates)

Working Directory: c:/wamp/www/ipn_tmp/

OpenSSL Location: C:/Progra~1/OpenSSL/bin/openssl.exe

 

Test workflow:

 

1. I create an OSC customer account with the same email address as my sandbox "PER" address and login as this customer.

 

2. I buy an item from the catalog and proceed to checkout with the IPN payment option.

 

3. I confirm the order: this correctly creates an order with the "Preparing [PayPal IPN]" status and takes me to the Paypal sandbox for payment.

 

4. In Paypal sandbox, I login with the "PER" address and perform payment.

 

5. In the sandbox, on the Paypal site, I confirm at this point that an IPN record has been generated:

 

Message ID: 3WH36683JH469135D

Date/time created: 10/29/2009 14:46 GMT-04:00

Original/Resent: Original

Latest delivery attempt date/time: 10/29/2009 14:49 GMT-04:00

Notification URL: http://localhost/ext/modules/payment/paypal_ipn/ipn.php?language=english

HTTP response code

Delivery status: Failed

No. of retries: 4

Transaction ID: 23C76962VW819932B

IPN Type: Transaction made

 

Note that the notification URL uses "localhost" as IP address. The result is the same if I edit the sandbox IPN settings to my IP address:

 

Notification URL: http://999.999.999.999:343/ext/modules/payment/paypal_ipn/

 

The port number (343 in this case, for SSL) does not change the result. Paypal always uses "localhost" in the notification URL.

 

6. At this point, I check the order status in OSC and it has not changed. It is still "Preparing [PayPal IPN]".

 

7. I check my server access.log file and all entries are from 127.0.0.1. This tells me that the Paypal server never accesses my server to deliver the IPN update.

 

Any ideas what I'm doing wrong? Suggestions would be much appreciated.

 

Thanks!

 

Paypal sucks here's why.

http://www.paypalblows.org

Share this post


Link to post
Share on other sites

Paypal sucks here's why.

http://www.paypalblows.org

 

The PayPal is not sucks, it's depends what sort of illegal business you trying to run via them - majority of the issues is due to stupidity of people who are never bothered to read the Terms and Conditions - whats why the same website can be opened "People are suck who can't read and can't be bothered to read".

 

Testing Paypal sandbox IPN on localhost

is your website accessible from outside (like from other ISP)? as majority of the ISP are blocking incoming access on 80/443 port.

Edited by web-project

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Share this post


Link to post
Share on other sites
is your website accessible from outside (like from other ISP)? as majority of the ISP are blocking incoming access on 80/443 port.

I'm not quite sure how to test this. Here's what I did.

 

As a first step, I changed the "Listen" line in the Apache server httpd.conf file to: Listen 8080. Then I set my router's firewall to send port 8080 traffic to my test PC. I stopped and restarted all services, including Apache. Now, when I type "http://localhost:8080/login.php" in my browser, it does not show me a page, it tries but nothing happens. If I type "http://my_ip_address:8080/login.php", I get this message: "You don't have permission to access /login.php on this server." The last entry in the access.log file is:

 

my_ip_address - - [02/Nov/2009:17:01:08 -0500] "GET /login.php HTTP/1.1" 403 211

 

Any advice?

 

Thanks.

Share this post


Link to post
Share on other sites

I'm not quite sure how to test this. Here's what I did.

 

As a first step, I changed the "Listen" line in the Apache server httpd.conf file to: Listen 8080. Then I set my router's firewall to send port 8080 traffic to my test PC. I stopped and restarted all services, including Apache. Now, when I type "http://localhost:8080/login.php"'>http://localhost:8080/login.php" in my browser, it does not show me a page, it tries but nothing happens. If I type "http://my_ip_address:8080/login.php",'>http://my_ip_address:8080/login.php", I get this message: "You don't have permission to access /login.php on this server." The last entry in the access.log file is:

 

my_ip_address - - [02/Nov/2009:17:01:08 -0500] "GET /login.php HTTP/1.1" 403 211

 

Any advice?

 

Thanks.

Quick update. For some reason, http://localhost:8080/login.php works off and on. Sometimes, the browser just waits forever. Sometimes, I get the login page but with no images and graphics, just plain text. And sometimes, I get it right.

 

http://my_ip_address:8080/login.php always gets me the same message on a blank page.

Share this post


Link to post
Share on other sites

Quick update. For some reason, http://localhost:8080/login.php works off and on. Sometimes, the browser just waits forever. Sometimes, I get the login page but with no images and graphics, just plain text. And sometimes, I get it right.

 

http://my_ip_address:8080/login.php always gets me the same message on a blank page.

 

to test you can use other internet provide to access the your IP address, simply you can use friends connection or mobile phone, type in browser the following:

http://your-ip-address:8080

and see if it's accessible from outside and only after you can run the PayPal IPN test.


Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

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
Sign in to follow this  

×