You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

验证用户输入的Authorize.net登录凭证与交易密钥的方法是否恰当?

验证Authorize.net凭证的方法说明
  • 核心结论:你通过发起0.01美元的仅授权(authOnlyTransaction)测试交易来验证登录ID和交易密钥的方式是有效的,测试账户和真实账户都适用。
  • 真实账户注意事项:在真实账户中完成这笔测试交易后,务必手动**撤销(void)**该授权,避免授权有效期内触发自动扣款(仅授权本身不会立即扣款,但存在后续扣款风险)。
  • 补充思路:Authorize.net确实没有专门的凭证验证API,小额测试交易是行业通用的验证方案。你也可以尝试发起0美元金额的交易,不过该操作在Authorize.net可能存在限制,建议自行测试可行性。

你的VB.NET代码如下:

Dim merchantType As New merchantAuthenticationType() With {
                .name = USER_Entered_LoginID,
                .Item = USER_Entered_Key,
                .ItemElementName = ItemChoiceType.transactionKey
            }
Dim bankAccount As New bankAccountType With {
                    .accountType = bankAccountTypeEnum.checking,
                    .nameOnAccount = "Test",
                    .routingNumber = "125008547",
                    .accountNumber = "856667",
                    .echeckType = echeckTypeEnum.WEB
                }
            ''测试银行账户信息

Dim paymentType As New paymentType With {
                .Item = bankAccount
            }

Dim transactionRequest As New transactionRequestType With {
                .transactionType = transactionTypeEnum.authOnlyTransaction.ToString(),
                .payment = paymentType,
                .amount = 0.01
            }
Dim myRequest = New createTransactionRequest With {
            .transactionRequest = transactionRequest
        }
Dim controller = New createTransactionController(myRequest)
            controller.Execute()
            Dim myResponse = controller.GetApiResponse()

内容的提问来源于stack exchange,提问作者mikemurf22

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 11:50:30