/**
  * Get the transactions that were cleared on a given date.
  *
  * @param  \DateTimeInterface|string $date
  * @return array
  */
 public function getByClearanceDate($clearancedate)
 {
     if ($clearancedate instanceof \DateTimeInterface) {
         $clearancedate = $clearancedate->format('Y-m-d');
     }
     $response = $this->client->get(self::ENDPOINT, [\GuzzleHttp\RequestOptions::QUERY => compact('clearancedate')]);
     return $response->Transactions;
 }
Exemplo n.º 2
0
 /**
  * Get a webhook authorization code.
  *
  * @return object
  */
 public function getAuthorizationCode()
 {
     return $this->client->get(self::ENDPOINT);
 }
Exemplo n.º 3
0
 /**
  * Check for installments support.
  *
  * @param  mixed $number  The credit card number
  * @return int
  */
 public function installments($number)
 {
     $response = $this->client->get(self::ENDPOINT . '/installments', [\GuzzleHttp\RequestOptions::HEADERS => ['CardNumber' => $this->normalizeNumber($number)], \GuzzleHttp\RequestOptions::QUERY => ['key' => $this->getKey()]]);
     return $response->MaxInstallments;
 }
Exemplo n.º 4
0
 /**
  * Retrieve information about an order.
  *
  * @param  int $orderCode  The unique Payment Order ID.
  * @return object
  */
 public function get($orderCode)
 {
     return $this->client->get(self::ENDPOINT . $orderCode);
 }