Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Paypal and Sandbox Payment #222

Closed
Onedin opened this Issue · 46 comments

7 participants

@Onedin

Hi,

I try to get the paypal payment working. But it isn't working. I entered my Email Adress, enabled the sandbox and the debug function.

So when I'm doing a test buy, I can checkout, pay the the articles and will be redirected back to my site.

But the order status in the WooCommerce backend always says Pending.

I checked the sandbox backend but there the transactions are completed.

I was looking in the paypal.txt, but the file was empty. so no debug information for me.

Did I miss something to get the paypal gateway running? Or is there a problem.

@mikejolley
Owner

Something will be blocking the request; something on your server. It will either be:

1) your running your install locally?
2) Server does not support fsockopen
3) Server firewall is blocking the request

@DanielBakovic

Hi,

I've noticed the same issue with sandbox and with real payments on a site hosted on GoDaddy.

My log is empty, too. I saw that a message is only logged when the response of wp_remote_post returns an error object.

It would be great if every step of a payment process could be logged.

@brocheafoin

You can use the Core Control plugin to test/disable/enable the different "transports" WP tries to perform HTTP requests. It can also log all HTTP requests made internally by WordPress. Helped me a great deal in troubleshooting PayPal IPN issues.

FWIW, in my particular case, the 'curl' transport was failing because an SSL certificate wasn't accepted automatically. It's a setting in WordPress' HTTP methods, which I could modify with a filter in my theme.

@DanielBakovic

Thank you brocheafoin.

I'll try it.

@brocheafoin

Also, if you want to troubleshoot just IPN back and forth between WooCommerce and PayPal, you can use the Instant Payment Notification (IPN) simulator in PayPal's SandBox.

The postback URL handled by WooCommerce will be: http://yourwpsite.com/?paypalListener=paypal_standard_IPN

With these 2 tools, you can pretty much follow the exchanges all the way and pinpoint where they fail.

@Onedin

Thanks brocheafoin.

I tried the IPN Simulator. But there was also no effect on the paypal log file. Actually I'm at work and will check it when I'm home.

I would also prefer more logging features in the whole paypal process. It could help a lot to see whats going wrong.

@mikejolley
Owner

I'll add more logging, but ultimately GoDaddy is usually to blame :p

@mikejolley
Owner

Actually, theres not much more logging I can add since its triggered by PayPal's request - no request = no IPN to log.

@mikejolley
Owner

Something to look at:

my problem was this line in my .htaccess

SetEnvIfNoCase User-Agent ^$ keep_out

it doesn't allow the IPN to talk to the site

@DanielBakovic

That's really strange. I've tested it on Godaddy and Hostgator. It works on Hostgator but not on Godaddy :(

@mikejolley
Owner

This solved it for someone on the forum 152fc44

@DanielBakovic

have already the latest code... it doesn't work on godaddy

@DanielBakovic

I installed MarketPress (Premium Version) and setup PayPal Express Checkout. Then tried to buy an item and it worked. Paypal was able to notify MarketPress to complete the transaction.

On MarketPress settings I had to enter PayPal API Credentials (API Username, API Password and Signature).

@mikejolley
Owner

This isn't paypal express - its standard.

@mikejolley
Owner

A google of paypal IPN and godaddy gives you heaps of results - looks like its their non-standard setup/proxies http://www.beamartyr.net/articles/godaddyproxy.html

@DanielBakovic

I saw that post, too. But why does it work with MarketPress without proxy?

Would it be helpful if I post the paypal implementation of marketpress here?

@mikejolley
Owner

You said MarketPress has PayPal Express - thats different to standard so thats why.

@DanielBakovic

ok, I there any chance to add paypal express to woocommerce?

@mikejolley
Owner

It's being built.

Would be cool if you could find a solution for godaddy thought - perhaps ask their support department.

@DanielBakovic

"It's being built.".. That's great. Hopefully it will be free like on WP e-Commerce and MarketPress Lite :)

I've send an email to the support but did not receive a reply, yet.

@Onedin

Hi, got an answer from my godaddy support:

Dear Onedin,

Thank you for contacting Online Support.

I understand you are inquiring about issues with PayPal IPN on your hosting plan. You may wish to verify that you are not currently using any cURL proxy on your application, as it is not needed. In order to better assist you regarding this this manner, please provide step-by-step instructions on how to duplicate this issue, along with the name of the application in question.

Please let us know if we can help you in any other way.

Sincerely,
Ryan P.
Online Support Representative

So I wrote them back and explained the setup constellation more detailed.

Hopefully I will get an answer soon.

Onedin

@Onedin

I was searching around and it looks like a lot of people have a general problem with paypal standard ipn and shared godaddy hosting.

So I will have three possibilities:
1. Still trying to solve the problem.
2. Waiting for the paypal express checkout (Is there any estimation when a release should be expected?)
3. Changing my webhoster and moving the domain.

...

@DanielBakovic

Hi Onedin,

I think "Changing my webhoster and moving the domain." is not a good solution because there are a lot of people who use GoDaddy. The better solution would be if WooCommerce could have PayPal Express integrated (not as extension).

@DanielBakovic

I planed to use WooCommerce + WooStore + Commission King on my site but it's not possible because of PayPal IPN problems with GoDaddy. Now I need to check if WP E-Commerce + Mazine Theme + Multi Vendor Extension will to that job :(

I would love if I could use woocommerce...

@brocheafoin

Do any of you guys want me to take a stab at it? I'll charge you only if I succeed. My email is in my profile.

@DanielBakovic

Thank you for your offer brocheafoin!

After several emails with GoDaddy's support I decided to move to hostgator! GoDaddy answered with nonsense emails like this one:

"Dear Daniel,

Thank you for contacting online support.

I understand that you would like to have a PayPal IPN on your website that you have hosted with us. This is not something we will be able to assist you with. You will need to review your preferred search engine and/or Codex.Wordpress.Org for more information on how you can set this up."

Now I moved to hostgator and everything is working great! :)

@61pixels

Just to chime in, while I don't doubt you all have issues with Godaddy, I just wanted to mention my client runs GoDaddy shared hosting (linux cheap package), and there are no problems at all with paypal standard or paypal pro.

@DanielBakovic

Hi 61pixels,

just try to google PayPal IPN Godaddy and you will see how many people have the same problems. :/

@61pixels

Like I said, I never said they don't have issues. I just wanted to let others know that it does work with GoDaddy as well. Otherwise people might think that you can't use godaddy for woocommerce, when in fact you can. Out of curiosity were you using Windows hosting?

@DanielBakovic

On Godaddy I have OS/Hosting Type: Linux / Wordpress Hosting

@61pixels

I'm sure it would help if I mentioned we're running that works. We're currently using the cheapest of the 3 Linux plans, the $4.99/mo Economy 4GH as seen here http://www.godaddy.com/hosting/web-hosting.aspx?ci=8971 . It sounds like it might be hit or miss, thankfully we're at least up and running.

@Onedin

Hi,
got this answer from godaddy:
Dear Onedin,
Regarding your hosting plan, we do not have an estimated time for the matter to be resolved however it will be resolved as soon as possible. We appreciate your understanding regarding this issue.
Please let us know if we can assist you in any other way.
Sincerely,
Dean P.
Online Support Team

Looks like I have just bad luck with my godaddy package. I'm know trying to host my site to my second hoster and changing the dns entries at godaddy.

I will keep you inform.

@creativitymatters

I too have issues with the Paypal standard gateway. The transaction state is always left as pending for digital downloads (have not tried anything else) and I need to manually complete the transaction. Have included the following from the log file which seems to indicate that the IPN message is getting through.This was using the latest plugin version 1.2.4

11-20-2011 @ 22:13:06 - Generating payment form for order #227. Notify URL: http://www.creative4business.co.uk/wordpress/?paypalListener=paypal_standard_IPN
11-20-2011 @ 22:13:59 - Checking IPN response is valid...
11-20-2011 @ 22:14:00 - Received valid response from PayPal

Will also check with hosting folks to see if anyting untoward is going on there.

@creativitymatters

Just confirmed with my hosting provider that fsockopen is enabled and that the Paypal messages have been received. It would seem that there is a gremlin somewhere in the Paypal gateway.

@mikejolley
Owner

Could you grab the latest version of the gateway and test?

@creativitymatters

Not done this before. Is it just the file gateway-paypal.php I need?

@mikejolley
Owner

Yes, keep a backup of your old file.

@creativitymatters

I get the following error. Will try and find which other file(s) I need.

Fatal error: Call to undefined method woocommerce_order::get_total_discount() in /home/creat4/public_html/wordpress/wp-content/plugins/woocommerce/classes/gateways/gateway-paypal.php on line 211

@mikejolley
Owner

Ah, sorry, Im working on those parts. Don't get other files, just copy the function

function successful_request( $posted ) {

across to your version of the gateway.

@creativitymatters

Tried the newer code and exactly the same thing happens. Log file is as follows

11-27-2011 @ 00:02:53 - Generating payment form for order #229. Notify URL: http://www.creative4business.co.uk/wordpress/?paypalListener=paypal_standard_IPN
11-27-2011 @ 00:04:32 - Checking IPN response is valid...
11-27-2011 @ 00:04:34 - Received valid response from PayPal

Status sticks at opending until I change the status to complete!!

@mikejolley
Owner

Pending or processing - and is the downloadable product also "virtual"

@creativitymatters

Status is 'Processing' and the product is not virtual

@mikejolley
Owner

Then it is working. PayPay marks regular orders processing (paid). Make the items virtual (no shipping) for it to go straight to complete. You originally said 'pending'.

@onedin make a new ticket when you have news on the issue.

@mikejolley mikejolley closed this
@creativitymatters
@agliottone

I have resolved, flushing the permalinks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.