You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotations for optional methods on GatewayInterface
This should help IDE's with code completion and suggestions on the gateway methods and return values (which doesn't work very well at the moment).
I understand that these methods are optional - so this may not be the right way to address this issue. My personal opinion is that documenting the method as optional in the annotation is better than not documenting it all.
There are also lots of methods in the AbstractGateway that I think should be included in the GatewayInterface (supportsAuthorize, supportsCompleteAuthorize, supportsCapture, etc...). I wanted to know peoples thoughts on this before I spent the time on a PR.
Copy file name to clipboardExpand all lines: src/Omnipay/Common/GatewayInterface.php
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,17 @@
12
12
* Omnipay gateway needs to define.
13
13
*
14
14
* @see AbstractGateway
15
+
*
16
+
* @method \Omnipay\Common\Message\ResponseInterface authorize(array $options = array()) (Optional method) Authorize an amount on the customers card
17
+
* @method \Omnipay\Common\Message\ResponseInterface completeAuthorize(array $options = array()) (Optional method) Handle return from off-site gateways after authorization
18
+
* @method \Omnipay\Common\Message\ResponseInterface capture(array $options = array()) (Optional method) Capture an amount you have previously authorized
19
+
* @method \Omnipay\Common\Message\ResponseInterface purchase(array $options = array()) (Optional method) Authorize and immediately capture an amount on the customers card
20
+
* @method \Omnipay\Common\Message\ResponseInterface completePurchase(array $options = array()) (Optional method) Handle return from off-site gateways after purchase
* @method \Omnipay\Common\Message\ResponseInterface void(array $options = array()) (Optional method) Generally can only be called up to 24 hours after submitting a transaction
23
+
* @method \Omnipay\Common\Message\ResponseInterface createCard(array $options = array()) (Optional method) The returned response object includes a cardReference, which can be used for future transactions
0 commit comments