Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated schema.rb for correct serialization #94

Closed
wants to merge 1 commit into from

Conversation

iamchucky
Copy link

When using CreateCustomerProfileRequest and passing payment profile into CustomerProfileType, the paymentProfiles doesn't get properly serialized.

Same problem when getting the payment profile id from the response, the id should be in the numericString list

Code snippet when problem happened:

request = CreateCustomerProfileRequest.new

payment = PaymentType.new(CreditCardType.new('4111111111111111','2020-05'))
profile = CustomerPaymentProfileType.new(nil,nil,payment,nil,nil)

request.profile = CustomerProfileType.new(
      user.id.to_s,         # merchantCustomerId
      user.display_name,    # description
      user.email,           # email
      [profile],            # paymentProfiles
      nil)                  # shipToList

response = transaction.create_customer_profile(request)

Using above code will return error:
The element 'paymentProfiles' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' cannot contain text. List of possible elements expected: 'customerType, billTo, payment, driversLicense, taxId' in namespace 'AnetApi/xml/v1/sch ema/AnetApiSchema.xsd'.

When using CreateCustomerProfileRequest and passing payment profile into CustomerProfileType, the paymentProfiles doesn't get properly serialized.

Same problem when getting the payment profile id from the response, the id should be in the numericString list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant