cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to create payment profile

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.

yorzi
Member
2 REPLIES 2
RaynorC1emen7
Expert

Oh, You are right. Thanks!