예제 #1
0
 /**
  * Check wrapped order for deserialization
  */
 public function testWrappedOrder()
 {
     $json = json_decode(file_get_contents(__DIR__ . '/fixtures/wrapped_order.json'), true);
     $order = new WrappedOrder();
     $order->fromArray($json);
     $order->validate();
 }
예제 #2
0
파일: Client.php 프로젝트: coinfide/php-sdk
 public function submitOrder(Order $order)
 {
     $token = $this->getToken();
     $response = $this->request('order/create', array('order' => $order->toArray()), $token->getAccessToken());
     $wrappedOrder = new WrappedOrder();
     $wrappedOrder->fromArray($response);
     $wrappedOrder->validate();
     return $wrappedOrder;
 }