通过Authorize.Net发送OTP

时间:2018-06-04 06:14:52

标签: c# asp.net-mvc payment-gateway authorize.net

在authorize.net中支付信用卡/借记卡时是否有发送OTP的选项。

如果没有选项如何实现这个

这是从Authorized.Net获取响应的代码

public static ANetApiResponse Run(CustomerDetail cd,decimal amount)
    {

        ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

        ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
        {
            name = ConfigurationManager.AppSettings["AuthorizeNetLogin"],
            ItemElementName = ItemChoiceType.transactionKey,
            Item = ConfigurationManager.AppSettings["AuthorizeNetTransactionKey"],
        };

        var creditCard = new creditCardType
        {
            cardNumber = Convert.ToString(cd.cardnumber),
            expirationDate = cd.expirationdate,
        };

        var paymentType = new paymentType { Item = creditCard };

        var transactionRequest = new transactionRequestType
        {
            transactionType = transactionTypeEnum.authOnlyTransaction.ToString(),    // authorize only
            amount = amount,
            payment = paymentType
        };

        var request = new createTransactionRequest { transactionRequest = transactionRequest };

        var controller = new createTransactionController(request);
        controller.Execute();

        var response = controller.GetApiResponse();
        return response;
    }

1 个答案:

答案 0 :(得分:1)

Authorize.Net不支持一次性密码,因为Authorize.Net不支持汇款。