SilverStripe\Omnipay\Service\VoidService::initiate
Void/cancel a payment
If the transaction-reference of the payment to capture is known, pass it via $data as `transactionReference` parameter. Otherwise the service will try to look up the reference from previous payment messages. If there's no transaction-reference to be found, this method will raise an exception.
Signature
public function initiate([array
$data = ] )
Parameters
$data
— array- payment data
Returns
- void
- the service response
Errors/Exceptions
-
MissingParameterException
- if no transaction reference can be found from messages or parameters
-
InvalidStateException
- when the payment is in a state that prevents running `complete`
-
InvalidConfigurationException
- when there's a misconfiguration in the module itself