我正在尝试Authorize.Net
在一个ASP.NET
网络表单应用程序中实现,因为我是新手,所以正在通过它的官方网站和其他一些随机网站来了解它。以下链接对我有所帮助:
到目前为止,以下代码片段似乎可以实现,因为它需要设置的配置很少,并创建了一个沙盒帐户来完成它:
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
{
name = ApiLoginID,
ItemElementName = ItemChoiceType.transactionKey,
Item = ApiTransactionKey,
};
paymentScheduleTypeInterval interval = new paymentScheduleTypeInterval();
interval.length = intervalLength; // months can be indicated between 1 and 12
interval.unit = ARBSubscriptionUnitEnum.days;
paymentScheduleType schedule = new paymentScheduleType
{
interval = interval,
startDate = DateTime.Now.AddDays(1), // start date should be tomorrow
totalOccurrences = 9999, // 999 indicates no end date
trialOccurrences = 3
};
#region Payment Information
var creditCard = new creditCardType
{
cardNumber = "4111111111111111",
expirationDate = "1028"
};
我有一个棘手的要求,还有一件事要在这里确认。在网络应用中,如果用户在网站上注册,那么将收取 1 美元的Authorize.Net
api 费用,如果用户在注册后使用网站超过三天,则会自动将用户重定向到每月订阅(因此这里将收取另一笔费用)。
是否可以处理Authorize.Net
和处理经常性账单,我是否需要将用户信用卡详细信息保存在网站的数据库或类似的东西中?