使用authorizenet gem 1.8.9
ruby 1.9.3
尝试创建客户档案时我收到此错误
require 'authorizenet'
transaction = AuthorizeNet::API::Transaction.new(some_id, some_key, :gateway => :sandbox)
request = AuthorizeNet::API::CreateCustomerProfileRequest.new(nil,nil,nil, 'liveMode')
request.profile = AuthorizeNet::API::CustomerProfileType.new("sumeetyesme1870", "sumeet new","sumeet@example.com")
实际要求
request
=> #<AuthorizeNet::API::CreateCustomerProfileRequest:0x0000000652d4c8
@merchantAuthentication=nil,
@profile=
#<AuthorizeNet::API::CustomerProfileType:0x000000067c6c98
@description="sumeet new",
@email="sumeet@masih.com",
@merchantCustomerId="sumeetMasih1870",
@paymentProfiles=[],
@shipToList=[]>,
@refId=nil,
@validationMode="liveMode">
response = transaction.create_customer_profile(request)
关于打印回复
puts response.messages.messages[0].code
我得到E00003
puts response.messages.messages[0].text
命名空间'AnetApi / xml / v1 / schema / AnetApiSchema.xsd'中的元素'paymentProfiles'不能包含文本。预期可能元素的列表:命名空间'AnetApi / xml / v1 / schema / AnetApiSchema.xsd'中的'customerType,billTo,payment,driversLicense,taxId,defaultPaymentProfile'。