PaymentClient

Utility class for connecting to NextEvent's Payment Service API

internal
package

NextEvent\PHPSDK\Service

Methods

PaymentClient constructor

__construct(\Psr\Log\LoggerInterface $logger) 

Arguments

$logger

\Psr\Log\LoggerInterface

Abort payment with reason

abortPayment(\NextEvent\PHPSDK\Model\Token $paymentToken, \NextEvent\PHPSDK\Model\Payment $payment, string $reason) : boolean
Throws
\NextEvent\PHPSDK\Exception\PaymentNotFoundException
\NextEvent\PHPSDK\Exception\APIResponseException
\Exception

Arguments

$paymentToken

\NextEvent\PHPSDK\Model\Token

Payment service access token

$payment

\NextEvent\PHPSDK\Model\Payment

Payment authorization object

$reason

string

Reason why payment is aborted

Response

boolean

True if service accepted the cancellation

Settle payment

settlePayment(\NextEvent\PHPSDK\Model\Token $paymentToken, \NextEvent\PHPSDK\Model\Payment $payment, array $customer, string $transactionId = null) : array

Confirm successful payment for the previously requested authorization

Throws
\NextEvent\PHPSDK\Exception\PaymentNotFoundException
\NextEvent\PHPSDK\Exception\APIResponseException
\Exception

Arguments

$paymentToken

\NextEvent\PHPSDK\Model\Token

Payment service access token

$payment

\NextEvent\PHPSDK\Model\Payment

Payment authorization object

$customer

array

customer information

$transactionId

string

Reference transaction-id if you have one

Response

array

Hash array with Payment transaction data