我同时使用商家 .net SDK 和 payflow .net sdk。
文档讨论了能够将“useraction”属性设置为“commit”。我不知道如何在这两个 SDK 中设置该属性。
还有...
payflow SDK 允许我将 PaymentType 设置为“instantonly”。
ECSetRequest setRequest = new ECSetRequest();
setRequest.PaymentType = "instantonly";
商家 SDK 允许我执行以下操作。
PaymentDetailsType paymentDetails = new PaymentDetailsType();
paymentDetails.AllowedPaymentMethod = AllowedPaymentMethodType.INSTANTPAYMENTONLY;
希望这两个是等价的
最佳答案
您在要重定向到的 URL 中附加用户操作。例如:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=<TOKEN>&useraction=commit
根据 API,您列出的两个 PaymentType 是相同的。
此外,基于 this sample code你应该能够添加 useraction=commit
使用 MerchantSDK。
第 420 行显示:
CurrContext.Items.Add("Response_redirectURL", ConfigurationManager.AppSettings["PAYPAL_REDIRECT_URL"].ToString()
+ "_express-checkout&token=" + setECResponse.Token);
可以改成:
CurrContext.Items.Add("Response_redirectURL", ConfigurationManager.AppSettings["PAYPAL_REDIRECT_URL"].ToString()
+ "_express-checkout&useraction=commit&token=" + setECResponse.Token);
关于SDK 中的 PayPal Express Checkout useraction 和 paymenttype 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23523761/