From 730961d7b17c89e218d290ed56f7092b09189ce8 Mon Sep 17 00:00:00 2001 From: cnohall Date: Fri, 13 Sep 2024 13:08:13 +0900 Subject: [PATCH] remove commented code --- .../BlockonomicsPaymentDriver.php | 55 ------------------- ...2024_08_27_230111_blockonomics_gateway.php | 2 +- 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/app/PaymentDrivers/BlockonomicsPaymentDriver.php b/app/PaymentDrivers/BlockonomicsPaymentDriver.php index c5747a43c38d..91250643b6f9 100644 --- a/app/PaymentDrivers/BlockonomicsPaymentDriver.php +++ b/app/PaymentDrivers/BlockonomicsPaymentDriver.php @@ -150,58 +150,3 @@ class BlockonomicsPaymentDriver extends BaseDriver return $this->payment_method->refund($payment, $amount); //this is your custom implementation from here } } - - - // public function doCurlCall($url, $post_content = '') - // { - // $ch = curl_init(); - // curl_setopt($ch, CURLOPT_URL, $url); - // curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - // if ($post_content) { - // curl_setopt($ch, CURLOPT_POST, 1); - // curl_setopt($ch, CURLOPT_POSTFIELDS, $post_content); - // } - // curl_setopt($ch, CURLOPT_TIMEOUT, 60); - // curl_setopt($ch, CURLOPT_HTTPHEADER, [ - // 'Authorization: Bearer ' . $this->api_key, - // 'Content-type: application/x-www-form-urlencoded', - // ]); - // $contents = curl_exec($ch); - // if (curl_errno($ch)) { - // echo "Error:" . curl_error($ch); - // } - // $responseObj = json_decode($contents); - // $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - // curl_close ($ch); - // if ($status != 200) { - // echo "ERROR: " . $status . ' ' . $responseObj->message; - // } - // return $responseObj; - // } - - // public function setCallbackUrl() - // { - // $GET_CALLBACKS_URL = 'https://www.blockonomics.co/api/address?&no_balance=true&only_xpub=true&get_callback=true'; - // $SET_CALLBACK_URL = 'https://www.blockonomics.co/api/update_callback'; - // $get_callback_response = $this->doCurlCall($GET_CALLBACKS_URL); - - // $callback_url = $this->callback_url; - // $xpub = $get_callback_response[0]->address; - // $post_content = '{"callback": "' . $callback_url . '", "xpub": "' . $xpub . '"}'; - - // $responseObj = $this->doCurlCall($SET_CALLBACK_URL, $post_content); - // return $responseObj; - // } - - // public function findPaymentHashInTransactionReference($transaction_reference) - // { - // $pattern = '/payment hash:\s*([a-zA-Z0-9]+)/'; - // // Perform the regex match - // if (preg_match($pattern, $transaction_reference, $matches)) { - // // Return the matched payment hash - // return $matches[1]; - // } else { - // // Return null if no match is found - // return null; - // } - // } \ No newline at end of file diff --git a/database/migrations/2024_08_27_230111_blockonomics_gateway.php b/database/migrations/2024_08_27_230111_blockonomics_gateway.php index bfe34514151c..b70147ec65d5 100644 --- a/database/migrations/2024_08_27_230111_blockonomics_gateway.php +++ b/database/migrations/2024_08_27_230111_blockonomics_gateway.php @@ -43,4 +43,4 @@ return new class extends Migration { // } -}; \ No newline at end of file +};