Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The AMI_PaymentSystemDriver class

BILL_driver_base
   |
   --AMI_PaymentSystemDriver

• Introduction

Payment system driver.

• Class synopsis

AMI_PaymentSystemDriver extends BILL_driver_base {
/* Properties */
// Driver path relative to pay_drivers/
protected string $driverName = '';
/* Methods */
// Get checkout button HTML form.
public getPayButton ( &$aRes, $aData, [ bool $bAutoRedirect = false ] ) returns bool;
// Get the form that will be autosubmitted to payment system. This step is required for some shooping cart actions.
public getPayButtonParams ( $aData, &$aRes ) returns bool;
// Return real system order id from data that provided by payment system.
public getProcessOrder ( $aGet, $aPost, &$aRes, $aAdditionalParams ) returns int;
// Do required operations after the payment is confirmed with payment system call.
public onPaymentConfirmed ( int $orderId ) returns void;
// Verify the order by payment system background responce. In success case 'confirmed' status will be setup for order.
public payCallback ( $aGet, $aPost, &$aRes, $aCheckData, $aOrderData ) returns int;
// Verify the order from user back link. In success case 'accepted' status will be setup for order.
public payProcess ( $aGet, $aPost, &$aRes, $aCheckData, $aOrderData ) returns bool;
// Returns scope as HTML form hidden fields.
protected getScopeAsFormHiddenFields ( $aScope ) returns string;
}
Tags:
abstract
since 5.10.0

• Class Properies

protected string $driverName

Driver path relative to pay_drivers/

• Class Methods

// Get checkout button HTML form.
public getPayButton ( &$aRes, $aData, [ bool $bAutoRedirect = false ] ) returns bool;
  • array &$aRes
    Will contain "error" (error description, 'Success by default') and "errno" (error code, 0 by default). "forms" will contain a created form
  • array $aData
    The data list for button generation
  • bool $bAutoRedirect
    If form autosubmit required (directly from checkout page)

Overridden in child classes as: Example_PaymentSystemDriver::getPayButton().

// Get the form that will be autosubmitted to payment system. This step is required for some shooping cart actions.
public getPayButtonParams ( $aData, &$aRes ) returns bool;
  • array $aData
    The data list for button generation
  • array &$aRes
    Will contain "error" (error description, 'Success by default') and "errno" (error code, 0 by default). "forms" will contain a created form

Overridden in child classes as: Example_PaymentSystemDriver::getPayButtonParams().

// Return real system order id from data that provided by payment system.
public getProcessOrder ( $aGet, $aPost, &$aRes, $aAdditionalParams ) returns int;
  • array $aGet
    HTTP GET variables
  • array $aPost
    HTTP POST variables
  • array &$aRes
    Reserved array reference
  • array $aAdditionalParams
    Reserved array

Overridden in child classes as: Example_PaymentSystemDriver::getProcessOrder().

// Do required operations after the payment is confirmed with payment system call.
public onPaymentConfirmed ( int $orderId ) returns void;
  • int $orderId
    Id of order in the system will be passed to this function
// Verify the order by payment system background responce. In success case 'confirmed' status will be setup for order.
public payCallback ( $aGet, $aPost, &$aRes, $aCheckData, $aOrderData ) returns int;
  • array $aGet
    HTTP GET variables
  • array $aPost
    HTTP POST variables
  • array &$aRes
    Reserved array reference
  • array $aCheckData
    Data that provided in driver configuration
  • array $aOrderData
    Order data that contains such fields as id, total, order_date, status

Overridden in child classes as: Example_PaymentSystemDriver::payCallback().

// Verify the order from user back link. In success case 'accepted' status will be setup for order.
public payProcess ( $aGet, $aPost, &$aRes, $aCheckData, $aOrderData ) returns bool;
  • array $aGet
    HTTP GET variables
  • array $aPost
    HTTP POST variables
  • array &$aRes
    Reserved array reference
  • array $aCheckData
    Data that provided in driver configuration
  • array $aOrderData
    Order data that contains such fields as id, total, order_date, status

Overridden in child classes as: Example_PaymentSystemDriver::payProcess().

// Returns scope as HTML form hidden fields.
protected getScopeAsFormHiddenFields ( $aScope ) returns string;
  • array $aScope
    Varisbles
Tags:
since 6.0.4