SilverStripe\Omnipay\Tests\BaseNotificationServiceTest
Base class with common tests for Void, Capture and Refund Services
Synopsis
class BaseNotificationServiceTest
extends PaymentTest
{
- // members
- protected $gatewayMethod;
- protected $fixtureIdentifier;
- protected $fixtureReceipt;
- protected $startStatus;
- protected $pendingStatus;
- protected $endStatus;
- protected $successFromFixtureMessages;
- protected $successMessages;
- protected $failureMessages;
- protected $notificationFailureMessages;
- protected $errorMessageClass;
- protected $successPaymentExtensionHooks;
- protected $initiateServiceExtensionHooks;
- protected $initiateFailedServiceExtensionHooks;
- // 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
- protected abstract PaymentService getService()
- public void testSuccess()
- public void testManualSuccess()
- public void testSuccessWithTransactionParameter()
- public void testSuccessWithLegacyTransactionParameter()
- public void testSuccessViaNotification()
- public void testFailure()
- public void testGatewayFailure()
- public void testUnsupportedGatewayMethod()
- public void testFailureViaNotification()
- public void testGatewayNotificationFailure()
- public void testNotificationTransactionReferenceMismatch()
- public void testInvalidStatus()
- public void testInvalidCompleteStatus()
- public void testMissingTransactionReference()
- public void testMethodDisabled()
- protected void buildPaymentGatewayStub()
- // 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
- $endStatus — string
- $errorMessageClass — string
- $factory — \SilverStripe\Omnipay\Service\ServiceFactory
- $factoryExtensions
- $failureMessages — array
- $fixtureIdentifier — string
- $fixtureReceipt — string
- $fixture_file
- $gatewayMethod — string
- $httpClient
- $httpRequest
- $initiateFailedServiceExtensionHooks — array
- $initiateServiceExtensionHooks — array
- $mockHandler — \GuzzleHttp\Handler\MockHandler
- $notificationFailureMessages — array
- $payment — SilverStripe\Omnipay\Model\Payment
- $pendingStatus — string
- $startStatus — string
- $successFromFixtureMessages — array
- $successMessages — array
- $successPaymentExtensionHooks — array
Methods
protected
- buildPaymentGatewayStub()
- getService() — Get the service to use for these tests
public
- testFailure()
- testFailureViaNotification()
- testGatewayFailure()
- testGatewayNotificationFailure()
- testInvalidCompleteStatus()
- testInvalidStatus()
- testManualSuccess()
- testMethodDisabled()
- testMissingTransactionReference()
- testNotificationTransactionReferenceMismatch()
- testSuccess()
- testSuccessViaNotification()
- testSuccessWithLegacyTransactionParameter()
- testSuccessWithTransactionParameter()
- testUnsupportedGatewayMethod()