Confirmation

Processor of confirmation activity.

package

Default

Methods

Initialize the processor.

__construct(\Dotpay\Model\Configuration $config, \Dotpay\Resource\Payment $paymentApi, \Dotpay\Resource\Seller $sellerApi) 

Arguments

$config

\Dotpay\Model\Configuration

Object of Dotpay configuration

$paymentApi

\Dotpay\Resource\Payment

Object of payment resource

$sellerApi

\Dotpay\Resource\Seller

Object of seller resource

Add a new message to te collector.

addOutputMessage(string $message, boolean $endOfSection = false) : \Dotpay\Processor\Confirmation

Arguments

$message

string

Message to add

$endOfSection

boolean

Flag if the given message is last in a section

Response

\Dotpay\Processor\Confirmation

Check if the given currency is compatible with a currency of the order.

checkCurrency() : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationDataException

Thrown when the given currency is different than original currency

Response

boolean

Check if the IP address of a notification is correct.

checkIp() : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationDataException

Thrown when IP address of a notification is incorrect

Response

boolean

Check if a HTTP method used during confirmation is correct.

checkMethod() : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationDataException

Thrown when sed HTTP method is different than POST

Response

boolean

Check if the given currency is compatible with a currency of the order.

checkPaymentAmount() : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationDataException

Thrown when the given amount is different than original amount

Response

boolean

Check if the notification data is correct through calculating a signature.

checkSignature() : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationDataException

Thrown if the given signature is different than calculated based on the notification data

Response

boolean

Collect informations about shop which can be displayed for diagnostic.

completeInformations() 

Execute the processor for making all confirmation's activities.

execute(\Dotpay\Model\Payment $payment, \Dotpay\Model\Notification $notification) : boolean
Throws
\Dotpay\Exception\Processor\ConfirmationInfoException

Thrown when info for customer service can be cought and displayed

Arguments

$payment

\Dotpay\Model\Payment

Payment data

$notification

\Dotpay\Model\Notification

Notification data

Response

boolean

Return a Seller object with a data of seller which applies the given notivication.

getSeller() : \Dotpay\Model\Seller
Throws
\Dotpay\Exception\SellerNotRecognizedException

Thrown when a seller is not recognized in configuration

Response

\Dotpay\Model\Seller

Make a payment and execute all additional actions.

makePayment() : boolean

Response

boolean

Make a refund and execute all additional actions.

makeRefund() : boolean

Response

boolean

Set an action which is executed during making a payment.

setMakePaymentAction(\Dotpay\Action\MakePaymentOrRefund $makePaymentAction) : \Dotpay\Processor\Confirmation

Arguments

$makePaymentAction

\Dotpay\Action\MakePaymentOrRefund

Action object which is executed during making a payment

Response

\Dotpay\Processor\Confirmation

Set an action which is executed during making a refund.

setMakeRefundAction(\Dotpay\Action\MakePaymentOrRefund $makeRefundAction) : \Dotpay\Processor\Confirmation

Arguments

$makeRefundAction

\Dotpay\Action\MakePaymentOrRefund

Action object which is executed during making a refund

Response

\Dotpay\Processor\Confirmation

Set an action which is executed during updateing a credit card data.

setUpdateCcAction(\Dotpay\Action\UpdateCcInfo $updateCcAction) : \Dotpay\Processor\Confirmation

Arguments

$updateCcAction

\Dotpay\Action\UpdateCcInfo

Action object which is executed during updateing a credit card data

Response

\Dotpay\Processor\Confirmation

Properties

Container of a collected message

outputMessage : string
var

Container of a collected message

Type(s)

string

Object of Dotpay configuration

config : \Dotpay\Model\Configuration
var

Object of Dotpay configuration

Type(s)

\Dotpay\Model\Configuration

Object of payment resource

paymentApi : \Dotpay\Resource\Payment
var

Object of payment resource

Type(s)

\Dotpay\Resource\Payment

Object of seller resource

sellerApi : \Dotpay\Processor\SellerApi
var

Object of seller resource

Type(s)

\Dotpay\Processor\SellerApi

Object with payment data

payment : \Dotpay\Model\Payment
var

Object with payment data

Type(s)

\Dotpay\Model\Payment

Object with notification data

notification : \Dotpay\Model\Notification
var

Object with notification data

Type(s)

\Dotpay\Model\Notification

Action object which is executed during updateing a credit card data

updateCcAction : \Dotpay\Action\UpdateCcInfo
var

Action object which is executed during updateing a credit card data

Type(s)

\Dotpay\Action\UpdateCcInfo

Action object which is executed during making a payment

makePaymentAction : \Dotpay\Action\MakePaymentOrRefund
var

Action object which is executed during making a payment

Type(s)

\Dotpay\Action\MakePaymentOrRefund

Action object which is executed during making a refund

makeRefundAction : \Dotpay\Action\MakePaymentOrRefund
var

Action object which is executed during making a refund

Type(s)

\Dotpay\Action\MakePaymentOrRefund