AuthorizeNet / sample-code-ruby

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

Repair all broken examples with the correct messages API reference #73

Closed alextaujenis closed 1 year ago

alextaujenis commented 1 year ago

Description

Most of the Ruby examples in this repository are broken. They reference response.messages.messages, which is incorrect. The API actually returns the response.messages.message object (the last message object is not plural).

There are also incorrect references to response.transactionResponse.messages.messages, where the API actually returns response.transactionResponse.messages (notice the missing child object messages).

This PR fixes the issue across the repository to align the code with the actual response objects from the API.

On a side note...

I'm astonished that this repo is riddled with these blatant copy-pasta bugs. All of these Ruby examples are injected into the official Authorize.net documentation located at https://developer.authorize.net/api/reference, so it's bewildering why something with so much exposure is so wrong.