From 290e077bc20a4776db38b737eef631b9a03235f3 Mon Sep 17 00:00:00 2001 From: Saroj Saengphongumphai Date: Wed, 24 Aug 2016 22:29:34 +0700 Subject: [PATCH 1/5] Use an inline style for card brand image Remove an attribute, width, from the card brand image and add an inline style to specify width of the image. --- includes/classes/class-omise-card-image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/classes/class-omise-card-image.php b/includes/classes/class-omise-card-image.php index 4aeafc50..a945d5ed 100644 --- a/includes/classes/class-omise-card-image.php +++ b/includes/classes/class-omise-card-image.php @@ -12,7 +12,7 @@ class Omise_Card_Image { */ private static function get_image( $file, $alternate_text ) { $url = WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/' ); - return "$alternate_text"; + return "$alternate_text"; } /** From e7b3bb6c9474f476117dcde9f2ef9d7e31674fca Mon Sep 17 00:00:00 2001 From: Saroj Saengphongumphai Date: Thu, 25 Aug 2016 14:27:16 +0700 Subject: [PATCH 2/5] Add a class name, Omise-CardBrandImage, to a card brand image This class has no rule or style. Its intent is to allow the user to create their own style to override the display of card brand image. --- includes/classes/class-omise-card-image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/classes/class-omise-card-image.php b/includes/classes/class-omise-card-image.php index a945d5ed..8a99e903 100644 --- a/includes/classes/class-omise-card-image.php +++ b/includes/classes/class-omise-card-image.php @@ -12,7 +12,7 @@ class Omise_Card_Image { */ private static function get_image( $file, $alternate_text ) { $url = WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/' ); - return "$alternate_text"; + return "$alternate_text"; } /** From 6f27fdbab51f2f1e828bf42fdcef3421a58f0bde Mon Sep 17 00:00:00 2001 From: Saroj Saengphongumphai Date: Thu, 25 Aug 2016 16:03:38 +0700 Subject: [PATCH 3/5] Remove a unit test directory of library, omise-php Remove a directory, includes/libraries/omise-php/tests --- .../fixtures/api.omise.co/account-get.json | 6 - .../fixtures/api.omise.co/balance-get.json | 7 - .../fixtures/api.omise.co/charges-get.json | 1161 ----------------- .../fixtures/api.omise.co/charges-post.json | 52 - .../chrg_test_4zmrjgxdh4ycj2qncoj-get.json | 61 - .../chrg_test_4zmrjgxdh4ycj2qncoj-patch.json | 52 - .../capture-post.json | 52 - .../refunds-get.json | 21 - .../refunds-post.json | 10 - .../rfnd_test_4zmrjhlbqy587sw6fwt-get.json | 10 - .../fixtures/api.omise.co/customers-get.json | 467 ------- .../fixtures/api.omise.co/customers-post.json | 39 - .../cust_test_4zmrjg2hct06ybwobqc-delete.json | 6 - .../cust_test_4zmrjg2hct06ybwobqc-get.json | 39 - .../cust_test_4zmrjg2hct06ybwobqc-patch.json | 39 - .../card_test_4zmrjfzf0spz3mh63cs-delete.json | 6 - .../card_test_4zmrjfzf0spz3mh63cs-get.json | 18 - .../card_test_4zmrjfzf0spz3mh63cs-patch.json | 18 - .../cust_test_5234fzk37pi2mz0cen3-get.json | 59 - .../cards/?limit=1-get.json | 29 - .../fixtures/api.omise.co/disputes-get.json | 22 - .../api.omise.co/disputes/closed-get.json | 22 - .../dspt_test_4zgf15h89w8t775kcm8-get.json | 12 - .../dspt_test_4zgf15h89w8t775kcm8-patch.json | 12 - .../api.omise.co/disputes/open-get.json | 22 - .../api.omise.co/disputes/pending-get.json | 22 - .../fixtures/api.omise.co/recipients-get.json | 33 - .../api.omise.co/recipients-post.json | 22 - .../recp_test_508a9dytz793gxv9m77-delete.json | 6 - .../recp_test_508a9dytz793gxv9m77-get.json | 22 - .../recp_test_508a9dytz793gxv9m77-patch.json | 22 - .../api.omise.co/transactions-get.json | 170 --- .../trxn_test_4zmrjhlflnz6id6q0bo-get.json | 8 - .../fixtures/api.omise.co/transfers-get.json | 38 - .../fixtures/api.omise.co/transfers-post.json | 14 - .../trsf_test_4zmrjicrvw7j6uhv1l4-delete.json | 6 - .../trsf_test_4zmrjicrvw7j6uhv1l4-get.json | 14 - .../trsf_test_4zmrjicrvw7j6uhv1l4-patch.json | 14 - .../fixtures/vault.omise.co/tokens-post.json | 25 - .../tokn_test_4zmrjhuk2rndz24a6x0-get.json | 25 - .../omise-php/tests/omise/AccountTest.php | 36 - .../omise-php/tests/omise/BalanceTest.php | 36 - .../omise-php/tests/omise/CardTest.php | 82 -- .../omise-php/tests/omise/ChargeTest.php | 81 -- .../omise-php/tests/omise/CustomerTest.php | 95 -- .../omise-php/tests/omise/DisputeTest.php | 88 -- .../omise-php/tests/omise/RecipientTest.php | 78 -- .../omise-php/tests/omise/RefundTest.php | 43 - .../omise-php/tests/omise/TestConfig.php | 14 - .../omise-php/tests/omise/TokenTest.php | 43 - .../omise-php/tests/omise/TransactionTest.php | 51 - .../omise-php/tests/omise/TransferTest.php | 76 -- .../omise/exception/OmiseExceptionTest.php | 147 --- .../tests/omise/res/obj/OmiseObjectTest.php | 134 -- .../omise-php/tests/omise/testall.sh | 6 - 55 files changed, 3693 deletions(-) delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/account-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/balance-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/capture-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-delete.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-delete.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/closed-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/open-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/pending-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-delete.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions/trxn_test_4zmrjhlflnz6id6q0bo-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-delete.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-get.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-patch.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens-post.json delete mode 100644 includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0-get.json delete mode 100644 includes/libraries/omise-php/tests/omise/AccountTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/BalanceTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/CardTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/ChargeTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/CustomerTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/DisputeTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/RecipientTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/RefundTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/TestConfig.php delete mode 100644 includes/libraries/omise-php/tests/omise/TokenTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/TransactionTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/TransferTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/exception/OmiseExceptionTest.php delete mode 100644 includes/libraries/omise-php/tests/omise/res/obj/OmiseObjectTest.php delete mode 100755 includes/libraries/omise-php/tests/omise/testall.sh diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/account-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/account-get.json deleted file mode 100644 index b27c0e36..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/account-get.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "object": "account", - "id": "acct_4yyvy93tmab34q2ywlo", - "email": "iam.nuttanon@gmail.com", - "created": "2015-02-06T09:45:48Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/balance-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/balance-get.json deleted file mode 100644 index 383ec0e6..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/balance-get.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "object": "balance", - "livemode": false, - "available": 5646205, - "total": 5646205, - "currency": "thb" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-get.json deleted file mode 100644 index cd04cf5f..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-get.json +++ /dev/null @@ -1,1161 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 67, - "data": [ - { - "object": "charge", - "id": "chrg_test_4zkam2l6yj5sry58exn", - "livemode": false, - "location": "/charges/chrg_test_4zkam2l6yj5sry58exn", - "amount": 99, - "currency": "thb", - "description": "Charge for order 3947", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkam2llotki51i8wey", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkam2l6yj5sry58exn/refunds" - }, - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkam2giccpn93f9ggo", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 2, - "expiration_year": 2017, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "JOHN DOE", - "security_code_check": true, - "created": "2015-04-02T03:19:13Z" - }, - "customer": null, - "ip": null, - "dispute": null, - "created": "2015-04-02T03:19:13Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkos0vdtv58o6ompc1", - "livemode": false, - "location": "/charges/chrg_test_4zkos0vdtv58o6ompc1", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkos1i79n10v3cnjsf", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkos0vdtv58o6ompc1/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkos0vg0upc1ei3b88", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkos0vg0upc1ei3b88/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkos0sdq3wa91uqokf", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:27:52Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:27:53Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkos145pr97qt0khw8", - "livemode": false, - "location": "/charges/chrg_test_4zkos145pr97qt0khw8", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkos14w9bpdrcv9kbf", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkos145pr97qt0khw8/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkos14dct2lr76202q", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkos14dct2lr76202q/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkos11cptt56so9uro", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:27:53Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:27:54Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkos2fm2t4humybpta", - "livemode": false, - "location": "/charges/chrg_test_4zkos2fm2t4humybpta", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkos2g8s4zjo0d4ijd", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zkos318tludqrv8ofb", - "location": "/charges/chrg_test_4zkos2fm2t4humybpta/refunds/rfnd_test_4zkos318tludqrv8ofb", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkos2fm2t4humybpta", - "transaction": "trxn_test_4zkos31e9cfb0o8any6", - "created": "2015-04-03T03:28:03Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zkos2t3mui0agxabdg", - "location": "/charges/chrg_test_4zkos2fm2t4humybpta/refunds/rfnd_test_4zkos2t3mui0agxabdg", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkos2fm2t4humybpta", - "transaction": "trxn_test_4zkos2t8c1wwim7x52t", - "created": "2015-04-03T03:28:02Z" - } - ], - "location": "/charges/chrg_test_4zkos2fm2t4humybpta/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkos2fplzzhn66pj3s", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkos2fplzzhn66pj3s/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkos2c9xbna0rj7jxm", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:27:59Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:28:00Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkoszeu9mxmamcmozg", - "livemode": false, - "location": "/charges/chrg_test_4zkoszeu9mxmamcmozg", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkot01ywqtrghdikh0", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkoszeu9mxmamcmozg/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkoszew4rnfcfttcu7", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkoszew4rnfcfttcu7/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkoszc5dp61wa9ycl8", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:30:36Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:30:36Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkoszo501pkx0eiwva", - "livemode": false, - "location": "/charges/chrg_test_4zkoszo501pkx0eiwva", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkoszoohbu5zt7ki8o", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkoszo501pkx0eiwva/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkoszo7hja2ejc2te9", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkoszo7hja2ejc2te9/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkoszlg54kibjaegco", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:30:37Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:30:37Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkot0za5enyxjafrtk", - "livemode": false, - "location": "/charges/chrg_test_4zkot0za5enyxjafrtk", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkot0zoocruvgplg7u", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zkot1l36ibh463h6cr", - "location": "/charges/chrg_test_4zkot0za5enyxjafrtk/refunds/rfnd_test_4zkot1l36ibh463h6cr", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkot0za5enyxjafrtk", - "transaction": "trxn_test_4zkot1l70pdlql44zsj", - "created": "2015-04-03T03:30:46Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zkot1crha4tp1pmow3", - "location": "/charges/chrg_test_4zkot0za5enyxjafrtk/refunds/rfnd_test_4zkot1crha4tp1pmow3", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkot0za5enyxjafrtk", - "transaction": "trxn_test_4zkot1cwob313khurex", - "created": "2015-04-03T03:30:45Z" - } - ], - "location": "/charges/chrg_test_4zkot0za5enyxjafrtk/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkot0zc2nigx51rjpc", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkot0zc2nigx51rjpc/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkot0wlr6dqmg4kicj", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:30:43Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:30:43Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkoxc5me8fw7ezp1ej", - "livemode": false, - "location": "/charges/chrg_test_4zkoxc5me8fw7ezp1ej", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkoxcuikir89jgyg59", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkoxc5me8fw7ezp1ej/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkoxc5qtmvyit57efe", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkoxc5qtmvyit57efe/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkoxc2o8hizvbkm960", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:42:58Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:42:58Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkoxcgdg53tyxxek32", - "livemode": false, - "location": "/charges/chrg_test_4zkoxcgdg53tyxxek32", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkoxcgxq6fcdu6wyie", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkoxcgdg53tyxxek32/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkoxcggg74jpb2ofd3", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkoxcggg74jpb2ofd3/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkoxcd42k93x9qrxcw", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:42:59Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:43:00Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkoxdtjdu02xnjui2g", - "livemode": false, - "location": "/charges/chrg_test_4zkoxdtjdu02xnjui2g", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkoxdu46ivfuwff42c", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zkoxefvvjyp75pk7ni", - "location": "/charges/chrg_test_4zkoxdtjdu02xnjui2g/refunds/rfnd_test_4zkoxefvvjyp75pk7ni", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkoxdtjdu02xnjui2g", - "transaction": "trxn_test_4zkoxeg1cbvflzfybng", - "created": "2015-04-03T03:43:09Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zkoxe7oapibwotcn3a", - "location": "/charges/chrg_test_4zkoxdtjdu02xnjui2g/refunds/rfnd_test_4zkoxe7oapibwotcn3a", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkoxdtjdu02xnjui2g", - "transaction": "trxn_test_4zkoxe7v37bq2dsu7gb", - "created": "2015-04-03T03:43:08Z" - } - ], - "location": "/charges/chrg_test_4zkoxdtjdu02xnjui2g/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkoxdtmei3gh29v7fh", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkoxdtmei3gh29v7fh/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkoxdqn52ya3zlpibc", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:43:06Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T03:43:06Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkr8jwxmhxhtfi7f2k", - "livemode": false, - "location": "/charges/chrg_test_4zkr8jwxmhxhtfi7f2k", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkr8kpvxxlb2ophb3l", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkr8jwxmhxhtfi7f2k/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkr8jx0mj8z0wqqlq7", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkr8jx0mj8z0wqqlq7/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkr8jtnbbmqtgiio37", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T07:39:21Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T07:39:22Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkr8k97ordcoy0z2l3", - "livemode": false, - "location": "/charges/chrg_test_4zkr8k97ordcoy0z2l3", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkr8k9s5w9u58pjjn4", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zkr8k97ordcoy0z2l3/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkr8k9ay9ce9vmq0ze", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkr8k9ay9ce9vmq0ze/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkr8k5ku3gvwjk4wac", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T07:39:23Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T07:39:23Z" - }, - { - "object": "charge", - "id": "chrg_test_4zkr8lumcjspbbhd3td", - "livemode": false, - "location": "/charges/chrg_test_4zkr8lumcjspbbhd3td", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zkr8lv0amws88h5dl9", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zkr8mnnz6m0lpe986i", - "location": "/charges/chrg_test_4zkr8lumcjspbbhd3td/refunds/rfnd_test_4zkr8mnnz6m0lpe986i", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkr8lumcjspbbhd3td", - "transaction": "trxn_test_4zkr8mnruekulh2n214", - "created": "2015-04-03T07:39:35Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zkr8mejhcqwmqtpig3", - "location": "/charges/chrg_test_4zkr8lumcjspbbhd3td/refunds/rfnd_test_4zkr8mejhcqwmqtpig3", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zkr8lumcjspbbhd3td", - "transaction": "trxn_test_4zkr8meozh1ckq7wgfs", - "created": "2015-04-03T07:39:34Z" - } - ], - "location": "/charges/chrg_test_4zkr8lumcjspbbhd3td/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zkr8luo7l1v35mwy69", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zkr8luo7l1v35mwy69/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zkr8lrntg0nj7xe3tn", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T07:39:31Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T07:39:31Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksixanset5gkd5t5q", - "livemode": false, - "location": "/charges/chrg_test_4zksixanset5gkd5t5q", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksiy1mplgtofojuvn", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zksixanset5gkd5t5q/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksixar4j8vjw2wj1w", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksixar4j8vjw2wj1w/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksix7vwd04lxpfn2v", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T09:51:05Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T09:51:06Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksixnbjtn1c86xhs1", - "livemode": false, - "location": "/charges/chrg_test_4zksixnbjtn1c86xhs1", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksixnvkd1dedjo8kc", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zksixnbjtn1c86xhs1/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksixnekxg5cz2yqre", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksixnekxg5cz2yqre/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksixkgwoauens7r73", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T09:51:07Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T09:51:07Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksiyzmuzzdtjbe9us", - "livemode": false, - "location": "/charges/chrg_test_4zksiyzmuzzdtjbe9us", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksiz08rlb26bmlxk3", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zksizm5e04w4gkicqm", - "location": "/charges/chrg_test_4zksiyzmuzzdtjbe9us/refunds/rfnd_test_4zksizm5e04w4gkicqm", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zksiyzmuzzdtjbe9us", - "transaction": "trxn_test_4zksizmalo4i27cfnvg", - "created": "2015-04-03T09:51:17Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zksize4kaskpeymbt0", - "location": "/charges/chrg_test_4zksiyzmuzzdtjbe9us/refunds/rfnd_test_4zksize4kaskpeymbt0", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zksiyzmuzzdtjbe9us", - "transaction": "trxn_test_4zksize8oqufc1mc4po", - "created": "2015-04-03T09:51:16Z" - } - ], - "location": "/charges/chrg_test_4zksiyzmuzzdtjbe9us/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksiyzpurs592i1961", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksiyzpurs592i1961/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksiywb8wscduu75cz", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T09:51:13Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T09:51:14Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksmqf9wkpvj2o6fkg", - "livemode": false, - "location": "/charges/chrg_test_4zksmqf9wkpvj2o6fkg", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksmr5hp3clafh27oo", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zksmqf9wkpvj2o6fkg/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksmqfbs1gfa7zd628", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksmqfbs1gfa7zd628/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksmqcf6n21lgdly3l", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T10:01:55Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T10:01:55Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksmqrd3iuvfyi88nq", - "livemode": false, - "location": "/charges/chrg_test_4zksmqrd3iuvfyi88nq", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksmqrxniy3a0fqbvs", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zksmqrd3iuvfyi88nq/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksmqrg3ctood2pg1j", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksmqrg3ctood2pg1j/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksmqom9uopyf5m2n0", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T10:01:56Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T10:01:57Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksms5imwoxd890vp3", - "livemode": false, - "location": "/charges/chrg_test_4zksms5imwoxd890vp3", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksms63piv9sgzu80z", - "refunded": 20000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zksmsrojvlre25eo96", - "location": "/charges/chrg_test_4zksms5imwoxd890vp3/refunds/rfnd_test_4zksmsrojvlre25eo96", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zksms5imwoxd890vp3", - "transaction": "trxn_test_4zksmsrtfzf9fjwmay5", - "created": "2015-04-03T10:02:06Z" - }, - { - "object": "refund", - "id": "rfnd_test_4zksmsjan5ip6zb189n", - "location": "/charges/chrg_test_4zksms5imwoxd890vp3/refunds/rfnd_test_4zksmsjan5ip6zb189n", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zksms5imwoxd890vp3", - "transaction": "trxn_test_4zksmsjeqywl9ex4p81", - "created": "2015-04-03T10:02:05Z" - } - ], - "location": "/charges/chrg_test_4zksms5imwoxd890vp3/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksms5m5m7gxkhmw08", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksms5m5m7gxkhmw08/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksms2pw6h9kpc611i", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T10:02:03Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T10:02:03Z" - }, - { - "object": "charge", - "id": "chrg_test_4zksq5qzxcucuki8m6k", - "livemode": false, - "location": "/charges/chrg_test_4zksq5qzxcucuki8m6k", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zksq6hizs4h9h2bv72", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:28+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zksq5qzxcucuki8m6k/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zksq5r2y8t8r8ms8kb", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zksq5r2y8t8r8ms8kb/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zksq5o78kus2i8t02q", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T10:11:38Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-03T10:11:39Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-post.json deleted file mode 100644 index 4fcf467e..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges-post.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "object": "charge", - "id": "chrg_test_4zmrjgxdh4ycj2qncoj", - "livemode": false, - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zmrjgxww057xi0wbh9", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:37+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zmrjgxg87a2zq0rcta", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zmrjgxg87a2zq0rcta/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zmrjglkywgn49idf8o", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:36Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-08T10:53:37Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-get.json deleted file mode 100644 index 4c9204e5..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-get.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "object": "charge", - "id": "chrg_test_4zmrjgxdh4ycj2qncoj", - "livemode": false, - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj", - "amount": 100000, - "currency": "thb", - "description": "Order-384", - "capture": true, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zmrjgxww057xi0wbh9", - "refunded": 10000, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:39+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zmrjhc8lrbfzhdwg7c", - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhc8lrbfzhdwg7c", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zmrjgxdh4ycj2qncoj", - "transaction": "trxn_test_4zmrjhccfigwe9a3xfe", - "created": "2015-04-08T10:53:39Z" - } - ], - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zmrjgxg87a2zq0rcta", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zmrjgxg87a2zq0rcta/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zmrjglkywgn49idf8o", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:36Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-08T10:53:37Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-patch.json deleted file mode 100644 index 004b4c8b..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj-patch.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "object": "charge", - "id": "chrg_test_4zmrjgxdh4ycj2qncoj", - "livemode": false, - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": false, - "transaction": null, - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:30+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zmrjeujqntoxrxd8g2", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zmrjeujqntoxrxd8g2/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zmrjera07arnc1sctr", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:27Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-08T10:53:27Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/capture-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/capture-post.json deleted file mode 100644 index d3901aa9..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/capture-post.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "object": "charge", - "id": "chrg_test_4zmrjgxdh4ycj2qncoj", - "livemode": false, - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj", - "amount": 100000, - "currency": "thb", - "description": "Another description", - "capture": false, - "authorized": true, - "captured": true, - "transaction": "trxn_test_4zmrjfmyx1ax70sx0rb", - "refunded": 0, - "refunds": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:31+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds" - }, - "return_uri": "https://example.co.th/orders/384/complete", - "reference": "paym_test_4zmrjeujqntoxrxd8g2", - "authorize_uri": "https://api.omise.co/payments/paym_test_4zmrjeujqntoxrxd8g2/authorize", - "failure_code": null, - "failure_message": null, - "card": { - "object": "card", - "id": "card_test_4zmrjera07arnc1sctr", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:27Z" - }, - "customer": null, - "ip": "127.0.0.1", - "dispute": null, - "created": "2015-04-08T10:53:27Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-get.json deleted file mode 100644 index 0e1c5635..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-get.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:40+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "refund", - "id": "rfnd_test_4zmrjhc8lrbfzhdwg7c", - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhc8lrbfzhdwg7c", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zmrjgxdh4ycj2qncoj", - "transaction": "trxn_test_4zmrjhccfigwe9a3xfe", - "created": "2015-04-08T10:53:39Z" - } - ], - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-post.json deleted file mode 100644 index 28b97a1a..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds-post.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "object": "refund", - "id": "rfnd_test_4zmrjhlbqy587sw6fwt", - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zmrjgxdh4ycj2qncoj", - "transaction": "trxn_test_4zmrjhlflnz6id6q0bo", - "created": "2015-04-08T10:53:40Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt-get.json deleted file mode 100644 index 28b97a1a..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt-get.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "object": "refund", - "id": "rfnd_test_4zmrjhlbqy587sw6fwt", - "location": "/charges/chrg_test_4zmrjgxdh4ycj2qncoj/refunds/rfnd_test_4zmrjhlbqy587sw6fwt", - "amount": 10000, - "currency": "thb", - "charge": "chrg_test_4zmrjgxdh4ycj2qncoj", - "transaction": "trxn_test_4zmrjhlflnz6id6q0bo", - "created": "2015-04-08T10:53:40Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-get.json deleted file mode 100644 index 97ebdf42..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-get.json +++ /dev/null @@ -1,467 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 179, - "data": [ - { - "object": "customer", - "id": "cust_test_4zkdaqsurbtjbgtgv7w", - "livemode": false, - "location": "/customers/cust_test_4zkdaqsurbtjbgtgv7w", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-02T07:53:51Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkdaqsurbtjbgtgv7w/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkor57qm2b8wl0lkzv", - "livemode": false, - "location": "/customers/cust_test_4zkor57qm2b8wl0lkzv", - "default_card": "card_test_4zkor54z95a9s3mtwln", - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:25:23Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "card", - "id": "card_test_4zkor54z95a9s3mtwln", - "livemode": false, - "location": "/customers/cust_test_4zkor57qm2b8wl0lkzv/cards/card_test_4zkor54z95a9s3mtwln", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "1111", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "zoT22qQjIGifavlKMASVVJ7+XsEBwVd4PzEL3zqs6eA=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-03T03:25:22Z" - } - ], - "location": "/customers/cust_test_4zkor57qm2b8wl0lkzv/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoryfgxq4yegrinq7", - "livemode": false, - "location": "/customers/cust_test_4zkoryfgxq4yegrinq7", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:27:41Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoryfgxq4yegrinq7/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoryv4lkh96642mae", - "livemode": false, - "location": "/customers/cust_test_4zkoryv4lkh96642mae", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:27:43Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoryv4lkh96642mae/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkorzczuo6ge0w0svt", - "livemode": false, - "location": "/customers/cust_test_4zkorzczuo6ge0w0svt", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:27:45Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkorzczuo6ge0w0svt/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkorzxd4flz37o32pz", - "livemode": false, - "location": "/customers/cust_test_4zkorzxd4flz37o32pz", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:27:48Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkorzxd4flz37o32pz/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkos0hx1lr9p2hev6v", - "livemode": false, - "location": "/customers/cust_test_4zkos0hx1lr9p2hev6v", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:27:51Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkos0hx1lr9p2hev6v/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoswp2d7v2k3hcsu3", - "livemode": false, - "location": "/customers/cust_test_4zkoswp2d7v2k3hcsu3", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:30:23Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoswp2d7v2k3hcsu3/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkosx5fpceitn99wgo", - "livemode": false, - "location": "/customers/cust_test_4zkosx5fpceitn99wgo", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:30:25Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkosx5fpceitn99wgo/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkosxnn0ku1oeyg1x3", - "livemode": false, - "location": "/customers/cust_test_4zkosxnn0ku1oeyg1x3", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:30:28Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkosxnn0ku1oeyg1x3/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkosy8hvdi7f7ku68w", - "livemode": false, - "location": "/customers/cust_test_4zkosy8hvdi7f7ku68w", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:30:30Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkosy8hvdi7f7ku68w/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkosz1vu6lofd8wnb0", - "livemode": false, - "location": "/customers/cust_test_4zkosz1vu6lofd8wnb0", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:30:34Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkosz1vu6lofd8wnb0/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkox9519rkvsh0r53j", - "livemode": false, - "location": "/customers/cust_test_4zkox9519rkvsh0r53j", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:42:44Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkox9519rkvsh0r53j/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkox9l8k8q4wn1oq2f", - "livemode": false, - "location": "/customers/cust_test_4zkox9l8k8q4wn1oq2f", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:42:46Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkox9l8k8q4wn1oq2f/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxa3wvb43ra5t65r", - "livemode": false, - "location": "/customers/cust_test_4zkoxa3wvb43ra5t65r", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:42:48Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxa3wvb43ra5t65r/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxaoto01bhbazudc", - "livemode": false, - "location": "/customers/cust_test_4zkoxaoto01bhbazudc", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:42:51Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxaoto01bhbazudc/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxbryikd2cirk1qp", - "livemode": false, - "location": "/customers/cust_test_4zkoxbryikd2cirk1qp", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:42:56Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxbryikd2cirk1qp/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxtbj247vrt1g72a", - "livemode": false, - "location": "/customers/cust_test_4zkoxtbj247vrt1g72a", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:44:19Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxtbj247vrt1g72a/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxtrhnvn9vq52eva", - "livemode": false, - "location": "/customers/cust_test_4zkoxtrhnvn9vq52eva", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:44:22Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxtrhnvn9vq52eva/cards" - } - }, - { - "object": "customer", - "id": "cust_test_4zkoxua54knkla9o8c8", - "livemode": false, - "location": "/customers/cust_test_4zkoxua54knkla9o8c8", - "default_card": null, - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-03T03:44:24Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:32+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - - ], - "location": "/customers/cust_test_4zkoxua54knkla9o8c8/cards" - } - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-post.json deleted file mode 100644 index b26df784..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers-post.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "object": "customer", - "id": "cust_test_4zmrjg2hct06ybwobqc", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc", - "default_card": "card_test_4zmrjfzf0spz3mh63cs", - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-08T10:53:33Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:33+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "card", - "id": "card_test_4zmrjfzf0spz3mh63cs", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:33Z" - } - ], - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards" - } -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-delete.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-delete.json deleted file mode 100644 index 991a3859..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-delete.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "object": "customer", - "id": "cust_test_4zmrjg2hct06ybwobqc", - "livemode": false, - "deleted": true -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-get.json deleted file mode 100644 index 3c37afba..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-get.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "object": "customer", - "id": "cust_test_4zmrjg2hct06ybwobqc", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc", - "default_card": "card_test_4zmrjfpyqg3f0ygdnwz", - "email": "john.doe@example.com", - "description": "John Doe (id: 30)", - "created": "2015-04-08T10:53:32Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:34+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "card", - "id": "card_test_4zmrjfpyqg3f0ygdnwz", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfpyqg3f0ygdnwz", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "1111", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "zoT22qQjIGifavlKMASVVJ7+XsEBwVd4PzEL3zqs6eA=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:31Z" - } - ], - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards" - } -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-patch.json deleted file mode 100644 index 1a167f85..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc-patch.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "object": "customer", - "id": "cust_test_4zmrjg2hct06ybwobqc", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc", - "default_card": "card_test_4zmrjfpyqg3f0ygdnwz", - "email": "john.smith@example.com", - "description": "Another description", - "created": "2015-04-08T10:53:32Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:35+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "card", - "id": "card_test_4zmrjfpyqg3f0ygdnwz", - "livemode": false, - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfpyqg3f0ygdnwz", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "1111", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "zoT22qQjIGifavlKMASVVJ7+XsEBwVd4PzEL3zqs6eA=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:31Z" - } - ], - "location": "/customers/cust_test_4zmrjg2hct06ybwobqc/cards" - } -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-delete.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-delete.json deleted file mode 100644 index 40b6b9b9..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-delete.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "object": "card", - "id": "card_test_4zmrjfzf0spz3mh63cs", - "livemode": false, - "deleted": true -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-get.json deleted file mode 100644 index 6f049927..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-get.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "object": "card", - "id": "card_test_4zmrjfzf0spz3mh63cs", - "livemode": false, - "location": "/customers/cust_test_4zmrjd5aa0timiwo7y7/cards/card_test_4zmrjfzf0spz3mh63cs", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "1111", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "zoT22qQjIGifavlKMASVVJ7+XsEBwVd4PzEL3zqs6eA=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:19Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-patch.json deleted file mode 100644 index 95ce9255..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_4zmrjg2hct06ybwobqc/cards/card_test_4zmrjfzf0spz3mh63cs-patch.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "object": "card", - "id": "card_test_4zmrjfzf0spz3mh63cs", - "livemode": false, - "location": "/customers/cust_test_4zmrjdsl9hs10oepm0t/cards/card_test_4zmrjfzf0spz3mh63cs", - "country": "us", - "city": "Bangkok", - "postal_code": "10310", - "financing": "", - "last_digits": "1111", - "brand": "Visa", - "expiration_month": 11, - "expiration_year": 2017, - "fingerprint": "zoT22qQjIGifavlKMASVVJ7+XsEBwVd4PzEL3zqs6eA=", - "name": "Somchai Praset", - "security_code_check": true, - "created": "2015-04-08T10:53:22Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3-get.json deleted file mode 100644 index 59a6c247..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3-get.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "object": "customer", - "id": "cust_test_5234fzk37pi2mz0cen3", - "livemode": false, - "location": "/customers/cust_test_5234fzk37pi2mz0cen3", - "default_card": "card_test_5234g4ctbewk18nwvvq", - "email": "johndoe@example.com", - "description": "New description", - "created": "2015-11-20T08:35:47Z", - "cards": { - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-12-03T09:04:20+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "card", - "id": "card_test_5234fx4wnf5ygnlp1p6", - "livemode": false, - "location": "/customers/cust_test_5234fzk37pi2mz0cen3/cards/card_test_5234fx4wnf5ygnlp1p6", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "bank": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 11, - "expiration_year": 2017, - "fingerprint": "b7ETDh/GD7EcJvppdJWZICfDs5QsvCJCXBkWHTJCCGc=", - "name": "JOHN DOE", - "security_code_check": true, - "created": "2015-11-20T08:35:36Z" - }, - { - "object": "card", - "id": "card_test_5234g4ctbewk18nwvvq", - "livemode": false, - "location": "/customers/cust_test_5234fzk37pi2mz0cen3/cards/card_test_5234g4ctbewk18nwvvq", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "bank": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 11, - "expiration_year": 2017, - "fingerprint": "b7ETDh/GD7EcJvppdJWZICfDs5QsvCJCXBkWHTJCCGc=", - "name": "JOHN DOE", - "security_code_check": true, - "created": "2015-11-20T08:36:10Z" - } - ], - "location": "/customers/cust_test_5234fzk37pi2mz0cen3/cards" - } -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json deleted file mode 100644 index 2d8fc862..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-12-03T09:04:20+00:00", - "offset": 0, - "limit": 1, - "total": 2, - "data": [ - { - "object": "card", - "id": "card_test_5234fx4wnf5ygnlp1p6", - "livemode": false, - "location": "/customers/cust_test_5234fzk37pi2mz0cen3/cards/card_test_5234fx4wnf5ygnlp1p6", - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "bank": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 11, - "expiration_year": 2017, - "fingerprint": "b7ETDh/GD7EcJvppdJWZICfDs5QsvCJCXBkWHTJCCGc=", - "name": "JOHN DOE", - "security_code_check": true, - "created": "2015-11-20T08:35:36Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes-get.json deleted file mode 100644 index deb82741..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes-get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-06-22T11:14:12+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - { - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "pending", - "message": "This is an unauthorized transaction", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/closed-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/closed-get.json deleted file mode 100644 index 853f9eb0..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/closed-get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-06-22T11:35:50+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - { - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "closed", - "message": "This is an unauthorized transaction", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-get.json deleted file mode 100644 index 7f04bea2..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-get.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "pending", - "message": "This is an unauthorized transaction", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" -} \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-patch.json deleted file mode 100644 index 48d43a05..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/dspt_test_4zgf15h89w8t775kcm8-patch.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "pending", - "message": "New Message", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" -} \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/open-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/open-get.json deleted file mode 100644 index 6aba988c..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/open-get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-06-22T11:30:04+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - { - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "open", - "message": "This is an unauthorized transaction", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/pending-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/pending-get.json deleted file mode 100644 index 7b21acfd..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/disputes/pending-get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-06-22T11:35:30+00:00", - "offset": 0, - "limit": 20, - "total": 0, - "data": [ - { - "object": "dispute", - "id": "dspt_test_4zgf15h89w8t775kcm8", - "livemode": false, - "location": "/disputes/dspt_test_4zgf15h89w8t775kcm8", - "amount": 100000, - "currency": "thb", - "status": "pending", - "message": "This is an unauthorized transaction", - "charge": "chrg_test_4zgcsiv4s6ewsy8nrw3", - "created": "2015-03-23T05:24:39Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-get.json deleted file mode 100644 index c723024c..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-get.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-06-02T08:16:36+00:00", - "offset": 0, - "limit": 20, - "total": 1, - "data": [ - { - "object": "recipient", - "id": "recp_test_506zyw920w15czmfsuk", - "livemode": false, - "location": "/recipients/recp_test_506zyw920w15czmfsuk", - "verified": true, - "active": true, - "name": "iam.nuttanon@gmail.com", - "email": "iam.nuttanon@gmail.com", - "description": "Default recipient", - "type": "individual", - "tax_id": "", - "bank_account": { - "object": "bank_account", - "brand": "test", - "last_digits": "6789", - "name": "DEFAULT BANK ACCOUNT", - "created": "2015-05-30T04:27:59Z" - }, - "failure_code": null, - "created": "2015-05-30T04:27:59Z" - } - ], - "location": "/recipients" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-post.json deleted file mode 100644 index aeab5a00..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients-post.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "recipient", - "id": "recp_test_508a9dytz793gxv9m77", - "livemode": false, - "location": "/recipients/recp_test_508a9dytz793gxv9m77", - "verified": false, - "active": false, - "name": "Nuttanon T", - "email": "nam@omise.co", - "description": "Nuttanon T's account", - "type": "individual", - "tax_id": "", - "bank_account": { - "object": "bank_account", - "brand": "scb", - "last_digits": "7890", - "name": "Nuttanon T", - "created": "2015-06-02T11:22:05Z" - }, - "failure_code": null, - "created": "2015-06-02T11:22:05Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-delete.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-delete.json deleted file mode 100644 index e2b18b26..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-delete.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "object": "recipient", - "id": "recp_test_508a9dytz793gxv9m77", - "livemode": false, - "deleted": true -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-get.json deleted file mode 100644 index aeab5a00..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "recipient", - "id": "recp_test_508a9dytz793gxv9m77", - "livemode": false, - "location": "/recipients/recp_test_508a9dytz793gxv9m77", - "verified": false, - "active": false, - "name": "Nuttanon T", - "email": "nam@omise.co", - "description": "Nuttanon T's account", - "type": "individual", - "tax_id": "", - "bank_account": { - "object": "bank_account", - "brand": "scb", - "last_digits": "7890", - "name": "Nuttanon T", - "created": "2015-06-02T11:22:05Z" - }, - "failure_code": null, - "created": "2015-06-02T11:22:05Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-patch.json deleted file mode 100644 index 3313e5df..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/recipients/recp_test_508a9dytz793gxv9m77-patch.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "object": "recipient", - "id": "recp_test_508a9dytz793gxv9m77", - "livemode": false, - "location": "/recipients/recp_test_508a9dytz793gxv9m77", - "verified": false, - "active": false, - "name": "Nuttanon Tra", - "email": "nam@omise.co", - "description": "Another description", - "type": "individual", - "tax_id": "", - "bank_account": { - "object": "bank_account", - "brand": "scb", - "last_digits": "7890", - "name": "Nuttanon T", - "created": "2015-06-02T11:22:05Z" - }, - "failure_code": null, - "created": "2015-06-02T11:22:05Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions-get.json deleted file mode 100644 index 63fa0ffb..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions-get.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:43+00:00", - "offset": 0, - "limit": 20, - "total": 113, - "data": [ - { - "object": "transaction", - "id": "trxn_test_4zmrjhlflnz6id6q0bo", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:53:40Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrjhccfigwe9a3xfe", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:53:39Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrjgxww057xi0wbh9", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:53:37Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrjfmyx1ax70sx0rb", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:53:31Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrjf8w7onx16ma04k", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:53:29Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrie79ct7u0vairmc", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:50:34Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmridyay8zm0ky28he", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:50:33Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmriddz9aktfmknmvk", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:50:30Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmricb4gkydqbr4s9g", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:50:25Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmribu1dr5ccs4teoo", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:50:23Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrhw3ksajfl7gjyos", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:49:08Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrhvuua0ds0lxc48b", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:49:07Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrhvgvoztvkzw14fk", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:49:05Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrhuf5hrmygs2htem", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:49:00Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrhu0am339jfipuc2", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:48:58Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrh68sphog5bvdkm9", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:47:06Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrh601etaxv91ab7c", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:47:04Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrh5l866on45evmic", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:47:02Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrh4jlrff058nykkk", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:46:58Z" - }, - { - "object": "transaction", - "id": "trxn_test_4zmrh44hbntbfemb5ka", - "type": "credit", - "amount": 96094, - "currency": "THB", - "created": "2015-04-08T10:46:56Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions/trxn_test_4zmrjhlflnz6id6q0bo-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions/trxn_test_4zmrjhlflnz6id6q0bo-get.json deleted file mode 100644 index 1f08d486..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transactions/trxn_test_4zmrjhlflnz6id6q0bo-get.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "object": "transaction", - "id": "trxn_test_4zmrjhlflnz6id6q0bo", - "type": "debit", - "amount": 10000, - "currency": "THB", - "created": "2015-04-08T10:53:40Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-get.json deleted file mode 100644 index 24b38d2b..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-get.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "object": "list", - "from": "1970-01-01T00:00:00+00:00", - "to": "2015-04-08T10:53:43+00:00", - "offset": 0, - "limit": 20, - "total": 2, - "data": [ - { - "object": "transfer", - "id": "trsf_test_4zmperr494587f4jrby", - "livemode": false, - "location": "/transfers/trsf_test_4zmperr494587f4jrby", - "sent": true, - "paid": true, - "amount": 100000, - "currency": "thb", - "failure_code": null, - "failure_message": null, - "transaction": "trxn_test_4zmpmw0o8l8e99tuk0s", - "created": "2015-04-08T07:15:44Z" - }, - { - "object": "transfer", - "id": "trsf_test_4zmqxvlmqdr7roihajb", - "livemode": false, - "location": "/transfers/trsf_test_4zmqxvlmqdr7roihajb", - "sent": true, - "paid": true, - "amount": 100000, - "currency": "thb", - "failure_code": null, - "failure_message": null, - "transaction": "trxn_test_4zmrgsbbo24hradpqgn", - "created": "2015-04-08T09:52:17Z" - } - ] -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-post.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-post.json deleted file mode 100644 index e35a0e2c..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers-post.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "object": "transfer", - "id": "trsf_test_4zmrjicrvw7j6uhv1l4", - "livemode": false, - "location": "/transfers/trsf_test_4zmrjicrvw7j6uhv1l4", - "sent": false, - "paid": false, - "amount": 100000, - "currency": "thb", - "failure_code": null, - "failure_message": null, - "transaction": null, - "created": "2015-04-08T10:53:44Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-delete.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-delete.json deleted file mode 100644 index 60176235..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-delete.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "object": "transfer", - "id": "trsf_test_4zmrjicrvw7j6uhv1l4", - "livemode": false, - "deleted": true -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-get.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-get.json deleted file mode 100644 index e35a0e2c..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-get.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "object": "transfer", - "id": "trsf_test_4zmrjicrvw7j6uhv1l4", - "livemode": false, - "location": "/transfers/trsf_test_4zmrjicrvw7j6uhv1l4", - "sent": false, - "paid": false, - "amount": 100000, - "currency": "thb", - "failure_code": null, - "failure_message": null, - "transaction": null, - "created": "2015-04-08T10:53:44Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-patch.json b/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-patch.json deleted file mode 100644 index 8c6ef42c..00000000 --- a/includes/libraries/omise-php/tests/fixtures/api.omise.co/transfers/trsf_test_4zmrjicrvw7j6uhv1l4-patch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "object": "transfer", - "id": "trsf_test_4zmrjicrvw7j6uhv1l4", - "livemode": false, - "location": "/transfers/trsf_test_4zmrjicrvw7j6uhv1l4", - "sent": false, - "paid": false, - "amount": 5000, - "currency": "thb", - "failure_code": null, - "failure_message": null, - "transaction": null, - "created": "2015-04-08T10:53:44Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens-post.json b/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens-post.json deleted file mode 100644 index b2f4fe26..00000000 --- a/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens-post.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "object": "token", - "id": "tokn_test_4zmrjhuk2rndz24a6x0", - "livemode": false, - "location": "https://vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0", - "used": false, - "card": { - "object": "card", - "id": "card_test_4zmrjhuie0wwy6sg86f", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:41Z" - }, - "created": "2015-04-08T10:53:41Z" -} diff --git a/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0-get.json b/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0-get.json deleted file mode 100644 index b2f4fe26..00000000 --- a/includes/libraries/omise-php/tests/fixtures/vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0-get.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "object": "token", - "id": "tokn_test_4zmrjhuk2rndz24a6x0", - "livemode": false, - "location": "https://vault.omise.co/tokens/tokn_test_4zmrjhuk2rndz24a6x0", - "used": false, - "card": { - "object": "card", - "id": "card_test_4zmrjhuie0wwy6sg86f", - "livemode": false, - "country": "us", - "city": "Bangkok", - "postal_code": "10320", - "financing": "", - "last_digits": "4242", - "brand": "Visa", - "expiration_month": 10, - "expiration_year": 2018, - "fingerprint": "pvtmjojEaHi3y880wV/485z1dVNhASL4xCrxSlsCLBw=", - "name": "Somchai Prasert", - "security_code_check": true, - "created": "2015-04-08T10:53:41Z" - }, - "created": "2015-04-08T10:53:41Z" -} diff --git a/includes/libraries/omise-php/tests/omise/AccountTest.php b/includes/libraries/omise-php/tests/omise/AccountTest.php deleted file mode 100644 index 41a9ecb1..00000000 --- a/includes/libraries/omise-php/tests/omise/AccountTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertTrue(method_exists('OmiseAccount', 'retrieve')); - $this->assertTrue(method_exists('OmiseAccount', 'reload')); - $this->assertTrue(method_exists('OmiseAccount', 'getUrl')); - } - - /** - * Assert that an account object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseAccountObject() { - $account = OmiseAccount::retrieve(); - - $this->assertArrayHasKey('object', $account); - $this->assertEquals('account', $account['object']); - } - - /** - * Assert that an account object is returned after a successful reload. - * - */ - public function testReload() { - $account = OmiseAccount::retrieve(); - $account->reload(); - - $this->assertArrayHasKey('object', $account); - $this->assertEquals('account', $account['object']); - } -} diff --git a/includes/libraries/omise-php/tests/omise/BalanceTest.php b/includes/libraries/omise-php/tests/omise/BalanceTest.php deleted file mode 100644 index b8bd0bce..00000000 --- a/includes/libraries/omise-php/tests/omise/BalanceTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertTrue(method_exists('OmiseBalance', 'retrieve')); - $this->assertTrue(method_exists('OmiseBalance', 'reload')); - $this->assertTrue(method_exists('OmiseBalance', 'getUrl')); - } - - /** - * Assert that a balance object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseBalanceObject() { - $balance = OmiseBalance::retrieve(); - - $this->assertArrayHasKey('object', $balance); - $this->assertEquals('balance', $balance['object']); - } - - /** - * Assert that a balance object is returned after a successful reload. - * - */ - public function testReload() { - $balance = OmiseBalance::retrieve(); - $balance->reload(); - - $this->assertArrayHasKey('object', $balance); - $this->assertEquals('balance', $balance['object']); - } -} diff --git a/includes/libraries/omise-php/tests/omise/CardTest.php b/includes/libraries/omise-php/tests/omise/CardTest.php deleted file mode 100644 index 75441313..00000000 --- a/includes/libraries/omise-php/tests/omise/CardTest.php +++ /dev/null @@ -1,82 +0,0 @@ -assertTrue(method_exists('OmiseCard', 'reload')); - $this->assertTrue(method_exists('OmiseCard', 'update')); - $this->assertTrue(method_exists('OmiseCard', 'destroy')); - $this->assertTrue(method_exists('OmiseCard', 'isDestroyed')); - $this->assertTrue(method_exists('OmiseCard', 'getUrl')); - } - - /** - * Assert that a list of card object could be successfully retrieved from customer. - * - */ - public function testRetrieveCustomerCardListObject() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $cards = $customer->cards(); - - $this->assertArrayHasKey('object', $cards); - $this->assertEquals('list', $cards['object']); - } - - /** - * Assert that a card is could be successfully retrieved from customer. - * - */ - public function testRetrieveSpecificCustomerCardObject() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $card = $customer->cards()->retrieve('card_test_4zmrjfzf0spz3mh63cs'); - - $this->assertArrayHasKey('object', $card); - $this->assertEquals('card', $card['object']); - } - - /** - * Assert that a card object is returned after a successful reload. - * - */ - public function testReload() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $card = $customer->cards()->retrieve('card_test_4zmrjfzf0spz3mh63cs'); - $card->reload(); - - $this->assertArrayHasKey('object', $card); - $this->assertEquals('card', $card['object']); - } - - /** - * Assert that a card is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $card = $customer->cards()->retrieve('card_test_4zmrjfzf0spz3mh63cs'); - $card->update(array('expiration_month' => 11, - 'expiration_year' => 2017, - 'name' => 'Somchai Praset', - 'postal_code' => '10310')); - - $this->assertArrayHasKey('object', $card); - $this->assertEquals('card', $card['object']); - } - - /** - * Assert that a destroyed flag is set after a card is successfully destroyed. - * - */ - public function testDestroy() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $card = $customer->cards()->retrieve('card_test_4zmrjfzf0spz3mh63cs'); - $card->destroy(); - - $this->assertArrayHasKey('object', $card); - $this->assertEquals('card', $card['object']); - $this->assertTrue($card->isDestroyed()); - } -} diff --git a/includes/libraries/omise-php/tests/omise/ChargeTest.php b/includes/libraries/omise-php/tests/omise/ChargeTest.php deleted file mode 100644 index 8a9a8735..00000000 --- a/includes/libraries/omise-php/tests/omise/ChargeTest.php +++ /dev/null @@ -1,81 +0,0 @@ -assertTrue(method_exists('OmiseCharge', 'reload')); - $this->assertTrue(method_exists('OmiseCharge', 'create')); - $this->assertTrue(method_exists('OmiseCharge', 'update')); - $this->assertTrue(method_exists('OmiseCharge', 'capture')); - $this->assertTrue(method_exists('OmiseCharge', 'refunds')); - $this->assertTrue(method_exists('OmiseCharge', 'getUrl')); - } - - /** - * Assert that a list of charge object could be successfully retrieved. - * - */ - public function testRetrieveChargeListObject() { - $charge = OmiseCharge::retrieve(); - - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('list', $charge['object']); - } - - /** - * Assert that a charge is successfully created with the given parameters set. - * - */ - public function testCreate() { - $charge = OmiseCharge::create(array('amount' => 100000, - 'currency' => 'thb', - 'description' => 'Order-384', - 'ip' => '127.0.0.1', - 'card' => 'tokn_test_4zmrjhuk2rndz24a6x0')); - - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('charge', $charge['object']); - } - - /** - * Assert that a charge object is returned after a successful retrieve. - * - */ - public function testRetrieveSpecificChargeObject() { - $charge = OmiseCharge::retrieve('chrg_test_4zmrjgxdh4ycj2qncoj'); - - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('charge', $charge['object']); - } - - /** - * Assert that a charge is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $charge = OmiseCharge::retrieve('chrg_test_4zmrjgxdh4ycj2qncoj'); - $charge->update(array('description' => 'Another description')); - - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('charge', $charge['object']); - } - - /** - * Assert that a captured flag is set after charge is successfully captured. - * - * In our test environment, the charge will be auto-captured after create - * and this test will raise OmiseFailedCaptureException. - * - */ - public function testCapture() { - $charge = OmiseCharge::retrieve('chrg_test_4zmrjgxdh4ycj2qncoj'); - $charge->capture(); - - $this->assertArrayHasKey('object', $charge); - $this->assertEquals('charge', $charge['object']); - $this->assertTrue($charge['captured']); - } -} diff --git a/includes/libraries/omise-php/tests/omise/CustomerTest.php b/includes/libraries/omise-php/tests/omise/CustomerTest.php deleted file mode 100644 index 3f7bc607..00000000 --- a/includes/libraries/omise-php/tests/omise/CustomerTest.php +++ /dev/null @@ -1,95 +0,0 @@ -assertTrue(method_exists('OmiseCustomer', 'retrieve')); - $this->assertTrue(method_exists('OmiseCustomer', 'create')); - $this->assertTrue(method_exists('OmiseCustomer', 'reload')); - $this->assertTrue(method_exists('OmiseCustomer', 'update')); - $this->assertTrue(method_exists('OmiseCustomer', 'destroy')); - $this->assertTrue(method_exists('OmiseCustomer', 'isDestroyed')); - $this->assertTrue(method_exists('OmiseCustomer', 'cards')); - $this->assertTrue(method_exists('OmiseCustomer', 'getCards')); - $this->assertTrue(method_exists('OmiseCustomer', 'getUrl')); - } - - /** - * Assert that a list of customer object could be successfully retrieved. - * - */ - public function testRetrieveCustomerListObject() { - $customer = OmiseCustomer::retrieve(); - - $this->assertArrayHasKey('object', $customer); - $this->assertEquals('list', $customer['object']); - } - - /** - * Assert that a customer is successfully created with the given parameters set. - * - */ - public function testCreate() { - $customer = OmiseCustomer::create(array('email' => 'john.doe@example.com', - 'description' => 'John Doe (id: 30)', - 'card' => 'tokn_test_4zmrjhuk2rndz24a6x0')); - - $this->assertArrayHasKey('object', $customer); - $this->assertEquals('customer', $customer['object']); - } - - /** - * Assert that a customer object is returned after a successful retrieve. - * - */ - public function testRetrieveSpecificCustomerObject() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - - $this->assertArrayHasKey('object', $customer); - $this->assertEquals('customer', $customer['object']); - } - - /** - * Assert that a customer object is returned after a successful retrieve. - * - */ - public function testRetrieveCardObjectFromCustomer() { - $customer = OmiseCustomer::retrieve('cust_test_5234fzk37pi2mz0cen3'); - $cards = $customer->cards(array('limit' => 1)); - - $this->assertArrayHasKey('object', $cards); - $this->assertEquals('list', $cards['object']); - - if (!empty($cards['data'])) { - $this->assertEquals('card', $cards['data'][0]['object']); - $this->assertEquals(1, count($cards['data'])); - } - } - - /** - * Assert that a customer is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $customer->update(array('email' => 'john.smith@example.com', - 'description' => 'Another description')); - - $this->assertArrayHasKey('object', $customer); - $this->assertEquals('customer', $customer['object']); - } - - /** - * Assert that a destroyed flag is set after a customer is successfully destroyed. - * - */ - public function testDestroy() { - $customer = OmiseCustomer::retrieve('cust_test_4zmrjg2hct06ybwobqc'); - $customer->destroy(); - - $this->assertTrue($customer->isDestroyed()); - } -} diff --git a/includes/libraries/omise-php/tests/omise/DisputeTest.php b/includes/libraries/omise-php/tests/omise/DisputeTest.php deleted file mode 100644 index 09aa47c7..00000000 --- a/includes/libraries/omise-php/tests/omise/DisputeTest.php +++ /dev/null @@ -1,88 +0,0 @@ -assertTrue(method_exists('OmiseDispute', 'retrieve')); - $this->assertTrue(method_exists('OmiseDispute', 'reload')); - $this->assertTrue(method_exists('OmiseDispute', 'update')); - $this->assertTrue(method_exists('OmiseDispute', 'getUrl')); - } - - /** - * Assert that a list of dispute object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseDisputeObject() { - $dispute = OmiseDispute::retrieve(); - $dispute->reload(); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('list', $dispute['object']); - $this->assertEquals('dispute', $dispute['data'][0]['object']); - } - - /** - * Assert that a dispute object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseDisputeObjectWithKey() { - $dispute = OmiseDispute::retrieve('dspt_test_4zgf15h89w8t775kcm8'); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('dispute', $dispute['object']); - } - - /** - * Assert that a dispute object is returned after a successful retrieve with 'open' status. - * - */ - public function testRetrieveOmiseDisputeObjectThatOpen() { - $dispute = OmiseDispute::retrieve('open'); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('dispute', $dispute['data'][0]['object']); - $this->assertEquals('open', $dispute['data'][0]['status']); - } - - /** - * Assert that a dispute object is returned after a successful retrieve with 'pending' status. - * - */ - public function testRetrieveOmiseDisputeObjectThatPending() { - $dispute = OmiseDispute::retrieve('pending'); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('dispute', $dispute['data'][0]['object']); - $this->assertEquals('pending', $dispute['data'][0]['status']); - } - - /** - * Assert that a dispute object is returned after a successful retrieve with 'closed' status. - * - */ - public function testRetrieveOmiseDisputeObjectThatClosed() { - $dispute = OmiseDispute::retrieve('closed'); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('dispute', $dispute['data'][0]['object']); - $this->assertEquals('closed', $dispute['data'][0]['status']); - } - - /** - * Assert that a dispute is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $dispute = OmiseDispute::retrieve('dspt_test_4zgf15h89w8t775kcm8'); - $dispute->update(array( - 'message' => 'New Message...' - )); - - $this->assertArrayHasKey('object', $dispute); - $this->assertEquals('dispute', $dispute['object']); - } -} \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/omise/RecipientTest.php b/includes/libraries/omise-php/tests/omise/RecipientTest.php deleted file mode 100644 index 12cf4320..00000000 --- a/includes/libraries/omise-php/tests/omise/RecipientTest.php +++ /dev/null @@ -1,78 +0,0 @@ -assertTrue(method_exists('OmiseRecipient', 'retrieve')); - $this->assertTrue(method_exists('OmiseRecipient', 'getUrl')); - } - - /** - * Assert that an recipient object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseRecipientObject() { - $recipient = OmiseRecipient::retrieve(); - - $this->assertArrayHasKey('object', $recipient); - $this->assertEquals('list', $recipient['object']); - $this->assertEquals('recipient', $recipient['data'][0]['object']); - } - - /** - * Assert that an recipient object is returned after a successful retrieve. - * - */ - public function testRetrieveOmiseRecipientObjectWithKey() { - $recipient = OmiseRecipient::retrieve('recp_test_508a9dytz793gxv9m77'); - - $this->assertArrayHasKey('object', $recipient); - $this->assertEquals('recipient', $recipient['object']); - } - - /** - * Assert that a recipient is successfully created with the given parameters set. - * - */ - public function testCreate() { - $recipient = OmiseRecipient::create(array('name' => 'Nuttanon T', - 'description' => 'Nuttanon T\'s account', - 'email' => 'nam@omise.co', - 'type' => 'individual', - 'tax_id' => '', - 'bank_account' => array( 'brand' => 'scb', - 'number' => '1234567890', - 'name' => 'Nuttanon T'))); - - $this->assertArrayHasKey('object', $recipient); - $this->assertEquals('recipient', $recipient['object']); - } - - /** - * Assert that a recipient is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $recipient = OmiseRecipient::retrieve('recp_test_508a9dytz793gxv9m77'); - $recipient->update(array( 'name' => 'Nuttanon Tra', - 'email' => 'nam@omise.co', - 'description' => 'Another description')); - - $this->assertArrayHasKey('object', $recipient); - $this->assertEquals('recipient', $recipient['object']); - } - - /** - * Assert that a destroyed flag is set after a recipient is successfully destroyed. - * - */ - public function testDelete() { - $recipient = OmiseRecipient::retrieve('recp_test_508a9dytz793gxv9m77'); - $recipient->destroy(); - - $this->assertTrue($recipient->isDestroyed()); - } -} diff --git a/includes/libraries/omise-php/tests/omise/RefundTest.php b/includes/libraries/omise-php/tests/omise/RefundTest.php deleted file mode 100644 index 31d7f6a5..00000000 --- a/includes/libraries/omise-php/tests/omise/RefundTest.php +++ /dev/null @@ -1,43 +0,0 @@ -refunds(); - - $this->assertArrayHasKey('object', $refunds); - $this->assertEquals('list', $refunds['object']); - } - - /** - * Assert that a refund is successfully created with the given parameters set. - * - */ - public function testCreate() { - $charge = OmiseCharge::retrieve('chrg_test_4zmrjgxdh4ycj2qncoj'); - $refunds = $charge->refunds(); - - $refund = $refunds->create(array('amount' => 10000)); - - $this->assertArrayHasKey('object', $refund); - $this->assertEquals('refund', $refund['object']); - } - - /** - * - */ - public function testRetrieveSpecificChargeRefundObject() { - $charge = OmiseCharge::retrieve('chrg_test_4zmrjgxdh4ycj2qncoj'); - $refunds = $charge->refunds(); - - $create = $refunds->create(array('amount' => 10000)); - $refund = $refunds->retrieve($create['id']); - - $this->assertArrayHasKey('object', $refund); - $this->assertEquals('refund', $refund['object']); - } -} diff --git a/includes/libraries/omise-php/tests/omise/TestConfig.php b/includes/libraries/omise-php/tests/omise/TestConfig.php deleted file mode 100644 index 14486f43..00000000 --- a/includes/libraries/omise-php/tests/omise/TestConfig.php +++ /dev/null @@ -1,14 +0,0 @@ -= 0 && file_exists(dirname(__FILE__).'/../../vendor/autoload.php')) { - require_once dirname(__FILE__).'/../../vendor/autoload.php'; -} else { - require_once dirname(__FILE__).'/../../lib/Omise.php'; -} - -abstract class TestConfig extends PHPUnit_Framework_TestCase { } \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/omise/TokenTest.php b/includes/libraries/omise-php/tests/omise/TokenTest.php deleted file mode 100644 index ef50d792..00000000 --- a/includes/libraries/omise-php/tests/omise/TokenTest.php +++ /dev/null @@ -1,43 +0,0 @@ -assertTrue(method_exists('OmiseToken', 'retrieve')); - $this->assertTrue(method_exists('OmiseToken', 'create')); - $this->assertTrue(method_exists('OmiseToken', 'reload')); - $this->assertTrue(method_exists('OmiseToken', 'getUrl')); - } - - /** - * Assert that a token is successfully created with the given parameters set. - * - */ - public function testCreate() { - $token = OmiseToken::create(array( - 'card' => array('name' => 'Somchai Prasert', - 'number' => '4242424242424242', - 'expiration_month' => 10, - 'expiration_year' => 2018, - 'city' => 'Bangkok', - 'postal_code' => '10320', - 'security_code' => 123))); - - $this->assertArrayHasKey('object', $token); - $this->assertEquals('token', $token['object']); - } - - /** - * Assert that a customer object is returned after a successful retrieve. - * - */ - public function testRetrieve() { - $token = OmiseToken::retrieve('tokn_test_4zmrjhuk2rndz24a6x0'); - - $this->assertArrayHasKey('object', $token); - $this->assertEquals('token', $token['object']); - } -} diff --git a/includes/libraries/omise-php/tests/omise/TransactionTest.php b/includes/libraries/omise-php/tests/omise/TransactionTest.php deleted file mode 100644 index d48b30ce..00000000 --- a/includes/libraries/omise-php/tests/omise/TransactionTest.php +++ /dev/null @@ -1,51 +0,0 @@ -assertTrue(method_exists('OmiseTransaction', 'retrieve')); - $this->assertTrue(method_exists('OmiseTransaction', 'reload')); - $this->assertTrue(method_exists('OmiseTransaction', 'getUrl')); - } - - /** - * Assert that a list of transactions object could be successfully retrieved. - * - */ - public function testRetrieveAllTransactions() { - $transactions = OmiseTransaction::retrieve(); - - $this->assertArrayHasKey('object', $transactions); - $this->assertEquals('list', $transactions['object']); - } - - /** - * Assert that a transaction object is returned after a successful retrieve with transaction id. - * - */ - public function testRetrieveWithSpecificTransaction() { - $transaction = OmiseTransaction::retrieve('trxn_test_4zmrjhlflnz6id6q0bo'); - - $this->assertArrayHasKey('object', $transaction); - $this->assertEquals('transaction', $transaction['object']); - } - - /** - * Assert that a transaction object is returned after a successful retrieve with transaction id. - * And validate json structure that's return back. - * - */ - public function testValidateOmiseTransactionObjectRetrievedStructure() { - $transaction = OmiseTransaction::retrieve('trxn_test_4zmrjhlflnz6id6q0bo'); - - $this->assertArrayHasKey('object', $transaction); - $this->assertArrayHasKey('id', $transaction); - $this->assertArrayHasKey('type', $transaction); - $this->assertArrayHasKey('amount', $transaction); - $this->assertArrayHasKey('currency', $transaction); - $this->assertArrayHasKey('created', $transaction); - } -} diff --git a/includes/libraries/omise-php/tests/omise/TransferTest.php b/includes/libraries/omise-php/tests/omise/TransferTest.php deleted file mode 100644 index 863c8744..00000000 --- a/includes/libraries/omise-php/tests/omise/TransferTest.php +++ /dev/null @@ -1,76 +0,0 @@ -assertTrue(method_exists('OmiseTransfer', 'retrieve')); - $this->assertTrue(method_exists('OmiseTransfer', 'create')); - $this->assertTrue(method_exists('OmiseTransfer', 'reload')); - $this->assertTrue(method_exists('OmiseTransfer', 'save')); - $this->assertTrue(method_exists('OmiseTransfer', 'update')); - $this->assertTrue(method_exists('OmiseTransfer', 'destroy')); - $this->assertTrue(method_exists('OmiseTransfer', 'isDestroyed')); - $this->assertTrue(method_exists('OmiseTransfer', 'getUrl')); - } - - /** - * Assert that a list of transfer object could be successfully retrieved. - * - */ - public function testRetrieveTransferListObject() { - $transfers = OmiseTransfer::retrieve(); - - $this->assertArrayHasKey('object', $transfers); - $this->assertEquals('list', $transfers['object']); - } - - /** - * Assert that a transfer is successfully created with the given parameters set. - * - */ - public function testCreate() { - $transfer = OmiseTransfer::create(array('amount' => 100000)); - - $this->assertArrayHasKey('object', $transfer); - $this->assertEquals('transfer', $transfer['object']); - } - - /** - * Assert that a transfer object is returned after a successful retrieve. - * - */ - public function testRetrieve() { - $transfer = OmiseTransfer::retrieve('trsf_test_4zmrjicrvw7j6uhv1l4'); - - $this->assertArrayHasKey('object', $transfer); - $this->assertEquals('transfer', $transfer['object']); - } - - /** - * Assert that a transfer is successfully updated with the given parameters set. - * - */ - public function testUpdate() { - $transfer = OmiseTransfer::retrieve('trsf_test_4zmrjicrvw7j6uhv1l4'); - - $transfer['amount'] = 5000; - $transfer->save(); - - $this->assertArrayHasKey('object', $transfer); - $this->assertEquals('transfer', $transfer['object']); - } - - /** - * Assert that a destroyed flag is set after a transfer is successfully destroyed. - * - */ - public function testDestroy() { - $transfer = OmiseTransfer::retrieve('trsf_test_4zmrjicrvw7j6uhv1l4'); - $transfer->destroy(); - - $this->assertTrue($transfer->isDestroyed()); - } -} diff --git a/includes/libraries/omise-php/tests/omise/exception/OmiseExceptionTest.php b/includes/libraries/omise-php/tests/omise/exception/OmiseExceptionTest.php deleted file mode 100644 index 44012636..00000000 --- a/includes/libraries/omise-php/tests/omise/exception/OmiseExceptionTest.php +++ /dev/null @@ -1,147 +0,0 @@ -= 0 && file_exists(dirname(__FILE__).'/../../../vendor/autoload.php')) { - require_once dirname(__FILE__).'/../../../vendor/autoload.php'; -} else { - require_once dirname(__FILE__).'/../../../lib/Omise.php'; -} - -class OmiseExceptionTest extends PHPUnit_Framework_TestCase { - public static function setUpBeforeClass() { - /** Do Nothing **/ - } - - public function setUp() { - /** Do Nothing **/ - } - - /** - * ----- Test OmiseException::getInstance() ----- - * This assert should throw an Exception depend on what error code be. - * And Exception message should be the same thing with error message that pass into 'message' parameter. - * - * @expectedException OmiseAuthenticationFailureException - * @expectedExceptionMessage authentication failed - */ - public function testAuthenticationFailureException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#authentication-failure', - 'code' => 'authentication_failure', - 'message' => 'authentication failed'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseNotFoundException - * @expectedExceptionMessage customer cust_test_000000000000 was not found - */ - public function testNotFoundException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#not-found', - 'code' => 'not_found', - 'message' => 'customer cust_test_000000000000 was not found'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseUsedTokenException - * @expectedExceptionMessage token was already used - */ - public function testUsedTokenException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#used-token', - 'code' => 'used_token', - 'message' => 'token was already used'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseInvalidCardException - * @expectedExceptionMessage number is invalid and brand not supported (unknown) - */ - public function testInvalidCardException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#invalid-card', - 'code' => 'invalid_card', - 'message' => 'number is invalid and brand not supported (unknown)'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseInvalidCardTokenException - * @expectedExceptionMessage invalid card token - */ - public function testInvalidCardTokenException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#invalid-card-token', - 'code' => 'invalid_card_token', - 'message' => 'invalid card token'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseMissingCardException - * @expectedExceptionMessage request contains no card parameters - */ - public function testMissingCardException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#missing-card', - 'code' => 'missing_card', - 'message' => 'request contains no card parameters'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseInvalidChargeException - * @expectedExceptionMessage currency is currently not supported and amount is not a number - */ - public function testInvalidChargeException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#invalid-charge', - 'code' => 'invalid_charge', - 'message' => 'currency is currently not supported and amount is not a number'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseFailedCaptureException - * @expectedExceptionMessage Charge is not authorized - */ - public function testFailedCaptureException () { - $mock = array('object' => 'error', - 'location' => 'https://docs.omise.co/api/errors#failed-capture', - 'code' => 'failed_capture', - 'message' => 'Charge is not authorized'); - - throw OmiseException::getInstance($mock); - } - - /** - * @expectedException OmiseUndefinedException - * @expectedExceptionMessage Strange case, don't know why? - */ - public function testUndefinedException () { - $mock = array('object' => 'error', - 'location' => '', - 'code' => 'something_strange', - 'message' => 'Strange case, don\'t know why?'); - - throw OmiseException::getInstance($mock); - } - - public function tearDown() { - /** Do Nothing **/ - } - - public static function tearDownAfterClass() { - /** Do Nothing **/ - } -} \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/omise/res/obj/OmiseObjectTest.php b/includes/libraries/omise-php/tests/omise/res/obj/OmiseObjectTest.php deleted file mode 100644 index f695ea02..00000000 --- a/includes/libraries/omise-php/tests/omise/res/obj/OmiseObjectTest.php +++ /dev/null @@ -1,134 +0,0 @@ -assertInstanceOf('OmiseTest', self::$obj); - $this->assertEmpty(self::$obj); - } - - /** - * Try to merge some array into Object. - * - */ - public function testMergeSomeValueToObject() { - self::$obj->refresh(array('user' => 'nam', - 'email' => 'nam@omise.co')); - - $this->assertArrayHasKey('user', self::$obj); - $this->assertEquals('nam', self::$obj['user']); - - $this->assertArrayHasKey('email', self::$obj); - $this->assertEquals('nam@omise.co', self::$obj['email']); - } - - /** - * Try to merge some array into object with the same key that object had, - * It should be overwrite the old value with the new value. - * - */ - public function testMergeSomeValueToObjectWithTheSameKey() { - self::$obj->refresh(array('user' => 'Omise', - 'email' => 'no-reply@omise.co')); - - $this->assertArrayHasKey('user', self::$obj); - $this->assertEquals('Omise', self::$obj['user']); - - $this->assertArrayHasKey('email', self::$obj); - $this->assertEquals('no-reply@omise.co', self::$obj['email']); - } - - /** - * Try to merge some array and set clear old data parameter to `true` in second param, - * It should be reset all of Object value to empty array before merge. - * - */ - public function testMergeSomeValueToObjectWithClearData() { - self::$obj->refresh(array('user' => 'Omise-Team'), true); - - $this->assertArrayHasKey('user', self::$obj); - $this->assertEquals('Omise-Team', self::$obj['user']); - - $this->assertArrayNotHasKey('email', self::$obj); - } - - /** - * Test add new offset via `offetSet` method. - * - */ - public function testSetNewValueWithOffsetSetMethod() { - self::$obj->offsetSet('phone', '012-345-6789'); - - $this->assertArrayHasKey('phone', self::$obj); - $this->assertEquals('012-345-6789', self::$obj['phone']); - } - - /** - * Test `offsetExists` method should return `true` if offset exists - * and `false` if it not. - * - */ - public function testMethodForCheckOffsetExists() { - $this->assertTrue(self::$obj->offsetExists('phone')); - $this->assertNotTrue(self::$obj->offsetExists('phone_dump')); - } - - /** - * Test unset offset. - * - */ - public function testUnsetOffset() { - self::$obj->offsetUnset('phone'); - - $this->assertNotTrue(self::$obj->offsetExists('phone')); - } - - /** - * Test get offset value with offset that exists and not exists. - * - */ - public function testGetOffset() { - $this->assertEquals('Omise-Team', self::$obj->offsetGet('user')); - $this->assertNull(self::$obj->offsetGet('phone')); - } - - /** - * Test iteration control. - * - */ - public function testLoopIterationControl() { - self::$obj->refresh(array('user' => 'nam', - 'address' => 'CDC')); - - // Count an array. - $this->assertEquals(2, self::$obj->count()); - - // Get current value. - $this->assertEquals('nam', self::$obj->current()); - - // Get current key. - $this->assertEquals('user', self::$obj->key()); - - // Move pointer to next place one. - self::$obj->next(); - $this->assertEquals('CDC', self::$obj->current()); - - self::$obj->next(); - $this->assertNotTrue(self::$obj->valid()); - - // Reset pointer to first place. - self::$obj->rewind(); - $this->assertTrue(self::$obj->valid()); - $this->assertEquals('nam', self::$obj->current()); - } -} \ No newline at end of file diff --git a/includes/libraries/omise-php/tests/omise/testall.sh b/includes/libraries/omise-php/tests/omise/testall.sh deleted file mode 100755 index 85f5f90e..00000000 --- a/includes/libraries/omise-php/tests/omise/testall.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -file=*Test.php -for testfile in ${file} -do -phpunit --colors $testfile -done From 289d769413833b55e9f24780f5d6d31e92b177e7 Mon Sep 17 00:00:00 2001 From: Saroj Saengphongumphai Date: Thu, 25 Aug 2016 16:05:59 +0700 Subject: [PATCH 4/5] Remove additional files that related with unit test --- includes/libraries/omise-php/circle.yml | 9 -------- includes/libraries/omise-php/composer.json | 23 --------------------- includes/libraries/omise-php/phpunit.xml | 24 ---------------------- 3 files changed, 56 deletions(-) delete mode 100644 includes/libraries/omise-php/circle.yml delete mode 100644 includes/libraries/omise-php/composer.json delete mode 100644 includes/libraries/omise-php/phpunit.xml diff --git a/includes/libraries/omise-php/circle.yml b/includes/libraries/omise-php/circle.yml deleted file mode 100644 index da98747d..00000000 --- a/includes/libraries/omise-php/circle.yml +++ /dev/null @@ -1,9 +0,0 @@ -machine: - timezone: - Asia/Bangkok - php: - version: 5.3.20 - -test: - override: - - php ./vendor/bin/phpunit tests \ No newline at end of file diff --git a/includes/libraries/omise-php/composer.json b/includes/libraries/omise-php/composer.json deleted file mode 100644 index cee1aaec..00000000 --- a/includes/libraries/omise-php/composer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "omise/omise-php", - "description": "Omise API PHP Lib", - "keywords": ["payment", "omise", "creditcard"], - "type": "library", - "license": "MIT", - "homepage": "https://github.com/omise/omise-php.git", - "authors": [ - { - "name": "omise", - "email": "apps@omise.co" - } - ], - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.4.*" - }, - "autoload": { - "classmap": ["lib/omise/"] - } -} diff --git a/includes/libraries/omise-php/phpunit.xml b/includes/libraries/omise-php/phpunit.xml deleted file mode 100644 index 9860e644..00000000 --- a/includes/libraries/omise-php/phpunit.xml +++ /dev/null @@ -1,24 +0,0 @@ - - \ No newline at end of file From 837ac851e2ab7507b0e4cb9725635c681970b6d2 Mon Sep 17 00:00:00 2001 From: Saroj Saengphongumphai Date: Fri, 26 Aug 2016 11:54:57 +0700 Subject: [PATCH 5/5] Release 1.2.2 --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- omise-woocommerce.php | 4 ++-- readme.txt | 10 +++++++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd121dc1..1abd1adf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [1.2.2] 2016-08-26 +- *`Improved`* Specify the display size of card brand image and allow customer to define their own style +- *`Removed`* Remove an unused unit test of the library, omise-php + ## [1.2.1] 2016-08-05 - *`Added`* Configuration for card brand logo display - *`Added`* List of transfers diff --git a/README.md b/README.md index d7670f56..e89e5a7b 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ Developer Documentation [here](https://www.omise.co/docs/) ## Installation Guide 1. Download the latest release packed as zip format from Releases page: https://github.com/omise/omise-woocommerce/releases -( latest: https://github.com/omise/omise-woocommerce/archive/v1.2.1.zip ) +( latest: https://github.com/omise/omise-woocommerce/archive/v1.2.2.zip ) 2. Install plugin in wordpress using Plugin Upload method, i.e. https://yourwebsite.com/wp-admin/plugin-install.php?tab=upload -and upload omise-woocommerce-1.2.1.zip +and upload omise-woocommerce-1.2.2.zip 3. Activate Omise plugin diff --git a/omise-woocommerce.php b/omise-woocommerce.php index 802f4d08..3c168d02 100644 --- a/omise-woocommerce.php +++ b/omise-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Omise Payment Gateway * Plugin URI: https://www.omise.co/woocommerce * Description: Omise WooCommerce Gateway Plugin is a wordpress plugin designed specifically for WooCommerce. The plugin adds support for Omise Payment Gateway payment method to WooCommerce. - * Version: 1.2.1 + * Version: 1.2.2 * Author: Omise * Author URI: https://www.omise.co * @@ -15,7 +15,7 @@ defined( 'OMISE_PROTOCOL_PREFIX' ) || define( "OMISE_PROTOCOL_PREFIX", "https://" ); defined( 'OMISE_VAULT_HOST' ) || define( "OMISE_VAULT_HOST", "vault.omise.co" ); defined( 'OMISE_API_HOST' ) || define( "OMISE_API_HOST", "api.omise.co" ); -defined( 'OMISE_WOOCOMMERCE_PLUGIN_VERSION' ) || define( "OMISE_WOOCOMMERCE_PLUGIN_VERSION", "1.2.1" ); +defined( 'OMISE_WOOCOMMERCE_PLUGIN_VERSION' ) || define( "OMISE_WOOCOMMERCE_PLUGIN_VERSION", "1.2.2" ); defined( 'OMISE_API_VERSION' ) || define( 'OMISE_API_VERSION', '2014-07-27' ); require_once dirname( __FILE__ ) . '/includes/libraries/omise-php/lib/Omise.php'; diff --git a/readme.txt b/readme.txt index 0274926d..dbbe4895 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Omise Tags: omise, payment, payment gateway, woocommerce plugin Requires at least: 4.3.1 Tested up to: 4.5.3 -Stable tag: 1.2.1 +Stable tag: 1.2.2 License: MIT License URI: https://opensource.org/licenses/MIT @@ -30,6 +30,10 @@ From there: 3. Omise Payment Gateway Checkout Form == Changelog == += 1.2.2 = +(Improved) Specify the display size of card brand image and allow customer to define their own style +(Removed) Remove an unused unit test of the library, omise-php + = 1.2.1 = (Added) Configuration for card brand logo display (Added) List of transfers @@ -54,6 +58,10 @@ Added Omise-Version into the cURL request header. Adds support for 3-D Secure feature == Upgrade Notice == += 1.2.2 = +(Improved) Specify the display size of card brand image and allow customer to define their own style +(Removed) Remove an unused unit test of the library, omise-php + = 1.2.1 = (Added) Configuration for card brand logo display (Added) List of transfers