Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 9
Registered: ‎12-03-2014

Failed to create payment profile

[ Edited ]

I kept getting below error message when creating a payment profile.

 

"The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:accountType' element is invalid - The value 'CHECKING' is invalid according to its datatype 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:bankAccountTypeEnum' - The Enumeration constraint failed"

 

Note: I use ruby-sdk to create the transaction as below:

=> AuthorizeNet::CIM::Transaction.new(ENV['AUTH_NET_API_LOGIN'], ENV['AUTH_NET_API_KEY'], :gateway => :sandbox)

 

Then I did something below:

=> payment_profile = AuthorizeNet::CIM::PaymentProfile.new(:payment_method => echeck)

=> response = transaction.create_payment_profile(payment_profile, '30551257')

 

I used correct bank account to create the "echeck" like below:

 

=> echeck = AuthorizeNet::ECheck.new('052002167', '9104245278', 'Valid Bank Account', 'Andy Valid Name')

 

Please help me to explain what happened here? Thanks.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Failed to create payment profile

Member
Posts: 9
Registered: ‎12-03-2014

Re: Failed to create payment profile

Oh, You are right. Thanks!