Error while trying to use WPP

53 views
Skip to first unread message

josch

unread,
Feb 15, 2011, 6:20:41 PM2/15/11
to django-paypal
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





Mike Ryan

unread,
Feb 16, 2011, 7:48:22 AM2/16/11
to django-paypal
It looks like you are running the Django development server. Your
return/cancel URLs refer to 127.0.0.1:8000 - PayPal can not access
this address, as it is only available from your computer. This could
be the cause of the problem if PayPal is trying to do IPN for example
- if so, running Django on a publicly accessible IP address will solve
the problem.
Reply all
Reply to author
Forward
0 new messages