SilverStripe\Omnipay\Service\RefundService
Synopsis
class RefundService
extends NotificationCompleteService
{
- // members
- protected string $startState = 'Captured';
- protected string $endState = 'Refunded';
- protected string $pendingState = 'PendingRefund';
- protected $requestMessageType = Message\RefundRequest::class;
- protected $errorMessageType = Message\RefundError::class;
- // Inherited members from NotificationCompleteService
- protected $startState;
- protected $endState;
- protected $pendingState;
- protected $requestMessageType;
- protected $errorMessageType;
- // Inherited members from PaymentService
- protected Payment $payment;
- protected AbstractResponse $response;
- protected GatewayFactory $gatewayFactory;
- // methods
- public void initiate()
- protected void markCompleted()
- // Inherited methods from NotificationCompleteService
- public ServiceResponse complete()
- protected void notificationFailure()
- // Inherited methods from PaymentService
- public void __construct()
- public abstract ServiceResponse initiate()
- public abstract ServiceResponse complete()
- public ServiceResponse cancel()
- public Payment getPayment()
- public GatewayInterface|AbstractGateway oGateway()
- public ServiceResponse handleNotification()
- protected array gatherGatewayData()
- protected string getEndpointUrl()
- protected ServiceResponse wrapOmnipayResponse()
- protected void markCompleted()
- protected Payment createPartialPayment()
- protected ServiceResponse generateServiceResponse()
- protected PaymentMessage createMessage()
- protected void logToFile()
- public GatewayFactory getGatewayFactory()
- public $this setGatewayFactory()
- protected CreditCard getCreditCard()
Hierarchy
Members
protected
- $endState
- $endState — string
- $errorMessageType
- $errorMessageType — string
- $gatewayFactory — Omnipay\Common\GatewayFactory
- $payment — SilverStripe\Omnipay\Model\Payment
- $pendingState
- $pendingState — string
- $requestMessageType
- $requestMessageType — string
- $response — Omnipay\Common\Message\AbstractResponse
- $startState
- $startState — string
Methods
protected
public
- initiate() — Return money to the previously charged credit card.
Inherited from SilverStripe\Omnipay\Service\NotificationCompleteService
protected
- notificationFailure() — Method to handle notification failures. Here we have to check if the gateway actually reported a failure and then update the payment status accordingly!
public
- complete() — Complete a pending task.
Inherited from SilverStripe\Omnipay\Service\PaymentService
protected
- createMessage() — Record a transaction on this for this payment.
- createPartialPayment() — Create a partial payment that will be based on the current payment.
- gatherGatewayData() — Collect common data parameters to pass to the gateway.
- generateServiceResponse() — Generate a service response
- getCreditCard()
- getEndpointUrl() — Generate a return/notify url for off-site gateways (completePayment).
- logToFile() — Helper function for logging gateway requests
- markCompleted() — Mark this payment process as completed.
- wrapOmnipayResponse() — Get a service response from the given Omnipay response
public
- cancel() — Cancel a payment
- complete() — Complete a previously initiated gateway request.
- getGatewayFactory()
- getPayment() — Get the payment associated with this service.
- handleNotification() — Handle a notification via gateway->acceptNotification.
- initiate() — Initiate a gateway request with some user/application supplied data.
- oGateway() — Get the omnipay gateway associated with this payment, with configuration applied.
- setGatewayFactory()