我有一个带有关联银行账户的paypal账户。我创建了名为" spbpriest"的REST Api应用程序。使用PayPal .NET SDK我创建了一个简单的应用程序,它使用Payment.List方法返回银行帐户的付款清单。不幸的是,方法返回零支付我应该以某种方式将REST API应用程序链接到银行帐户以获得真实付款吗?
代码示例:
var config = ConfigManager.Instance.GetProperties();
// Use OAuthTokenCredential to request an access token from PayPal
var accessToken = new OAuthTokenCredential(config).GetAccessToken();
var apiContext = new APIContext(accessToken);
apiContext.Config = ConfigManager.Instance.GetProperties();
// Define any custom configuration settings for calls that will use this object.
apiContext.Config["connectionTimeout"] = "100000";
var payments = Payment.List(apiContext, count: 10, startIndex:0, sortBy: "create_time", sortOrder: "desc");
的app.config:
<configuration>
<configSections>
<section name="paypal" type="PayPal.SDKConfigHandler, PayPal" />
</configSections>
<paypal>
<settings>
<add name="mode" value="sandbox"/>
<add name="clientId" value="******"/>
<add name="clientSecret" value="******"/>
</settings>
</paypal>
</configuration>