duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
147 stars 41 forks source link

v5.0: Improve DX of Gateways #811

Closed duncanmcclean closed 1 year ago

duncanmcclean commented 1 year ago

This pull request aims to improve the developer experience around building custom payment gateways.

The signatures for gateway methods have changed. Instead of dealing with custom objects, you're now dealing with simple arrays.

For developers building gateways for the first time, the Gateway contract now includes some documentation about each of the methods in docblocks.

Upgrade Guide

As part of improving the developer experience, there's been some changes the API for implementing custom gateways.

If you're using a custom gateway, you will need to make some manual changes:

prepare

purchase

purchaseRules

purchaseMessages

getCharge

refundCharge

paymentDisplay

To Do

github-actions[bot] commented 1 year ago

Released as part of v5.0.0.