AuthorizeNet / sample-code-ruby

This repository contains working code samples which demonstrate ruby integration with the Authorize.Net API
MIT License
25 stars 58 forks source link

Set email as correct parameter to CustomerType #43

Closed whatcould closed 7 years ago

whatcould commented 7 years ago

CustomerType takes the ID as second parameter and email as third parameter; this sample code, sending the email as the ID, works in the sandbox (inexplicably), but fails in production, where it returns an error — "The actual length is greater than the MaxLength value".

adavidw commented 7 years ago

Actually, now that I look closer at this, CustomerType isn't even the right one to use for createTransactionRequest. That doesn't become apparent until you start trying to pass more parameters, though. When you do, the request returns an error because it's sending field names that don't match the schema.

I've switched it to CustomerDataType which also takes email as the third parameter.