/home/techb158/immovalet.com/platform/plugins/paystack/src/Services
NameSizeModeActions
Abstracts/-0755rm
Gateways/-0755rm
Paystack.php21270644editdlrm
Edit: /home/techb158/immovalet.com/platform/plugins/paystack/src/Services/Paystack.php (2127B)
json_encode([ 'transaction' => $paymentId, 'amount' => $amount * 100 ]), ]; $this->response = $this->client->post($this->baseUrl . $relativeUrl, $data); if ($this->isValid()) { return $this->getResponse(); } throw new Exception('Invalid Refund Order Paystack'); } /** * Get the whole response from a get operation * @return array */ private function getResponse() { return json_decode($this->response->getBody(), true); } /** * True or false condition whether the transaction is verified * @return boolean */ public function isValid() { return $this->getResponse()['status']; } /** * Get transaction details * @param int $transactionId * @return array * @throws Exception */ public function getPaymentDetails($transactionId) { $relativeUrl = "/transaction/{$transactionId}"; $this->response = $this->client->get($this->baseUrl . $relativeUrl); if ($this->isValid()) { return $this->getResponse(); } throw new Exception('Invalid Get Payment Details Paystack'); } /** * Get list transactions * @param array $params * @return array * @throws Exception */ public function getListTransactions($params = []) { $relativeUrl = '/transaction' . ($params ? ('?' . http_build_query($params)) : ''); $this->response = $this->client->get($this->baseUrl . $relativeUrl); if ($this->isValid()) { return $this->getResponse(); } throw new Exception('Invalid Get List Transactions Paystack'); } }