小编bra*_*ice的帖子

Paypal REST API SDK - 在C#中激活计费方案

我有以下代码来创建结算方案

 string iClientID = "xxxxxx";
        string iSecret = "yyyyyy";

        Dictionary<string, string> sdkConfig = new Dictionary<string, string>();
        sdkConfig.Add("mode", "sandbox");
        string accessToken = new OAuthTokenCredential(iClientID, iSecret, sdkConfig).GetAccessToken();
    APIContext apiContext = new APIContext(accessToken);
    apiContext.Config = sdkConfig;

    Plan xPlan = new Plan();
    xPlan.name = "Billing Plan OneA";
    xPlan.description = "Our first billing plan for testing";
    xPlan.type = "INFINITE";

    PaymentDefinition xPDef = new PaymentDefinition();
    xPDef.name = "Payment Def One";
    xPDef.type = "REGULAR";
    xPDef.frequency_interval = "1";
    xPDef.frequency = "MONTH";
    xPDef.cycles = "0";

    MerchantPreferences xPrefs = new …
Run Code Online (Sandbox Code Playgroud)

c# paypal paypal-subscriptions paypal-sandbox

2
推荐指数
1
解决办法
751
查看次数

标签 统计

c# ×1

paypal ×1

paypal-sandbox ×1

paypal-subscriptions ×1