From b33c83cd482291d084982b5a1e5a8a70f657287a Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 00:23:56 +0700 Subject: [PATCH 1/8] support change API and VUALT url --- lib/omise/res/OmiseApiResource.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/omise/res/OmiseApiResource.php b/lib/omise/res/OmiseApiResource.php index 5f49170..014d157 100644 --- a/lib/omise/res/OmiseApiResource.php +++ b/lib/omise/res/OmiseApiResource.php @@ -1,8 +1,10 @@ Date: Thu, 12 Dec 2024 01:17:02 +0700 Subject: [PATCH 2/8] Update OmiseApiResource.php --- lib/omise/res/OmiseApiResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/omise/res/OmiseApiResource.php b/lib/omise/res/OmiseApiResource.php index 014d157..a4a1c5f 100644 --- a/lib/omise/res/OmiseApiResource.php +++ b/lib/omise/res/OmiseApiResource.php @@ -1,10 +1,10 @@ Date: Thu, 12 Dec 2024 01:20:25 +0700 Subject: [PATCH 3/8] Update OmiseApiResource.php --- lib/omise/res/OmiseApiResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/omise/res/OmiseApiResource.php b/lib/omise/res/OmiseApiResource.php index a4a1c5f..a6f7148 100644 --- a/lib/omise/res/OmiseApiResource.php +++ b/lib/omise/res/OmiseApiResource.php @@ -3,8 +3,8 @@ define('OMISE_PHP_LIB_VERSION', '2.18.0'); define('OMISE_API_URL', getenv('API_URL') ?: 'https://api.omise.co/'); define('OMISE_VAULT_URL', getenv('VUALT_URL') ?: 'https://vault.omise.co/'); -echo API_URL; -echo VUALT_URL; +echo OMISE_API_URL; +echo OMISE_VAULT_URL; #[\AllowDynamicProperties] class OmiseApiResource extends OmiseObject From 69fffd07b9687c928143a6acabb2a2aa8b40e0ad Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 01:24:25 +0700 Subject: [PATCH 4/8] Update OmiseApiResource.php --- lib/omise/res/OmiseApiResource.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/omise/res/OmiseApiResource.php b/lib/omise/res/OmiseApiResource.php index a6f7148..455c4ca 100644 --- a/lib/omise/res/OmiseApiResource.php +++ b/lib/omise/res/OmiseApiResource.php @@ -2,9 +2,7 @@ define('OMISE_PHP_LIB_VERSION', '2.18.0'); define('OMISE_API_URL', getenv('API_URL') ?: 'https://api.omise.co/'); -define('OMISE_VAULT_URL', getenv('VUALT_URL') ?: 'https://vault.omise.co/'); -echo OMISE_API_URL; -echo OMISE_VAULT_URL; +define('OMISE_VAULT_URL', getenv('VAULT_URL') ?: 'https://vault.omise.co/'); #[\AllowDynamicProperties] class OmiseApiResource extends OmiseObject From ba8ef4c62272149610b8a4be97b8af2250eadfdf Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 09:24:00 +0700 Subject: [PATCH 5/8] try disable test --- tests/CapabilitiesTest.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/CapabilitiesTest.php b/tests/CapabilitiesTest.php index 63d80b8..0dd83a6 100644 --- a/tests/CapabilitiesTest.php +++ b/tests/CapabilitiesTest.php @@ -127,18 +127,18 @@ public function mix_filter() $this->assertEquals('array', gettype($backends)); } - /** - * @test - */ - public function filter_by_charge_amount_200000_should_not_include_installment() - { - $backend = $this->capabilities->getBackends( - $this->capabilities->makeBackendFilterType('installment'), - $this->capabilities->makeBackendFilterChargeAmount(200000) - ); - $this->assertEquals('array', gettype($backend)); - $this->assertEmpty($backend); - } + // /** + // * @test + // */ + // public function filter_by_charge_amount_200000_should_not_include_installment() + // { + // $backend = $this->capabilities->getBackends( + // $this->capabilities->makeBackendFilterType('installment'), + // $this->capabilities->makeBackendFilterChargeAmount(200000) + // ); + // $this->assertEquals('array', gettype($backend)); + // $this->assertEmpty($backend); + // } /** * @test From 232f107dc485d726643a689d59445751bf81a520 Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 09:31:48 +0700 Subject: [PATCH 6/8] Revert "try disable test" This reverts commit ba8ef4c62272149610b8a4be97b8af2250eadfdf. --- tests/CapabilitiesTest.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/CapabilitiesTest.php b/tests/CapabilitiesTest.php index 0dd83a6..63d80b8 100644 --- a/tests/CapabilitiesTest.php +++ b/tests/CapabilitiesTest.php @@ -127,18 +127,18 @@ public function mix_filter() $this->assertEquals('array', gettype($backends)); } - // /** - // * @test - // */ - // public function filter_by_charge_amount_200000_should_not_include_installment() - // { - // $backend = $this->capabilities->getBackends( - // $this->capabilities->makeBackendFilterType('installment'), - // $this->capabilities->makeBackendFilterChargeAmount(200000) - // ); - // $this->assertEquals('array', gettype($backend)); - // $this->assertEmpty($backend); - // } + /** + * @test + */ + public function filter_by_charge_amount_200000_should_not_include_installment() + { + $backend = $this->capabilities->getBackends( + $this->capabilities->makeBackendFilterType('installment'), + $this->capabilities->makeBackendFilterChargeAmount(200000) + ); + $this->assertEquals('array', gettype($backend)); + $this->assertEmpty($backend); + } /** * @test From f61a62dc537f7f514673b3ea5e95accd5ce72cca Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 09:48:41 +0700 Subject: [PATCH 7/8] try disable error and fail test --- tests/CapabilitiesTest.php | 24 ++++++++++++------------ tests/ChargeTest.php | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/CapabilitiesTest.php b/tests/CapabilitiesTest.php index 63d80b8..0dd83a6 100644 --- a/tests/CapabilitiesTest.php +++ b/tests/CapabilitiesTest.php @@ -127,18 +127,18 @@ public function mix_filter() $this->assertEquals('array', gettype($backends)); } - /** - * @test - */ - public function filter_by_charge_amount_200000_should_not_include_installment() - { - $backend = $this->capabilities->getBackends( - $this->capabilities->makeBackendFilterType('installment'), - $this->capabilities->makeBackendFilterChargeAmount(200000) - ); - $this->assertEquals('array', gettype($backend)); - $this->assertEmpty($backend); - } + // /** + // * @test + // */ + // public function filter_by_charge_amount_200000_should_not_include_installment() + // { + // $backend = $this->capabilities->getBackends( + // $this->capabilities->makeBackendFilterType('installment'), + // $this->capabilities->makeBackendFilterChargeAmount(200000) + // ); + // $this->assertEquals('array', gettype($backend)); + // $this->assertEmpty($backend); + // } /** * @test diff --git a/tests/ChargeTest.php b/tests/ChargeTest.php index 9391e20..f82d645 100644 --- a/tests/ChargeTest.php +++ b/tests/ChargeTest.php @@ -184,18 +184,18 @@ public function create_scheduler() $this->assertEquals($charge, $scheduler['charge']); } - /** - * @test - * Assert that an expired flag is set after charge is successfully set to expire. - */ - public function expire() - { - $charge = $this->createChargeWithSource(); - $charge->expire(); - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('charge', $charge['object']); - $this->assertTrue($charge['expired']); - } + // /** + // * @test + // * Assert that an expired flag is set after charge is successfully set to expire. + // */ + // public function expire() + // { + // $charge = $this->createChargeWithSource(); + // $charge->expire(); + // $this->assertArrayHasKey('object', $charge); + // $this->assertEquals('charge', $charge['object']); + // $this->assertTrue($charge['expired']); + // } /** * @test From 22387b1245762b33075dc3c71c56868b9a5e2578 Mon Sep 17 00:00:00 2001 From: pusitw Date: Thu, 12 Dec 2024 09:48:58 +0700 Subject: [PATCH 8/8] Revert "try disable error and fail test" This reverts commit f61a62dc537f7f514673b3ea5e95accd5ce72cca. --- tests/CapabilitiesTest.php | 24 ++++++++++++------------ tests/ChargeTest.php | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/CapabilitiesTest.php b/tests/CapabilitiesTest.php index 0dd83a6..63d80b8 100644 --- a/tests/CapabilitiesTest.php +++ b/tests/CapabilitiesTest.php @@ -127,18 +127,18 @@ public function mix_filter() $this->assertEquals('array', gettype($backends)); } - // /** - // * @test - // */ - // public function filter_by_charge_amount_200000_should_not_include_installment() - // { - // $backend = $this->capabilities->getBackends( - // $this->capabilities->makeBackendFilterType('installment'), - // $this->capabilities->makeBackendFilterChargeAmount(200000) - // ); - // $this->assertEquals('array', gettype($backend)); - // $this->assertEmpty($backend); - // } + /** + * @test + */ + public function filter_by_charge_amount_200000_should_not_include_installment() + { + $backend = $this->capabilities->getBackends( + $this->capabilities->makeBackendFilterType('installment'), + $this->capabilities->makeBackendFilterChargeAmount(200000) + ); + $this->assertEquals('array', gettype($backend)); + $this->assertEmpty($backend); + } /** * @test diff --git a/tests/ChargeTest.php b/tests/ChargeTest.php index f82d645..9391e20 100644 --- a/tests/ChargeTest.php +++ b/tests/ChargeTest.php @@ -184,18 +184,18 @@ public function create_scheduler() $this->assertEquals($charge, $scheduler['charge']); } - // /** - // * @test - // * Assert that an expired flag is set after charge is successfully set to expire. - // */ - // public function expire() - // { - // $charge = $this->createChargeWithSource(); - // $charge->expire(); - // $this->assertArrayHasKey('object', $charge); - // $this->assertEquals('charge', $charge['object']); - // $this->assertTrue($charge['expired']); - // } + /** + * @test + * Assert that an expired flag is set after charge is successfully set to expire. + */ + public function expire() + { + $charge = $this->createChargeWithSource(); + $charge->expire(); + $this->assertArrayHasKey('object', $charge); + $this->assertEquals('charge', $charge['object']); + $this->assertTrue($charge['expired']); + } /** * @test