From 76f9fad1a4ef33eef6fabee64f2c01171edda998 Mon Sep 17 00:00:00 2001 From: DouglasOkolaa Date: Mon, 27 Apr 2020 16:20:43 +0100 Subject: [PATCH 1/4] feat: added option to disable SSL checks --- README.md | 5 +++++ src/ApiClient.php | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7150f1..ef2ac14 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ $apiClientObj = ApiClient::init(); $apiClientObj->setTimeout(3); ``` +### Disable SSL Check +``` php +$apiClientObj->verifySsl(false); +``` + The API resource class provides the following static methods: ``list, all, create, retrieve, updateById, deleteById``. Additionally, the API resource class also provides the following instance methods: ``save, delete, insert, update``. Each API method returns an ``ApiResource`` which represents the JSON response from the API. diff --git a/src/ApiClient.php b/src/ApiClient.php index 6eab0a3..0396c05 100644 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -41,6 +41,11 @@ class ApiClient */ private $httpClient; + /** + * @var boolean + */ + private $verifySSL = true ; + /** * ApiClient constructor. */ @@ -254,7 +259,7 @@ private function makeRequest($method, $path, $options) public function getHttpClient() { if (!isset($this->httpClient)) { - $this->httpClient = new Client(); + $this->httpClient = new Client(['verify' => $this->verifySSL]); } return $this->httpClient; @@ -354,4 +359,12 @@ public static function getClassName() { return get_called_class(); } + + public function verifySsl($verify) + { + if(!is_bool($verify)) { + return; + } + $this->verifySSL = $verify ; + } } From e8738b9db2910e8a4727b6c8d2ce2cf208d0720d Mon Sep 17 00:00:00 2001 From: mpoletiek Date: Sun, 21 Mar 2021 15:50:28 -0500 Subject: [PATCH 2/4] Fixed README.md concerning canceling a charge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef2ac14..f2b1cbf 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ Note: Only new charges can be successfully canceled. Once payment is detected, c $chargeObj = Charge::retrieve(); if ($chargeObj) { - $chargeObj->confirm(); + $chargeObj->cancel(); } ``` From b6c9e3af6382b9f73f2efe9c39d07f4322d7c7fc Mon Sep 17 00:00:00 2001 From: samiragadri-34 <77991109+samiragadri-34@users.noreply.github.com> Date: Thu, 10 Jun 2021 14:32:33 -0700 Subject: [PATCH 3/4] Update readme.md, add repo not actively maintained --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f2b1cbf..eca90aa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![CircleCI](https://circleci.com/gh/coinbase/coinbase-commerce-php/tree/master.svg?style=svg)](https://circleci.com/gh/coinbase/coinbase-commerce-php/tree/master) # Coinbase Commerce +**Note: This repository is not actively maintained.** The official PHP library for the [Coinbase Commerce API](https://commerce.coinbase.com/docs/). From 9c5dfecf912dc1a7251d15882b7da4cfca7d232a Mon Sep 17 00:00:00 2001 From: D <116929570+Astrabacus@users.noreply.github.com> Date: Sat, 28 Jan 2023 10:01:49 +0100 Subject: [PATCH 4/4] Create manual.yml --- .github/workflows/manual.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..47f24e1 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ github.event.inputs.name }}"