Documentation

CRM_Core_Payment_PaypalProTrait uses trait:short

Class CRM_Core_Payment_AuthorizeNetTest

Tags
group

headless

Table of Contents

Properties

$baseUri  : string
The url to mock-interact with.
$container  : array<string|int, mixed>
Array containing guzzle history of requests and responses.
$guzzleClient  : Client
$isRecur  : bool
Is this a recurring transaction.
$mockHandler  : MockHandler
Mockhandler to simulate guzzle requests.
$processor  : CRM_Core_Payment_PayPalImpl

Methods

getBaseUri()  : mixed
getContainer()  : array<string|int, mixed>
getExpectedRecurResponses()  : array<string|int, mixed>
Get the expected request from Authorize.net.
getExpectedSinglePaymentRequests()  : array<string|int, mixed>
Get the expected request from Authorize.net.
getExpectedSinglePaymentResponses()  : array<string|int, mixed>
Get the expected response from Paypal Pro for a single payment.
getGuzzleClient()  : Client
getMockHandler()  : MockHandler
setBaseUri()  : mixed
setContainer()  : mixed
setGuzzleClient()  : mixed
setMockHandler()  : mixed
createMockHandler()  : mixed
createMockHandlerForFiles()  : mixed
createPaypalProProcessor()  : mixed
Create an AuthorizeNet processors with a configured mock handler.
getRequestBodies()  : array<string|int, mixed>
Get the bodies of the requests sent via Guzzle.
getRequestHeaders()  : array<string|int, mixed>
Get the bodies of the requests sent via Guzzle.
getRequestUrls()  : array<string|int, mixed>
Get the bodies of the requests sent via Guzzle.
getResponseBodies()  : array<string|int, mixed>
Get the bodies of the responses returned via Guzzle.
setUpClientWithHistoryContainer()  : mixed
Set up a guzzle client with a history container.
setupMockHandler()  : mixed
Add a mock handler to the paypal Pro processor for testing.

Properties

$container

Array containing guzzle history of requests and responses.

protected array<string|int, mixed> $container

$isRecur

Is this a recurring transaction.

protected bool $isRecur = \FALSE

$mockHandler

Mockhandler to simulate guzzle requests.

protected MockHandler $mockHandler

Methods

getContainer()

public getContainer() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExpectedRecurResponses()

Get the expected request from Authorize.net.

public getExpectedRecurResponses() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExpectedSinglePaymentRequests()

Get the expected request from Authorize.net.

public getExpectedSinglePaymentRequests() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExpectedSinglePaymentResponses()

Get the expected response from Paypal Pro for a single payment.

public getExpectedSinglePaymentResponses() : array<string|int, mixed>
Return values
array<string|int, mixed>

getGuzzleClient()

public getGuzzleClient() : Client
Return values
Client

getMockHandler()

public getMockHandler() : MockHandler
Return values
MockHandler

setBaseUri()

public setBaseUri(mixed $baseUri) : mixed
Parameters
$baseUri : mixed

setContainer()

public setContainer(array<string|int, mixed> $container) : mixed
Parameters
$container : array<string|int, mixed>

setGuzzleClient()

public setGuzzleClient(Client $guzzleClient) : mixed
Parameters
$guzzleClient : Client

setMockHandler()

public setMockHandler(MockHandler $mockHandler) : mixed
Parameters
$mockHandler : MockHandler

createMockHandler()

protected createMockHandler(mixed $responses) : mixed
Parameters
$responses : mixed

createMockHandlerForFiles()

protected createMockHandlerForFiles(mixed $files) : mixed
Parameters
$files : mixed

createPaypalProProcessor()

Create an AuthorizeNet processors with a configured mock handler.

protected createPaypalProProcessor() : mixed
Tags
throws
CRM_Core_Exception

getRequestBodies()

Get the bodies of the requests sent via Guzzle.

protected getRequestBodies() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRequestHeaders()

Get the bodies of the requests sent via Guzzle.

protected getRequestHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRequestUrls()

Get the bodies of the requests sent via Guzzle.

protected getRequestUrls() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResponseBodies()

Get the bodies of the responses returned via Guzzle.

protected getResponseBodies() : array<string|int, mixed>
Return values
array<string|int, mixed>

setUpClientWithHistoryContainer()

Set up a guzzle client with a history container.

protected setUpClientWithHistoryContainer() : mixed

After you have run the requests you can inspect $this->container for the outgoing requests and incoming responses.

If $this->mock is defined then no outgoing http calls will be made and the responses configured on the handler will be returned instead of replies from a remote provider.

setupMockHandler()

Add a mock handler to the paypal Pro 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