Closed duncanmcclean closed 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.
Gateway
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
$request
$order
Prepare
Response
purchase
checkout
purchaseRules
checkoutRules
purchaseMessages
checkoutMessages
getCharge
refundCharge
refund
array
paymentDisplay
fieldtypeDisplay
Released as part of v5.0.0.
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
$request
and$order
parameters, instead of aPrepare
object.Response
, instead it simply returns an array.purchase
checkout
$request
and$order
parameters, instead of aPrepare
object.Response
, instead it simply returns an array.purchaseRules
checkoutRules
purchaseMessages
checkoutMessages
getCharge
refundCharge
refund
array
. The contents of which will be saved to the order's gateway data for future reference.paymentDisplay
fieldtypeDisplay
To Do
refund
method for future reference