<?php require_once './IPay88.class.php'; $ipay88 = new IPay88('MERCHANT_CODE', 'MERCHANT_KEY'); $response = $ipay88->getResponse(); ?> <!doctype html> <html> <head> <title>IPay88 - Test - Response</title> </head> <body> <h1>IPay88 payment gateway</h1> <?php if ($response['status']) { ?> <p>Your transaction was successful.</p> <?php } else { ?> <p>Your transaction failed.</p> <?php } ?> <table> <?php if ($response) { ?> <?php
<?php require_once './IPay88.class.php'; $ipay88 = new IPay88('MERCHANT_CODE', 'MERCHANT_KEY'); echo $ipay88->requery(array('RefNo' => 'REFERENCE_NUMBER', 'Amount' => '1.00'));
<?php require_once './IPay88.class.php'; $ipay88 = new IPay88('MERCHANT_CODE', 'MERCHANT_KEY'); $ipay88->setTransactionType(IPay88::TRANSACTION_TYPE_PAYMENT); //$ipay88->setTransactionType(IPay88::TRANSACTION_TYPE_RECURRING_SUBSCRIPTION); //$ipay88->setTransactionType(IPay88::TRANSACTION_TYPE_RECURRING_TERMINATION); $ipay88->setField('RefNo', '12345'); if ($ipay88->getTransactionType() == IPay88::TRANSACTION_TYPE_PAYMENT) { // For standard online payment. $ipay88->setField('PaymentId', 2); $ipay88->setField('Amount', '1.00'); $ipay88->setField('Currency', 'MYR'); $ipay88->setField('ProdDesc', 'Testing payment'); $ipay88->setField('UserName', 'Testing'); $ipay88->setField('UserEmail', '*****@*****.**'); $ipay88->setField('UserContact', '0123456789'); $ipay88->setField('Remark', 'Lorem isum dolor'); $ipay88->setField('Lang', 'utf-8'); $ipay88->setField('ResponseURL', 'http://[yourdomain]/response.php'); } else { if ($ipay88->getTransactionType() == IPay88::TRANSACTION_TYPE_RECURRING_SUBSCRIPTION) { // For recurring subscription payment. $ipay88->setField('FirstPaymentDate', '22042012'); $ipay88->setField('Currency', 'MYR'); $ipay88->setField('Amount', '1.00'); $ipay88->setField('NumberOfPayments', 1); $ipay88->setField('Frequency', 1); $ipay88->setField('Desc', 'Testing recurring payment'); $ipay88->setField('CC_Name', 'John Doe'); $ipay88->setField('CC_PAN', '1111111111111111');