From 777b5a23102b35d9da794814c41ff8d5024ade2f Mon Sep 17 00:00:00 2001 From: cnohall Date: Tue, 18 Mar 2025 14:17:11 +0900 Subject: [PATCH] use get stores instead --- app/PaymentDrivers/BlockonomicsPaymentDriver.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/PaymentDrivers/BlockonomicsPaymentDriver.php b/app/PaymentDrivers/BlockonomicsPaymentDriver.php index a066b8dca5..db945d54d5 100644 --- a/app/PaymentDrivers/BlockonomicsPaymentDriver.php +++ b/app/PaymentDrivers/BlockonomicsPaymentDriver.php @@ -49,6 +49,7 @@ class BlockonomicsPaymentDriver extends BaseDriver public $BASE_URL = 'https://www.blockonomics.co'; public $NEW_ADDRESS_URL = 'https://www.blockonomics.co/api/new_address'; public $PRICE_URL = 'https://www.blockonomics.co/api/price'; + public $STORES_URL = 'https://www.blockonomics.co/api/v2/stores'; public function init() { @@ -153,13 +154,12 @@ class BlockonomicsPaymentDriver extends BaseDriver if(!$api_key) { return 'No API Key'; } - $url = $this->NEW_ADDRESS_URL . '?reset=1'; - $response = Http::withToken($api_key) - ->post($url, []); - if($response->status() == 401) { + $get_stores_response = Http::withToken($api_key) + ->get($this->STORES_URL, []); + if($get_stores_response->status() == 401) { return 'API Key is incorrect'; } - if($response->successful()) { + if($get_stores_response->successful()) { return 'ok'; } return 'error';