classIpay extends CApplicationComponent {/**
* Normal iPay88 payment method*/
const TRANSACTION_TYPE_PAYMENT = 'payment';/**
* Normal iPay88 recurring payment subscription*/
const TRANSACTION_TYPE_RECURRING_SUBSCRIPTION = 'recurring_subscription';/**
* Normal iPay88 recurring payment termination*/
const TRANSACTION_TYPE_RECURRING_TERMINATION = 'recurring_termination';/**
* Merchant code assigned by iPay88*/
public$merchantCode;/**
* Merchant Key assigned by iPay88*/
public$merchantKey;/**
* Currency Code max length 5*/
public$currencyCode;/**
* Merchant code assigned by iPay88*/
public$responseUrl;/** Response Url or Return Url after payment*/
public$paymentUrl;/** Backend Url or Notify Url after payment (Send response by iPay88 server)*/
public$backendUrl;/** Requery from iPay88 server regarding bill details*/
public$requeryUrl;/** ipay88 Recurring Payment Url*/
public$recurringUrlSubscription;/** ipay88 Recurring Payment Termination Url*/
public$recurringUrlTermination;/** Details to be sent to IPay88 for payment request.*/
private $paymentRequest =array('MerchantCode', //Merchant code assigned by iPay88. (length 20)
'PaymentId', //(Optional) (int)
'RefNo', //Unique merchant transaction number / Order ID (Retry for same RefNo only valid for 30 mins). (length 20)
'Amount', //Payment amount with two decimals.
'Currency', //(length 5)
'ProdDesc', //Product description. (length 100)
'UserName', //Customer name. (length 100)
'UserEmail', //Customer email. (length 100)
'UserContact', //Customer contact. (length 20)
'Remark', //(Optional) Merchant remarks. (length 100)
'Lang', //(Optional) Encoding type:- ISO-8859-1 (English), UTF-8 (Unicode), GB2312 (Chinese Simplified), GD18030 (Chinese Simplified), BIG5 (Chinese Traditional)
'Signature','ResponseURL','BackendURL',
);/** Details to be sent to iPay88 for recurring subscription payment request.*/
private $recurringSubscriptionRequest =array('MerchantCode', //Merchant code assigned by iPay88. (length 20)
'RefNo', //Unique merchant transaction number / Order ID. (length 20)
'FirstPaymentDate', //(ddmmyyyy)
'Currency', //MYR only. (length 5)
'Amount', //Payment amount with two decimals.
'NumberOfPayments', //(int)
'Frequency', //Frequency type; 1 - Monthly, 2 - Quarterly, 3 - Half-Yearly, 4 - Yearly. (int)
'Desc', //Product description. (length 100)
'CC_Name', //Name printed on credit card. (len