SDK中的PayPal Express Checkout用户操作和付款类型参数 [英] PayPal Express Checkout useraction and paymenttype parameters in SDK

查看:509
本文介绍了SDK中的PayPal Express Checkout用户操作和付款类型参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我同时使用商人.net SDK和Payflow .net SDK.

I'm using both the merchant .net SDK and the payflow .net sdk.

文档讨论了如何将"useraction"属性设置为"commit".我不知道如何在两个SDK中设置该属性.

The documentation talks about being able to set a "useraction" property to "commit". I can't figure out how to set that property in either of the SDKs.

还...

payflow SDK允许我将PaymentType设置为即时".

The payflow SDK allows me to set PaymentType to "instantonly".

ECSetRequest setRequest = new ECSetRequest();
setRequest.PaymentType = "instantonly";

商家SDK允许我执行以下操作.

The merchant SDK allows me to do the following.

PaymentDetailsType paymentDetails = new PaymentDetailsType();
paymentDetails.AllowedPaymentMethod = AllowedPaymentMethodType.INSTANTPAYMENTONLY;

希望这两个是等效的

推荐答案

您将用户操作附加到要重定向到的URL中.例如:

You attach the useraction in the URL you are redirecting to.. eg:

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=<TOKEN>&useraction=commit

根据API,您列出的两种PaymentTypes相同.

The two PaymentTypes you have listed are the same according to the API.

此外,基于此示例代码,您应该可以将useraction=commit与MerchantSDK一起添加.

Also, based on this sample code you should be able to add the useraction=commit with the 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用户操作和付款类型参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆