c# - Why is the Paypal Sandbox not processing payments? -


i'm making e-commerce site , paypal integration seemingly working. have shopping cart, totals items inside, adds shipping price , sends number off paypal these lines.

string address = "https://api-3t.sandbox.paypal.com/nvp?user=<username>&pwd=<password>&version=71.0&signature=<signature>&method=setexpresscheckout&paymentrequest_0_amt=" + lbltotal.text + "&paymentrequest_0_currencycode=usd&returnurl=http://www.secretskeletonminiatures.com/checkout.aspx&cancelurl=http://www.secretskeletonminiatures.com/cart.aspx&paymentrequest_0_paymentaction=sale";      httpwebrequest request = (httpwebrequest)webrequest.create(address); 

then pull in response paypal httpwebresponse , parse out token , redirect users

response.redirect("https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=" + token); 

when user gets paypal log in , hit "pay now" button , redirected checkout page of site.

so seems ok. when check sandbox accounts, none of money getting transferred.

the common cause useraction=commit parameter being missing redirect url it's there isn't problem.

to else stumbles on question later. did solve it. once user returns site after confirming payment on paypal still have send doexpresscheckoutpayment request paypal servers payment process.

you supply payerid , token doexpresscheckoutpayment process it. payerid appended in url of returnurl, or can retrieved calling getexpresscheckoutdetails token.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -