Exemple #1
0
 function testOpenTransaction()
 {
     $api = new \CashWay\API(get_conf());
     $sent_data = array('agent' => $api->user_agent, 'order' => $api->order, 'customer' => $api->customer, 'confirm' => true, 'more' => array());
     $res = $api->openTransaction(true);
     $this->assertEquals('POST', $res['method']);
     $this->assertEquals('/1/transactions/', $res['request']);
     $this->assertJsonStringEqualsJsonString(json_encode($sent_data), $res['body']);
 }