在authorize.net中创建客户配置文件时出错

时间:2016-09-28 14:36:44

标签: ruby-on-rails ruby authorize.net

我正在创建客户档案,我想在其中存储客户的送货地址。 为此,代码是 -

  customer_profile_request = CreateCustomerProfileRequest.new
  customer_profile_request.profile = CustomerProfileType.new(Digest::MD5.hexdigest(user.email)[0,10], user.full_name, user.email,nil,nil)
  full_address = user.customer_addresses.primary_address.try(:truncate_full_address) || 'Address'
  customer_profile_request.profile.shipToList = CustomerAddressType.new(user.first_name, 
    user.last_name, nil, full_address, 
    user.customer_addresses.primary_address.city, 
    user.customer_addresses.primary_address.state, user.customer_detail.zipcode, nil, nil, nil)
  customer_profile_response = initialize_transaction.create_customer_profile(customer_profile_request)

我收到了错误 -

“命名空间'AnetApi / xml / v1 / schema / AnetApiSchema.xsd'中的元素'shipToList'不能包含文本。期望的可能元素列表:'firstName,lastName,company,address,city,state,zip,country ,phoneNumber,faxNumber,''命名空间'中的电子邮件'AnetApi / xml / v1 / schema / AnetApiSchema.xsd'。“

我错过了什么吗?

0 个答案:

没有答案