我正在将 Authorize.NET 与我的 Web 应用程序集成。我正在使用此处所述的托管付款表格:
我想使用设置页面中描述的默认付款表单:https ://sandbox.authorize.net/UI/themes/sandbox/Settings/SettingsPayFormMain.aspx我想通过传递相关字段来自定义此付款表单。
我正在使用以下 JSON 对象:
{
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "api_key",
"transactionKey": "transaction_key"
},
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "20.00",
"profile": {
"customerProfileId": "123456789"
},
"customer": {
"email": "ellen@mail.com"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
}
},
"hostedPaymentSettings": {
"setting": [{
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"showReceipt\": true, \"url\": \"https://example.com/receipt\", \"urlText\": \"Continue\", \"cancelUrl\": \"https://example.com/cancel\", \"cancelUrlText\": \"Cancel\"}"
}, {
"settingName": "hostedPaymentShippingAddressOptions",
"settingValue": "{\"show\": false, \"required\": false}"
}, {
"settingName": "hostedPaymentBillingAddressOptions",
"settingValue": "{\"show\": true, \"required\": false}"
}, {
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\": false, \"requiredEmail\": false, \"addPaymentProfile\": true}"
}, {
"settingName": "hostedPaymentOrderOptions",
"settingValue": "{\"show\": true, \"merchantName\": \"G and S Questions Inc.\"}"
}, {
"settingName": "hostedPaymentIFrameCommunicatorUrl",
"settingValue": "{\"url\": \"https://example.com/special\"}"
}]
}
}
}
我收到以下看起来不专业的付款表格。知道如何使用 Authorize.NET 的默认付款表格
使用的 HTML 表格:
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<head>
</head>
<body>
<form method="post" action="https://test.authorize.net/payment/payment" id="formAuthorizeNetTestPage" name="formAuthorizeNetTestPage">
<input type="hidden" name="token" value="Replace with form token from getHostedPaymentPageResponse" />
Continue to Authorize.Net to Payment Page
<button id="btnContinue">Continue to next page</button>
</form>
</body>
</html>