Hi,
I am trying to set up a store selling tangible products using ecommerce and PayPal. I have tried to get it working on a local server and gave up to try on a public host. In both cases I cannot get into the paypal page that lets me buy the item(s).
I have a paypal developer account set up, and I have set up a 'business' test account and 2 'buyer accounts' in the sandbox.
I log into the developer account before attempting a purchase. Every time I complete the details in the cart and 'place my order' I am taken to the account login page on paypals sandbox instead of the sandbox shopping cart page, even when I have logged in to the developer account.
I have used the details listed http://drupal.org/node/98892 for my paypal settings. I have also tried other combinations found by searching forums, but non of them work for me. Different browsers don't help. Ecommerce does log the transaction as pending, but it never shows up in paypal (because it never happens).
I'm in the UK and I wonder if this may be the problem? I have looked at the paypal.module code and noticed this on line 166 inside the paypal_goto function...
'currency_code' => variable_get('paypal_currency_code', 'USD');
...I'm unsure if this my be a problem or of it gets overridden by my settings in ecommerce's paypal settings.
I think my next step will be to set up a new paypal developer account with new sandbox, and clean install of ecommerce.
FWIW I have tried using Ubercart and it does submit correctly to paypal from both the local version and the hosted site, but there are other reasons that make me not want to use it just yet.
Can anyone help make sense of what is happening?
Comments
Found a Fix
I managed to find that the Sandbox no longer supports the https://www.sandbox.paypal.com/xclick/ URL. It now should be https://www.sandbox.paypal.com/cgi-bin/webscr. The 'Live' PayPal site still does so for backwards compatibility.
The problem is that the second url needs to have the query string altered to include cmd=_xclick&... so simply changing it in the stores paypal settings isn't enough. You need to modify paypal.module to fix this issue.
I'm working on a patch for it.
There is info about PayPal urls here. https://www.paypaldeveloper.com/pdn/board/message?board.id=ipn&thread.id... message 6 is the important one.
I can't understand how no one else has had this problem, maybe PayPal handles international sandboxes differently?
Drew