paypal定期付款与c#快速结账

时间:2012-01-13 07:02:59

标签: c# paypal

我使用以下代码创建定期付款资料

CreateRecurringPaymentsProfileReq RPPR = new CreateRecurringPaymentsProfileReq()
{
    CreateRecurringPaymentsProfileRequest = new CreateRecurringPaymentsProfileRequestType()
    {
        Version = UtilPayPalAPI.Version,

        CreateRecurringPaymentsProfileRequestDetails = new CreateRecurringPaymentsProfileRequestDetailsType()
        {
            Token = resp.GetExpressCheckoutDetailsResponseDetails.Token,
            RecurringPaymentsProfileDetails = new RecurringPaymentsProfileDetailsType()
            {
                BillingStartDate =Convert.ToDateTime("1/15/2012 11:10:28 AM"),
                SubscriberName = "Shubhangi"
            },
            ScheduleDetails = new ScheduleDetailsType()
            {
                PaymentPeriod = new BillingPeriodDetailsType()
                {
                    Amount = new BasicAmountType()
                    {
                        currencyID = CurrencyCodeType.USD,
                        Value = "10.00"
                    },
                    BillingFrequency=2,
                    BillingPeriod=BillingPeriodType.Day
                },
                ActivationDetails = new ActivationDetailsType()
                {
                    InitialAmount = new BasicAmountType()
                    {
                        currencyID=CurrencyCodeType.USD,
                        Value="10.00"
                    }
                },
            }
        }
    }
};
CreateRecurringPaymentsProfileResponseType dorecurringPaymentResponse = UtilPayPalAPI.BuildPayPalWebservice().CreateRecurringPaymentsProfile(RPPR);
UtilPayPalAPI.HandleError(dorecurringPaymentResponse);

在调用了doexpress checkout api后,我打电话给createrecurring profile api。在这个doexpress checkout响应中返回“Success”,但在此之后,当我调用create recurringprofile时,它的响应是“失败”。错误是“令牌无效”

我的代码中是否有人建议更正?

0 个答案:

没有答案