Hallo,
I´m trying to use the PayPal WPP (In the Sandbox), but it does not
work.
It does not matter if I use Express Checkout or Credit card, when I
click the "confirm" button, I get the message "There was an error
processing your payment. Check your information and try again."
What am I do wrong? The PayPal errorcode description is not very
meaningful: "The transaction cannot complete successfully. Instruct
the customer to use an alternative payment method."
This is one of the worse errorcode I ever got :)
My Code:
item = {"amt": "12.23", # amount to charge for item
"inv": "paypal_tracking456", # unique tracking
variable paypal
"custom": "my_tracking123", # custom tracking
variable for you
"cancelurl": "http://
127.0.0.1:8000/6c4bc20bf036f842d5f698cadaca552d/cancel", # Express
checkout cancel url
"returnurl": "http://
127.0.0.1:8000/6c4bc20bf036f842d5f698cadaca552d/"} # Express checkout
return url
kw = {"item": item, # what you're
selling
"payment_template": "pro/payment.html", # template name
for payment
"confirm_template": "pro/confirm.html", # template name for
confirmation
"success_url": "/success/"} # redirect location
after success
ppp = PayPalPro(**kw)
return ppp(request)
And the console output:
PayPal Request:
{'amt': '12.23',
'cancelurl': 'http://
127.0.0.1:8000/6c4bc20bf036f842d5f698cadaca552d/',
'custom': 'my_tracking123',
'inv': 'paypal_tracking456',
'method': 'DoExpressCheckoutPayment',
'payerid': u'ANHK8RKNYCN22',
'paymentaction': 'Sale',
'returnurl': 'http://
127.0.0.1:8000/6c4bc20bf036f842d5f698cadaca552d/',
'token': u'EC-45D61999FH627635S'}
PayPal Response:
{'ack': 'Failure',
'build': '1721431',
'correlationid': 'a8143c3627964',
'l_errorcode0': '10417',
'l_longmessage0': 'The transaction cannot complete successfully.
Instruct the
customer to use an alternative payment method.',
'l_severitycode0': 'Error',
'l_shortmessage0': 'Transaction cannot complete.',
'timestamp': '2011-02-15T23:06:22Z',
'version': '54.0'}
[16/Feb/2011 00:06:16] "POST /6c4bc20bf036f842d5f698cadaca552d/?
token=EC-45D6199
9FH627635S&PayerID=ANHK8RKNYCN22 HTTP/1.1" 200 12512