コード例 #1
0
 public function test_sale_with_applepay()
 {
     $hash_in = array('id' => 'id', 'orderId' => '2111', 'amount' => '123', 'secondaryAmount' => '2000', 'orderSource' => 'ecommerce', 'applepay' => array('data' => 'string data here', 'header' => 'header stuff here', 'signature' => 'signature', 'version' => 'version 1'));
     $hash_out = Transactions::createSaleHash($hash_in);
     $this->assertEquals($hash_in, array_intersect($hash_in, $hash_out));
 }
コード例 #2
0
 public function test_sale_with_card()
 {
     $hash_in = array('card' => array('type' => 'VI', 'number' => '4100000000000001', 'expDate' => '1213', 'cardValidationNum' => '1213'), 'orderId' => '2111', 'orderSource' => 'ecommerce', 'amount' => '123');
     $hash_out = Transactions::createSaleHash($hash_in);
     $this->assertEquals($hash_in, array_intersect($hash_in, $hash_out));
 }