CRM_Core_Payment_AuthorizeNetTrait
Class CRM_Core_Payment_AuthorizeNetTest
Tags
Table of Contents
Properties
- $isRecur : bool
- Is this a recurring transaction.
- $processor : CRM_Core_Payment_AuthorizeNet
Methods
- getExpectedRecurResponse() : string
- Get a successful response to setting up a recurring.
- getExpectedSinglePaymentRequest() : string
- Get the expected request from Authorize.net.
- getExpectedSinglePaymentResponse() : string
- Get the expected response from Authorize.net.
- paymentProcessorAuthorizeNetCreate() : int
- Create test Authorize.net instance.
- assertRequestValid() : void
- Assert the request sent to Authorize.net contains the expected values.
- createAuthorizeNetProcessor() : mixed
- Create an AuthorizeNet processors with a configured mock handler.
- setupMockHandler() : mixed
- Add a mock handler to the authorize.net processor for testing.
Properties
$isRecur
Is this a recurring transaction.
protected
bool
$isRecur
= \FALSE
$processor
protected
CRM_Core_Payment_AuthorizeNet
$processor
Methods
getExpectedRecurResponse()
Get a successful response to setting up a recurring.
public
getExpectedRecurResponse() : string
Return values
stringgetExpectedSinglePaymentRequest()
Get the expected request from Authorize.net.
public
getExpectedSinglePaymentRequest() : string
Return values
stringgetExpectedSinglePaymentResponse()
Get the expected response from Authorize.net.
public
getExpectedSinglePaymentResponse() : string
Return values
stringpaymentProcessorAuthorizeNetCreate()
Create test Authorize.net instance.
public
paymentProcessorAuthorizeNetCreate([array<string|int, mixed> $params = [] ][, string $identifier = 'authorize_net' ]) : int
Parameters
- $params : array<string|int, mixed> = []
- $identifier : string = 'authorize_net'
Return values
intassertRequestValid()
Assert the request sent to Authorize.net contains the expected values.
protected
assertRequestValid([array<string|int, mixed> $expected = [] ]) : void
Parameters
- $expected : array<string|int, mixed> = []
createAuthorizeNetProcessor()
Create an AuthorizeNet processors with a configured mock handler.
protected
createAuthorizeNetProcessor() : mixed
Tags
setupMockHandler()
Add a mock handler to the authorize.net processor for testing.
protected
setupMockHandler([int|null $id = NULL ]) : mixed
Parameters
- $id : int|null = NULL