0

我想制作一个让用户即时付款的代码。例子 :

用户在 2014 年 3 月 11 日订阅 40 美元,系统将立即收取 40 美元的 4 月订阅费。

然后订阅开始日期设置为 2014 年 5 月 1 日(因为我们已经向用户收取了 4 月的费用)。

任何想法 ??

4

2 回答 2

0

此代码创建每月订阅,ISubscriptionRequest.StartsOn 是计费开始的日期。

ISubscriptionGateway arbGate = new AuthorizeNet.SubscriptionGateway(logID, transID, ServiceMode.Live);
ISubscriptionRequest arbReq = SubscriptionRequest.CreateMonthly(txtEmail.Text, description, Convert.ToDecimal(txtAmount.Text), 9999);

arbReq.CardNumber = txtCardNumber.Text;
arbReq.BillingAddress = new Address
{
    First = firstName,
    Last = lastName,
    Street = txtAddress.Text,
    City = txtCity.Text,
    State = txtState.Text,
    Zip = txtZip.Text,
    Country = txtCountry.Text
};

arbReq.CardExpirationMonth = Convert.ToInt32(ddlMonthExpire.SelectedValue);
arbReq.CardExpirationYear = Convert.ToInt32(rbm.toStr(ddlYearExpire.SelectedItem.Text));
arbReq.CardCode = txtCVV.Text;
arbReq.CustomerEmail = txtEmail.Text;
arbReq.StartsOn = dateStart;
于 2014-03-28T20:20:55.180 回答
0

如果您想通过即时付款开始订阅,您需要使用高级集成方法 (AIM) API。付款成功后,您可以设置订阅。

于 2014-03-11T17:22:30.470 回答