SilverStripe\Omnipay\Tests\PurchaseServiceTest
Synopsis
class PurchaseServiceTest
extends BasePurchaseServiceTest
{
- // members
- protected string $completeStatus = 'Captured';
- protected string $pendingStatus = 'PendingPurchase';
- protected string $omnipayMethod = 'purchase';
- protected string $omnipayCompleteMethod = 'completePurchase';
- protected array $onsiteSuccessMessages = ;
- protected array $onsiteFailMessages = ;
- protected array $failMessages = ;
- protected array $offsiteSuccessMessages = ;
- protected array $offsiteFailMessages = ;
- protected $failureMessageClass = Message\CompletePurchaseError::class;
- protected string $paymentId = 'UNIQUEHASH23q5123tqasdf';
- protected array $successPaymentExtensionHooks = ;
- protected array $notifyPaymentExtensionHooks = ;
- protected array $initiateServiceExtensionHooks = ;
- protected array $initiateFailedServiceExtensionHooks = ;
- protected array $completeServiceExtensionHooks = ;
- // Inherited members from BasePurchaseServiceTest
- protected $completeStatus;
- protected $pendingStatus;
- protected $omnipayMethod;
- protected $omnipayCompleteMethod;
- protected $onsiteSuccessMessages;
- protected $onsiteFailMessages;
- protected $failMessages;
- protected $offsiteSuccessMessages;
- protected $offsiteFailMessages;
- protected $failureMessageClass;
- protected $successPaymentExtensionHooks;
- protected $notifyPaymentExtensionHooks;
- protected $initiateServiceExtensionHooks;
- protected $initiateFailedServiceExtensionHooks;
- protected $completeServiceExtensionHooks;
- protected $paymentId;
- // Inherited members from PaymentTest
- protected static string $fixture_file;
- protected boolean $autoFollowRedirection;
- protected Payment $payment;
- protected ServiceFactory $factory;
- protected $httpClient;
- protected $httpRequest;
- protected MockHandler $mockHandler;
- protected static $factoryExtensions;
- // methods
- public void setUp()
- public void tearDown()
- protected void getService()
- // Inherited methods from BasePurchaseServiceTest
- protected abstract PaymentService getService()
- public void testDummyOnSitePayment()
- public void testFailedDummyOnSitePayment()
- public void testOnSitePayment()
- public void testInvalidOnsitePayment()
- public void testFailedOnSitePayment()
- public void testOffSitePayment()
- public void testFailedOffSitePayment()
- public void testFailedOffSiteCompletePayment()
- public void testNonExistantGateway()
- public void testPaymentInvalidStatus()
- public void testCompletePaymentInvalidStatus()
- public void testGatewayDoesntSupportMethod()
- public void testGatewayDoesntSupportCompleteMethod()
- public void testGatewayCompleteMethodFailure()
- public void testTokenGateway()
- public void testTokenGatewayWithAlternateKey()
- public void testAsyncPaymentConfirmation()
- public void testAsyncPaymentConfirmationIncomingFirst()
- public void testPaymentGatewayControllerConfirmationIncomingFirst()
- protected void buildPaymentGatewayStub()
- protected AbstractRequest stubRequest()
- // Inherited methods from PaymentTest
- public static void setUpBeforeClass()
- public static void tearDownAfterClass()
- protected void setUp()
- protected void getHttpClient()
- public void getHttpRequest()
- protected void setMockHttpResponse()
- protected PHPUnit_Framework_MockObject_MockObject|GatewayFactory stubGatewayFactory()
Hierarchy
Tasks
Line | Task |
---|---|
150 | improve? |
Members
protected
- $autoFollowRedirection
- $completeServiceExtensionHooks
- $completeServiceExtensionHooks — array
- $completeStatus
- $completeStatus — string
- $factory — \SilverStripe\Omnipay\Service\ServiceFactory
- $factoryExtensions
- $failMessages
- $failMessages — array
- $failureMessageClass
- $failureMessageClass — string
- $fixture_file
- $httpClient
- $httpRequest
- $initiateFailedServiceExtensionHooks
- $initiateFailedServiceExtensionHooks — array
- $initiateServiceExtensionHooks
- $initiateServiceExtensionHooks — array
- $mockHandler — \GuzzleHttp\Handler\MockHandler
- $notifyPaymentExtensionHooks
- $notifyPaymentExtensionHooks — array
- $offsiteFailMessages
- $offsiteFailMessages — array
- $offsiteSuccessMessages
- $offsiteSuccessMessages — array
- $omnipayCompleteMethod
- $omnipayCompleteMethod — string
- $omnipayMethod
- $omnipayMethod — string
- $onsiteFailMessages
- $onsiteFailMessages — array
- $onsiteSuccessMessages
- $onsiteSuccessMessages — array
- $payment — SilverStripe\Omnipay\Model\Payment
- $paymentId
- $paymentId — string
- $pendingStatus
- $pendingStatus — string
- $successPaymentExtensionHooks
- $successPaymentExtensionHooks — array
Methods
protected
public
Inherited from SilverStripe\Omnipay\Tests\BasePurchaseServiceTest
protected
- buildPaymentGatewayStub()
- getService() — Create a payment service instance
- stubRequest()
public
- testAsyncPaymentConfirmation()
- testAsyncPaymentConfirmationIncomingFirst()
- testCompletePaymentInvalidStatus()
- testDummyOnSitePayment()
- testFailedDummyOnSitePayment()
- testFailedOffSiteCompletePayment()
- testFailedOffSitePayment()
- testFailedOnSitePayment()
- testGatewayCompleteMethodFailure()
- testGatewayDoesntSupportCompleteMethod()
- testGatewayDoesntSupportMethod()
- testInvalidOnsitePayment()
- testNonExistantGateway()
- testOffSitePayment()
- testOnSitePayment()
- testPaymentGatewayControllerConfirmationIncomingFirst()
- testPaymentInvalidStatus()
- testTokenGateway()
- testTokenGatewayWithAlternateKey()