/**
  * Cancel or refund a payment.
  *
  * @param  string       $id
  * @param  int          $amount
  * @param  string|null  $actionUser
  * @return object
  */
 public function cancel($id, $amount, $actionUser = null)
 {
     $query = ['Amount' => $amount];
     $actionUser = $actionUser ? ['ActionUser' => $actionUser] : [];
     return $this->client->delete(self::ENDPOINT . $id, [\GuzzleHttp\RequestOptions::QUERY => array_merge($query, $actionUser)]);
 }
Exemplo n.º 2
0
 /**
  * Cancel an order.
  *
  * @param  int $orderCode  The unique Payment Order ID.
  * @return object
  */
 public function cancel($orderCode)
 {
     return $this->client->delete(self::ENDPOINT . $orderCode);
 }