<?php //
// Example of usage for Services_Bluepay
//
include "Bluepay.php";
//-- Run transaction using bp20post interface $bp = new Services_Bluepay(); $bp->setValue("ACCOUNT_ID", '100008088837'); $bp->setValue("SECRET_KEY", 'OYWEV/LJQBKLGHSGKTVUPVIQTNQ8MFF0'); $bp->setValue("TRANS_TYPE", 'SALE'); $bp->setValue("MODE", 'TEST'); # Default is TEST --> Set to LIVE for live tx $bp->setValue("AMOUNT", '3.01'); # ODD returns Approved, EVEN returns Declined in TEST mode $bp->setValue("PAYMENT_ACCOUNT", '4111111111111111'); # VISA Test Card $bp->setValue("CARD_EXPIRE", '0808'); $bp->bp20post(); //-- Display Response echo "TRANS_ID: " . $bp->getValue("TRANS_ID") . "\n"; echo "STATUS: " . $bp->getValue("STATUS") . "\n"; echo "AVS: " . $bp->getValue("AVS") . "\n"; echo "CVV2: " . $bp->getValue("CVV2") . "\n"; echo "AUTH_CODE: " . $bp->getValue("AUTH_CODE") . "\n"; echo "MESSAGE: " . $bp->getValue("MESSAGE") . "\n"; echo "REBID: " . $bp->getValue("REBID") . "\n"; ?>
|