sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

Escaping JSON values

Open LeftPinkie opened this issue 6 months ago • 0 comments

I am using PHP SDK "authorizenet/authorizenet", version 2.0. Today I received error "E00013 Extra Options is invalid" when I went to charge a card "create a transaction API". I found out the issue was that I had an ampersand in the PO # even though the documents states that the poNumber field is a JSON string. The solution or work-around is to escape the ampersand character.

A few questions:

  1. why would a JSON-encapsulated string field cause this error?
  2. Are there any other string fields that would need escaping?
  3. The "E00013 Extra Options is invalid" is misleading and not accurate.

LeftPinkie avatar Aug 03 '24 02:08 LeftPinkie