Documentation

CRM_Core_Payment_AuthorizeNetTrait

Class CRM_Core_Payment_AuthorizeNetTest

Tags
group

headless

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

Methods

getExpectedRecurResponse()

Get a successful response to setting up a recurring.

public getExpectedRecurResponse() : string
Return values
string

getExpectedSinglePaymentRequest()

Get the expected request from Authorize.net.

public getExpectedSinglePaymentRequest() : string
Return values
string

getExpectedSinglePaymentResponse()

Get the expected response from Authorize.net.

public getExpectedSinglePaymentResponse() : string
Return values
string

paymentProcessorAuthorizeNetCreate()

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
int

assertRequestValid()

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
throws
CRM_Core_Exception

setupMockHandler()

Add a mock handler to the authorize.net processor for testing.

protected setupMockHandler([int|null $id = NULL ]) : mixed
Parameters
$id : int|null = NULL
Tags
throws
CRM_Core_Exception

        
On this page

Search results