public function testRefund() { $api = Be2bill_Api_ClientBuilder::buildSandboxDirectLinkClient(BE2BILL_TEST_IDENTIFIER, BE2BILL_TEST_PASSWORD); $tools = new Be2bill_Api_Test_Tools(); $result = $this->api->payment('5555556778250000', $this->tools->getFutureValidityDate(), 132, 'john doe', '1000', 'order-' . time(), 'john doe', '*****@*****.**', '1.2.3.4', 'desc', 'firefox'); $result = $this->api->refund($result['TRANSACTIONID'], 'order-' . time(), 'desc'); $this->assertTransactionSucceeded($result); }
<?php error_reporting(E_ALL); ini_set('display_errors', 1); require 'config.php'; require '../src/Be2bill/Api/Autoloader.php'; Be2bill_Api_Autoloader::registerAutoloader(); // Just implement BE2BILL_IDENTIFIER and BE2BILL_PASSWORD as defined $be2bill = Be2bill_Api_ClientBuilder::buildSandboxDirectLinkClient(BE2BILL_IDENTIFIER, BE2BILL_PASSWORD); var_dump($be2bill->getTransactionsByTransactionId('A151805', '*****@*****.**'));
/** * Instanciate */ public function __construct() { parent::__construct(); $this->api = Be2bill_Api_ClientBuilder::buildSandboxDirectLinkClient($this->getIdentifier(), $this->getPassword()); $this->tools = new Be2bill_Api_Test_Tools(); }