academe / SagePay-Integration

HTTP Messages for the Sage Pay REST (Pi) gateway.
GNU General Public License v3.0
9 stars 5 forks source link

Some general restructuring #45

Closed judgej closed 7 years ago

judgej commented 7 years ago

A few assumptions made now are being revised as the API progresses.

One big change is that some models have both a Request and a Response form (e.g. Card). It makes sense to create these under the relevant Request or Response directories (in Model subdirectories since these are not raw PSR-7 messages).

In addition, the way error handling works is now a little clearer. A transaction failure is not an error condition if the transaction fails to authenticate for remote reasons. It is a valid response that happens not to be successful. A missing address field, for example, is an error, since the transaction could not be progressed.

judgej commented 7 years ago

An issue45 branch has been created for these changes. It will be a significant update as many classes and interfaces have moved.

judgej commented 7 years ago

The main restructuring is done. Need to create some additional live tests to confirm all is still working.