/** * 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; }
/** * Get a webhook authorization code. * * @return object */ public function getAuthorizationCode() { return $this->client->get(self::ENDPOINT); }
/** * 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; }
/** * 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); }