SilverStripe\Omnipay\Service\ServiceFactory::getService
Create a service for the given payment and intent.
This method will look for a method named `create{Intent}Service`, where "{Intent}" has to be substituted with the intent. So an intent "authorize" will look for a method named "createAuthorizeService". The method will be called on extensions first and then on this class itself, given that no extension returned a valid PaymentService instance. If the method didn't return an instance, this will fall back to the services configuration.
Signature
public function getService(Payment
$payment,
string
$intent )
Parameters
$payment
— SilverStripe\Omnipay\Model\Payment- the payment instance
$intent
— string- the intent of the service.
Returns
- PaymentService
Errors/Exceptions
-
InvalidConfigurationException
- when creation of the service failed due to misconfiguration