public function testCancelPermataVa()
 {
     $charge_params = VtChargeFixture::build('bank_transfer', array("bank" => "permata"));
     $charge_response = Veritrans_VtDirect::charge($charge_params);
     $cancel_status_code = Veritrans_Transaction::cancel($charge_response->transaction_id);
     $this->assertEquals($cancel_status_code, '200');
 }
 public function testExpirePermataVa()
 {
     $charge_params = VtChargeFixture::build('bank_transfer', array("bank" => "permata"));
     $charge_response = Veritrans_VtDirect::charge($charge_params);
     $expire = Veritrans_Transaction::expire($charge_response->transaction_id);
     $this->assertEquals($expire->status_code, '407');
     // Verify transaction via API
     $txn_status = Veritrans_Transaction::status($charge_response->transaction_id);
     $this->assertEquals($txn_status->status_code, "407");
     $this->assertEquals($txn_status->transaction_status, "expire");
 }
 public function testVtWeb()
 {
     $charge_params = VtChargeFixture::build('vtweb');
     $redirect_url = Veritrans_VtWeb::getRedirectionUrl($charge_params);
     $this->assertRegExp("/https:\\/\\/vtweb.sandbox.veritrans.co.id\\/v2\\/vtweb\\/[\\w\\-]+/", $redirect_url);
 }
 public function prepareChargeParams($payment_type, $payment_data = NULL)
 {
     $this->payment_type = $payment_type;
     $this->charge_params = VtChargeFixture::build($payment_type, $payment_data);
 }
 public function setUp()
 {
     $charge_params = VtChargeFixture::build('bri_epay');
     $charge_response = Veritrans_VtDirect::charge($charge_params);
     $this->status_response = Veritrans_Transaction::status($charge_response->transaction_id);
 }