- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[Accept Hosted form] Card expiration date custom mask
We use Accept Host Form page to create customer payment profiles and experience some issue on our sandbox account
In the form date is filled with the mask (MM/YY) and we want to pass 11/65 (11/2065). It was verified completed.
Hosted Form screenshot:
But on getCustomerPaymentProfileRequest Authorize.NET respond that CustomerPaymentProfile was created with ExpDate – 11/1965
Response:
{
"paymentProfile": {
"customerProfileId": "1813777948",
"customerPaymentProfileId": "1808460830",
"payment": {
"creditCard": {
"cardNumber": "XXXX4137",
"expirationDate": "1965-11",
"cardType": "AmericanExpress"
}
}
},
"refId": "9149541511113735551",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
Is it Payment Form issue? Could we override date format somehow? For example, via settings for Hosted Page. How we request token for Hosted Page:
{
"getHostedProfilePageRequest": {
"merchantAuthentication": {
"name": "7tM3uvZ62EL",
"transactionKey": "4n6SSLvm363m832A"
},
"refId": 9149541511113735546,
"customerProfileId": "1813777948",
"hostedProfileSettings": {
"setting": [
{
"settingName": "hostedProfileReturnUrl",
"settingValue": "http://10.112.251.223:6300/solutions/closePGPopup.jsp"
},
{
"settingName": "hostedProfileValidationMode",
"settingValue": "testMode"
},
{
"settingName": "hostedProfileBillingAddressOptions",
"settingValue": "showNone"
},
{
"settingName": "hostedProfileReturnUrlText",
"settingValue": "Continue"
},
{
"settingName": "hostedProfilePageBorderVisible",
"settingValue": "false"
},
{
"settingName": "hostedProfileHeadingBgColor",
"settingValue": "E0E0E0"
},
{
"settingName": "hostedProfileBillingAddressRequired",
"settingValue": "false"
},
{
"settingName": "hostedProfileCardCodeRequired",
"settingValue": "true"
},
{
"settingName": "hostedProfileManageOptions",
"settingValue": "showPayment"
}
]
}
}
}
12-11-2017 12:41 AM - edited 12-11-2017 12:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@WinZib0NE Yes, you can update the expiration date by using UpdateCustomerPaymentProfile by using the YYYY format. <expirationDate>2026-01</expirationDate>
<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>XXXXXX</name> <transactionKey>XXXXX</transactionKey> </merchantAuthentication> <customerProfileId>10000</customerProfileId> <paymentProfile> <billTo> <firstName>John</firstName> <lastName>Doe</lastName> <company></company> <address>123 Main St.</address> <city>Bellevue</city> <state>WA</state> <zip>98004</zip> <country>USA</country> <phoneNumber>000-000-0000</phoneNumber> <faxNumber></faxNumber> </billTo> <payment> <creditCard> <cardNumber>4111111111111111</cardNumber> <expirationDate>2026-01</expirationDate> </creditCard> </payment> <defaultPaymentProfile>false</defaultPaymentProfile> <customerPaymentProfileId>20000</customerPaymentProfileId> </paymentProfile> <validationMode>liveMode</validationMode> </updateCustomerPaymentProfileRequest>
12-11-2017 05:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't want to update payment profile via additional Update call.
Is there any way to override date format for Accept Hosted Form?
12-13-2017 02:08 AM

