【发布时间】:2021-07-04 19:13:31
【问题描述】:
Authorize.net 上的 UI 显然有一个名称和地址信息的位置,我可以手动添加/编辑。
但我不知道如何在卡片中添加姓名信息
根据:
但是Active Merchant source file似乎只使用了卡号、有效期和卡号,而且卡上的姓名信息也没有发送到Authorize.net。
有人知道怎么做吗?
【问题讨论】:
标签: ruby authorize.net activemerchant
Authorize.net 上的 UI 显然有一个名称和地址信息的位置,我可以手动添加/编辑。
但我不知道如何在卡片中添加姓名信息
根据:
但是Active Merchant source file似乎只使用了卡号、有效期和卡号,而且卡上的姓名信息也没有发送到Authorize.net。
有人知道怎么做吗?
【问题讨论】:
标签: ruby authorize.net activemerchant
好的,为后代解决这个问题,使用bill_to:
def create_payment_profile
response = GatewayService.gateway.create_customer_payment_profile(
customer_profile_id: owner.gateway_profile,
payment_profile: {
bill_to: bill_to,
payment: {
credit_card: credit_card
}
}
)
end
def gateway_card
ActiveMerchant::Billing::CreditCard.new(
verification_value: cvv,
number: credit_card_number,
year: "20#{year}",
month: month,
)
end
def bill_to
{
first_name: first_name,
last_name: last_name,
#company: ,
#address1: ,
#address: ,
#city: ,
#state: ,
#zip: ,
#country: ,
#phone_number: ,
#fax_number: ,
#customer_address_id: ,
}
end
【讨论】: