Note that there are some explanatory texts on larger screens.

plurals
  1. POPayPal Express Checkout in asp.net
    text
    copied!<p>i am usning below web service for implement express checkout</p> <pre><code>//Demo https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl //Live https://www.paypal.com/wsdl/PayPalSvc.wsdl </code></pre> <p>i took help from belo blog URL.</p> <p><a href="http://blog.effectlabs.com/post/2011/11/07/Paypal-Express-Checkout-with-C-using-Paypal-web-services.aspx" rel="nofollow">http://blog.effectlabs.com/post/2011/11/07/Paypal-Express-Checkout-with-C-using-Paypal-web-services.aspx</a></p> <p>error is -in response object i am getting " resp.Token is null " when i run same code on xp-64 bit (port and iis6 both),window server 2008 (iis7 32 bit mode)</p> <p>But running fine(no error, token is nut null getting value in that) on win-7 32 bit iis7 and port</p> <p>my code is below.</p> <pre><code> protected void btnPaypal_Click(object sender, EventArgs e) { CustomSecurityHeaderType type = new CustomSecurityHeaderType(); type.Credentials = new UserIdPasswordType() { Username = "removed", Password = "removed", Signature = "removed" }; SetExpressCheckoutRequestDetailsType sdt = new SetExpressCheckoutRequestDetailsType(); sdt.NoShipping = "1"; PaymentDetailsType pdt = new PaymentDetailsType() { OrderDescription = "Payment Details Sushant", OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "100.00" } }; sdt.PaymentDetails = new PaymentDetailsType[] { pdt }; sdt.CancelURL = "http://localhost/OAT/Default.aspx"; sdt.ReturnURL = "http://localhost/OAT/ExpressCheckoutSuccess.aspx"; SetExpressCheckoutReq req = new SetExpressCheckoutReq() { SetExpressCheckoutRequest = new SetExpressCheckoutRequestType() { SetExpressCheckoutRequestDetails = sdt, Version = "60.0" } }; PayPalAPIAAInterfaceClient paypalAAInt = new PayPalAPIAAInterfaceClient(); var resp = paypalAAInt.SetExpressCheckout(ref type, req); if (resp.Errors != null &amp;&amp; resp.Errors.Length &gt; 0) { // errors occured throw new Exception("Exception(s) occured when calling PayPal. First exception: " + resp.Errors[0].LongMessage + resp.Errors.Length.ToString()); } // error is here.. that resp.Token is null on xp-64 bit port and iis6 both, but running fine on win-7 32 bit iis7 and port, and w Response.Redirect(string.Format("{0}?cmd=_express-checkout&amp;token={1}", "https://www.paypal.com/cgi-bin/webscr", resp.Token)); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload