我可以更新卡配置文件而不包含卡号信息 Authorize.Net 吗?
Can I update a card profile without including the cardnumber information with Authorize.Net?
我有一个接受信用卡并将配置文件保存到 authorize.net 的 c# 应用程序。充值成功,资料保存成功。
如果用户想要更新所有信息并重新输入他们的信用卡号、有效期和 cvc,他们可以更新他们的个人资料。
但是,我们希望能够在不更新信用卡信息的情况下更新 billTo 信息。不幸的是,每当我尝试调用 updateCustomerPaymentProfileRequest 时,都会收到需要支付信息的错误消息。
我可以读取当前配置文件,但卡号和有效期被屏蔽了。我可以取消屏蔽到期日期但不能取消卡号。
不幸的是,对 updateCustomerPaymentProfileRequest 的调用需要 paymentType,而 getProfile 调用return是一种屏蔽的支付类型,它们似乎不可互换。
事实上,即使我尝试请求公开的到期日期,它也不会return。
var request = new getCustomerPaymentProfileRequest();
request.customerProfileId = customerProfileId;
request.customerPaymentProfileId = paymentProfileId;
request.unmaskExpirationDate = true;
支付信息为屏蔽类型,屏蔽有效期
即使这给了我未掩饰的到期日期,我仍然没有信用卡号,我什至不想要它,因为我只想更新 billTo。
这可能吗?我在authorize.net上找到了这篇文章,但他们并没有真正回答问题,而且提问的人似乎已经放弃了。
Jim,付款明细可以以屏蔽格式提交(例如 XXXX1111)如果没有更新,您可以查看 Authorize.Net API 文档了解更多详情。
https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-profile
(paymentProfile:不更新的敏感信息可以屏蔽)。
我能够使用屏蔽的信用卡信息成功更新付款资料。这是我使用的 JSON 请求和响应,希望能为您指明正确的方向。我会 post 我的代码,但我使用 PHP 这对你没有帮助。
创建客户资料
请求
{
"createCustomerProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"profile": {
"merchantCustomerId": 70276167,
"email": "user01@example.com",
"paymentProfiles": {
"billTo": {
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345",
"phoneNumber": "800-555-1234"
},
"payment": {
"creditCard": {
"cardNumber": "4427802641004797",
"expirationDate": "2020-12"
}
}
},
"shipToList": {
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345",
"phoneNumber": "800-555-1234"
}
},
"validationMode": "liveMode"
}
}
回应
{
"customerProfileId": "1512089543",
"customerPaymentProfileIdList": [
"1512108080"
],
"customerShippingAddressIdList": [
"1511600096"
],
"validationDirectResponseList": [
"1,1,1,This transaction has been approved.,AKXC9R,Y,40050101060,none,Test transaction for ValidateCustomerPaymentProfile.,0.00,CC,auth_only,70276167,John,Smith,,123 Main Street,Townsville,NJ,12345,,800-555-1234,,user01@example.com,,,,,,,,,0.00,0.00,0.00,FALSE,none,,P,2,,,,,,,,,,,XXXX4797,Visa,,,,,,,03NAEDPDJAN8S9P2BCPOSM7,,,,,,,,,,"
],
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
获取客户资料
请求
{
"getCustomerProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"customerProfileId": "1512089543"
}
}
回应
{
"profile": {
"paymentProfiles": [
{
"customerPaymentProfileId": "1512108080",
"payment": {
"creditCard": {
"cardNumber": "XXXX4797",
"expirationDate": "XXXX",
"cardType": "Visa"
}
},
"billTo": {
"phoneNumber": "800-555-1234",
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345"
}
}
],
"shipToList": [
{
"customerAddressId": "1511600096",
"phoneNumber": "800-555-1234",
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345"
}
],
"profileType": "regular",
"customerProfileId": "1512089543",
"merchantCustomerId": "70276167",
"email": "user01@example.com"
},
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
更新客户付款资料
请求
{
"updateCustomerPaymentProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"customerProfileId": "1512089543",
"paymentProfile": {
"billTo": {
"firstName": "John",
"lastName": "Doe",
"company": "",
"address": "123 Main St.",
"city": "Bellevue",
"state": "WA",
"zip": "98004",
"country": "USA",
"phoneNumber": "800-555-1234",
"faxNumber": "800-555-1234"
},
"payment": {
"creditCard": {
"cardNumber": "XXXX4797",
"expirationDate": "XXXX"
}
},
"customerPaymentProfileId": "1512108080"
}
}
}
回应
{
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
我有一个接受信用卡并将配置文件保存到 authorize.net 的 c# 应用程序。充值成功,资料保存成功。
如果用户想要更新所有信息并重新输入他们的信用卡号、有效期和 cvc,他们可以更新他们的个人资料。
但是,我们希望能够在不更新信用卡信息的情况下更新 billTo 信息。不幸的是,每当我尝试调用 updateCustomerPaymentProfileRequest 时,都会收到需要支付信息的错误消息。
我可以读取当前配置文件,但卡号和有效期被屏蔽了。我可以取消屏蔽到期日期但不能取消卡号。
不幸的是,对 updateCustomerPaymentProfileRequest 的调用需要 paymentType,而 getProfile 调用return是一种屏蔽的支付类型,它们似乎不可互换。
事实上,即使我尝试请求公开的到期日期,它也不会return。
var request = new getCustomerPaymentProfileRequest();
request.customerProfileId = customerProfileId;
request.customerPaymentProfileId = paymentProfileId;
request.unmaskExpirationDate = true;
支付信息为屏蔽类型,屏蔽有效期
即使这给了我未掩饰的到期日期,我仍然没有信用卡号,我什至不想要它,因为我只想更新 billTo。
这可能吗?我在authorize.net上找到了这篇文章,但他们并没有真正回答问题,而且提问的人似乎已经放弃了。
Jim,付款明细可以以屏蔽格式提交(例如 XXXX1111)如果没有更新,您可以查看 Authorize.Net API 文档了解更多详情。
https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-profile (paymentProfile:不更新的敏感信息可以屏蔽)。
我能够使用屏蔽的信用卡信息成功更新付款资料。这是我使用的 JSON 请求和响应,希望能为您指明正确的方向。我会 post 我的代码,但我使用 PHP 这对你没有帮助。
创建客户资料
请求
{
"createCustomerProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"profile": {
"merchantCustomerId": 70276167,
"email": "user01@example.com",
"paymentProfiles": {
"billTo": {
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345",
"phoneNumber": "800-555-1234"
},
"payment": {
"creditCard": {
"cardNumber": "4427802641004797",
"expirationDate": "2020-12"
}
}
},
"shipToList": {
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345",
"phoneNumber": "800-555-1234"
}
},
"validationMode": "liveMode"
}
}
回应
{
"customerProfileId": "1512089543",
"customerPaymentProfileIdList": [
"1512108080"
],
"customerShippingAddressIdList": [
"1511600096"
],
"validationDirectResponseList": [
"1,1,1,This transaction has been approved.,AKXC9R,Y,40050101060,none,Test transaction for ValidateCustomerPaymentProfile.,0.00,CC,auth_only,70276167,John,Smith,,123 Main Street,Townsville,NJ,12345,,800-555-1234,,user01@example.com,,,,,,,,,0.00,0.00,0.00,FALSE,none,,P,2,,,,,,,,,,,XXXX4797,Visa,,,,,,,03NAEDPDJAN8S9P2BCPOSM7,,,,,,,,,,"
],
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
获取客户资料
请求
{
"getCustomerProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"customerProfileId": "1512089543"
}
}
回应
{
"profile": {
"paymentProfiles": [
{
"customerPaymentProfileId": "1512108080",
"payment": {
"creditCard": {
"cardNumber": "XXXX4797",
"expirationDate": "XXXX",
"cardType": "Visa"
}
},
"billTo": {
"phoneNumber": "800-555-1234",
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345"
}
}
],
"shipToList": [
{
"customerAddressId": "1511600096",
"phoneNumber": "800-555-1234",
"firstName": "John",
"lastName": "Smith",
"address": "123 Main Street",
"city": "Townsville",
"state": "NJ",
"zip": "12345"
}
],
"profileType": "regular",
"customerProfileId": "1512089543",
"merchantCustomerId": "70276167",
"email": "user01@example.com"
},
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
更新客户付款资料
请求
{
"updateCustomerPaymentProfileRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"customerProfileId": "1512089543",
"paymentProfile": {
"billTo": {
"firstName": "John",
"lastName": "Doe",
"company": "",
"address": "123 Main St.",
"city": "Bellevue",
"state": "WA",
"zip": "98004",
"country": "USA",
"phoneNumber": "800-555-1234",
"faxNumber": "800-555-1234"
},
"payment": {
"creditCard": {
"cardNumber": "XXXX4797",
"expirationDate": "XXXX"
}
},
"customerPaymentProfileId": "1512108080"
}
}
}
回应
{
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}