Version Notes
Hi there, here is the latest release from us.
RELEASE NOTE
Enhancements
- Update Omise-PHP library to v2.7.1.
Bug Fixes
- Fix case-sensitive filename issue.
---
For more detail, please check our release note below.
https://github.com/omise/omise-magento/releases/tag/v1.11
Download this release
Release Info
Developer | Omise |
Extension | Omise_Gateway |
Version | 1.11.0 |
Comparing to | |
See all releases |
Code changes from version 1.10.0 to 1.11.0
- app/code/community/Omise/Gateway/Block/Form/{OffsiteInternetBankingPayment.php → Offsiteinternetbankingpayment.php} +1 -1
- app/code/community/Omise/Gateway/Model/{OffsiteInternetBankingPayment.php → Offsiteinternetbankingpayment.php} +1 -1
- app/code/community/Omise/Gateway/Model/Omise.php +1 -1
- app/code/community/Omise/Gateway/controllers/Callback/{ValidateOffsiteInternetBankingController.php → ValidateoffsiteinternetbankingController.php} +1 -1
- app/code/community/Omise/Gateway/controllers/Callback/{ValidateThreeDSecureController.php → ValidatethreedsecureController.php} +1 -1
- app/code/community/Omise/Gateway/etc/config.xml +2 -2
- lib/omise-php/CHANGELOG.md +27 -1
- lib/omise-php/README.md +70 -71
- lib/omise-php/lib/omise/OmiseCardList.php +1 -6
- lib/omise-php/lib/omise/OmiseCustomer.php +1 -3
- lib/omise-php/lib/omise/res/OmiseApiResource.php +13 -8
- package.xml +20 -6
app/code/community/Omise/Gateway/Block/Form/{OffsiteInternetBankingPayment.php → Offsiteinternetbankingpayment.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
1 |
<?php
|
2 |
+
class Omise_Gateway_Block_Form_Offsiteinternetbankingpayment extends Mage_Payment_Block_Form
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
app/code/community/Omise/Gateway/Model/{OffsiteInternetBankingPayment.php → Offsiteinternetbankingpayment.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
/**
|
5 |
* @var string
|
1 |
<?php
|
2 |
+
class Omise_Gateway_Model_Offsiteinternetbankingpayment extends Omise_Gateway_Model_Payment
|
3 |
{
|
4 |
/**
|
5 |
* @var string
|
app/code/community/Omise/Gateway/Model/Omise.php
CHANGED
@@ -105,7 +105,7 @@ class Omise_Gateway_Model_Omise extends Mage_Core_Model_Abstract
|
|
105 |
public function defineUserAgent()
|
106 |
{
|
107 |
if (! defined('OMISE_USER_AGENT_SUFFIX')) {
|
108 |
-
define('OMISE_USER_AGENT_SUFFIX', 'OmiseMagento/1.
|
109 |
}
|
110 |
}
|
111 |
|
105 |
public function defineUserAgent()
|
106 |
{
|
107 |
if (! defined('OMISE_USER_AGENT_SUFFIX')) {
|
108 |
+
define('OMISE_USER_AGENT_SUFFIX', 'OmiseMagento/1.11 Magento/' . Mage::getVersion());
|
109 |
}
|
110 |
}
|
111 |
|
app/code/community/Omise/Gateway/controllers/Callback/{ValidateOffsiteInternetBankingController.php → ValidateoffsiteinternetbankingController.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
1 |
<?php
|
2 |
+
class Omise_Gateway_Callback_ValidateoffsiteinternetbankingController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
app/code/community/Omise/Gateway/controllers/Callback/{ValidateThreeDSecureController.php → ValidatethreedsecureController.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
1 |
<?php
|
2 |
+
class Omise_Gateway_Callback_ValidatethreedsecureController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
app/code/community/Omise/Gateway/etc/config.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
-->
|
15 |
<modules>
|
16 |
<Omise_Gateway>
|
17 |
-
<version>1.
|
18 |
</Omise_Gateway>
|
19 |
</modules>
|
20 |
|
@@ -113,7 +113,7 @@
|
|
113 |
<omise_offsite_internet_banking>
|
114 |
<active>0</active>
|
115 |
<payment_action>authorize_capture</payment_action>
|
116 |
-
<model>omise_gateway/
|
117 |
<title>Internet Banking</title>
|
118 |
</omise_offsite_internet_banking>
|
119 |
</payment>
|
14 |
-->
|
15 |
<modules>
|
16 |
<Omise_Gateway>
|
17 |
+
<version>1.11.0</version>
|
18 |
</Omise_Gateway>
|
19 |
</modules>
|
20 |
|
113 |
<omise_offsite_internet_banking>
|
114 |
<active>0</active>
|
115 |
<payment_action>authorize_capture</payment_action>
|
116 |
+
<model>omise_gateway/Offsiteinternetbankingpayment</model>
|
117 |
<title>Internet Banking</title>
|
118 |
</omise_offsite_internet_banking>
|
119 |
</payment>
|
lib/omise-php/CHANGELOG.md
CHANGED
@@ -1,4 +1,30 @@
|
|
1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
## [2.6.0] 2016-12-15
|
4 |
- [added] OmiseLink api is now available. (@turboza)
|
1 |
+
# CHANGELOG
|
2 |
+
|
3 |
+
### [v2.7.1 _(March 22, 2017)_](https://github.com/omise/omise-php/releases/tag/v2.7.1)
|
4 |
+
|
5 |
+
#### 👾 Bug Fixes
|
6 |
+
|
7 |
+
- Update library's version number.
|
8 |
+
|
9 |
+
For more information, please visit https://github.com/omise/omise-php/releases/tag/v2.7.1
|
10 |
+
|
11 |
+
---
|
12 |
+
|
13 |
+
### [v2.7.0 _(March 21, 2017)_](https://github.com/omise/omise-php/releases/tag/v2.7.0)
|
14 |
+
|
15 |
+
#### 🚀 Enhancements
|
16 |
+
|
17 |
+
- Correct the Docblock at OmiseApiResource::isDestroy() method. (PR [#57](https://github.com/omise/omise-php/pull/57))
|
18 |
+
- Include PHP Version to the `USER-AGENT` header when make a request to Omise API. (PR [#56](https://github.com/omise/omise-php/pull/56))
|
19 |
+
|
20 |
+
#### 👾 Bug Fixes
|
21 |
+
|
22 |
+
- Remove questionmark from fixture filename. (PR [#55](https://github.com/omise/omise-php/pull/55))
|
23 |
+
- Remove unreasonable conditional block from OmiseCustomer lib. (PR [#51](https://github.com/omise/omise-php/pull/51))
|
24 |
+
|
25 |
+
For more information, please visit https://github.com/omise/omise-php/releases/tag/v2.7.0
|
26 |
+
|
27 |
+
---
|
28 |
|
29 |
## [2.6.0] 2016-12-15
|
30 |
- [added] OmiseLink api is now available. (@turboza)
|
lib/omise-php/README.md
CHANGED
@@ -18,127 +18,126 @@ You can install the library via [Composer](https://getcomposer.org/). If you don
|
|
18 |
* [Composer installation instruction for Windows](https://getcomposer.org/doc/00-intro.md#installation-windows)
|
19 |
* [Composer installation instruction for Mac OS X and Linux](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)
|
20 |
|
21 |
-
After composer is installed, you can declare Omise-PHP as project dependency by creating a `composer.json` with the following content:
|
22 |
-
|
23 |
-
|
24 |
-
{
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
```
|
30 |
-
|
31 |
-
Then run the following command to install the Omise-PHP library:
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
36 |
|
37 |
-
|
|
|
38 |
|
39 |
-
```php
|
40 |
-
require_once dirname(__FILE__).'/vendor/autoload.php';
|
41 |
-
```
|
42 |
|
43 |
-
|
44 |
|
45 |
### Manually
|
46 |
|
47 |
-
If you're not using Composer, you can also
|
|
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
|
|
54 |
|
55 |
```php
|
56 |
-
|
|
|
57 |
```
|
58 |
|
59 |
-
|
|
|
|
|
60 |
|
61 |
### API version
|
62 |
|
|
|
|
|
|
|
|
|
|
|
63 |
You can choose which API version to use with Omise. Each API version has new features and might not be compatible with previous versions. You can change the default version by visiting your Omise Dashboard.
|
64 |
|
65 |
-
To overwrite the API version to use, you can specify it by defining OMISE_API_VERSION
|
66 |
-
The version configured here will have higher priority than the version set in your Omise account.
|
67 |
This is useful if you have multiple environments with different API versions for testing.
|
68 |
(e.g. Development on the latest version but production is on an older version).
|
69 |
|
70 |
```php
|
71 |
-
require_once dirname(__FILE__).'/omise-php/lib/Omise.php';
|
72 |
-
|
73 |
define('OMISE_API_VERSION', '2014-07-27');
|
74 |
```
|
75 |
|
76 |
-
|
77 |
-
you're using.
|
78 |
-
|
79 |
-
## Usage
|
80 |
-
|
81 |
-
### 1. Flow
|
82 |
-
|
83 |
-
The following flow is recommended in order to comply with the PCI Security Standards.
|
84 |
-
You should never transmit card data through your servers unless you have a valid PCI certificate.
|
85 |
-
|
86 |
-
### Flow using Omise.js
|
87 |
-
1. User enters the credit card information on a form on your site, completely white-label (user never sees Omise).
|
88 |
-
2. The card is sent directly from the browser to Omise server via HTTPS using our Javascript (Omise.js).
|
89 |
-
3. Omise returns a Token that identifies the card and if the card passed the authorization `card.security_code_check`
|
90 |
-
4. Your page will send this token to your server to finally make the charge capture.
|
91 |
|
92 |
-
|
93 |
-
In step 3, if `card.security_code_check` is `false`, the card failed the authorization process, probably because of a wrong CVV, wrong expire date or wrong card number. In this case you should display an error message and ask user to enter card again.
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
100 |
|
101 |
```php
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
```
|
105 |
|
106 |
-
|
107 |
|
108 |
```php
|
109 |
-
$
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
));
|
114 |
```
|
115 |
|
116 |
-
To
|
|
|
117 |
|
118 |
-
|
119 |
-
$customer = OmiseCustomer::retrieve('cust_test_4xtrb759599jsxlhkrb');
|
120 |
-
$customer->update(array('description' => 'John W. Doe'));
|
121 |
-
$customer->destroy();
|
122 |
-
$customer->isDestroyed(); // => true
|
123 |
-
```
|
124 |
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
To run an automated test suite, make sure you already have a [PHPUnit](https://phpunit.de/) in your local machine.
|
130 |
Then run the PHPUnit:
|
131 |
|
132 |
-
```
|
133 |
phpunit omise-php/tests
|
134 |
```
|
135 |
|
136 |
If you want to run with a specific test, let's try
|
137 |
|
138 |
-
```
|
139 |
phpunit omise-php/tests/omise/AccountTest
|
140 |
```
|
141 |
|
142 |
## License
|
143 |
|
144 |
-
|
18 |
* [Composer installation instruction for Windows](https://getcomposer.org/doc/00-intro.md#installation-windows)
|
19 |
* [Composer installation instruction for Mac OS X and Linux](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)
|
20 |
|
21 |
+
1. After composer is installed, you can declare Omise-PHP as a project dependency by creating a `composer.json` at the root of your project directory with the following content:
|
22 |
+
```json
|
23 |
+
{
|
24 |
+
"require": {
|
25 |
+
"omise/omise-php": "dev-master"
|
26 |
+
}
|
27 |
+
}
|
28 |
+
```
|
|
|
|
|
|
|
29 |
|
30 |
+
2. Then run the following command to install the Omise-PHP library:
|
31 |
+
```
|
32 |
+
php composer.phar install
|
33 |
+
```
|
34 |
|
35 |
+
3. Once you run the `composer install` command, the Composer will generate a `vendor` folder at the same directory as `composer.json`.
|
36 |
+
Now you can then add the following line to PHP script to load the library:
|
37 |
|
38 |
+
```php
|
39 |
+
require_once dirname(__FILE__).'/vendor/autoload.php';
|
40 |
+
```
|
41 |
|
42 |
+
4. Now you are ready to start using the library, please see the [configuration](https://github.com/omise/omise-php#configuration) and [quick start](https://github.com/omise/omise-php#quick-start) sections below for usage examples.
|
43 |
|
44 |
### Manually
|
45 |
|
46 |
+
If you're not using Composer, you can also download [the latest version of Omise-PHP](https://github.com/omise/omise-php/archive/v2.7.1.zip).
|
47 |
+
Then, follows the instruction below to install **Omise-PHP** to the project.
|
48 |
|
49 |
+
1. Extract the library to your project.
|
50 |
+
|
51 |
+
2. Then, include the following line into your PHP file,
|
52 |
+
```php
|
53 |
+
require_once 'path-to-library/omise-php/lib/Omise.php';
|
54 |
+
```
|
55 |
+
|
56 |
+
3. Now you are ready to start using the library, please see the [configuration](https://github.com/omise/omise-php#configuration) and [quick start](https://github.com/omise/omise-php#quick-start) sections below for usage examples.
|
57 |
+
|
58 |
+
_However, using Composer is recommended as you can easily keep the library up-to-date._
|
59 |
+
|
60 |
+
## Configuration
|
61 |
+
|
62 |
+
### Config your public and secret keys
|
63 |
|
64 |
+
In order to make any request to Omise API through Omise-PHP library, you will need to config your public and secret key to the project.
|
65 |
+
Type the following code in any place before executing the library.
|
66 |
|
67 |
```php
|
68 |
+
define('OMISE_PUBLIC_KEY', 'pkey_can_find_at_omise_dashboard');
|
69 |
+
define('OMISE_SECRET_KEY', 'skey_can_find_at_omise_dashboard');
|
70 |
```
|
71 |
|
72 |
+
Note, you can get your public and secret keys at Omise Dashboard.
|
73 |
+
|
74 |
+
_As for reference, you can check our document at [https://www.omise.co/api-authentication](https://www.omise.co/api-authentication)._
|
75 |
|
76 |
### API version
|
77 |
|
78 |
+
> This parameter most uses specially for backward-compatible reason, it's not necessary to config when using the library.
|
79 |
+
>
|
80 |
+
> **It is highly recommended to set this version to the current version you're using.**
|
81 |
+
> **(or you can just skip this section, Omise will then use your current API version as an default in any requests).**
|
82 |
+
|
83 |
You can choose which API version to use with Omise. Each API version has new features and might not be compatible with previous versions. You can change the default version by visiting your Omise Dashboard.
|
84 |
|
85 |
+
To overwrite the API version to use, you can specify it by defining `OMISE_API_VERSION`.
|
86 |
+
The version configured here will have **higher priority** than the version set in your Omise account.
|
87 |
This is useful if you have multiple environments with different API versions for testing.
|
88 |
(e.g. Development on the latest version but production is on an older version).
|
89 |
|
90 |
```php
|
|
|
|
|
91 |
define('OMISE_API_VERSION', '2014-07-27');
|
92 |
```
|
93 |
|
94 |
+
You can check your current API version at Omise Dashboard.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
+
![screen shot 2560-03-21 at 4 46 07 pm](https://cloud.githubusercontent.com/assets/2154669/24141410/ef0faf46-0e55-11e7-8e25-26e2a6fc403b.png)
|
|
|
97 |
|
98 |
+
## Quick Start
|
99 |
|
100 |
+
The following code demonstrates how to make a charge with Omise-PHP library.
|
101 |
|
102 |
+
Now from the above sections, your code will looks similar like the below.
|
103 |
|
104 |
```php
|
105 |
+
require_once dirname(__FILE__).'/vendor/autoload.php';
|
106 |
+
|
107 |
+
define('OMISE_PUBLIC_KEY', 'pkey_test_54ot96fkr3i2op60cng');
|
108 |
+
define('OMISE_SECRET_KEY', 'skey_test_54ot96fkr3i2op60cng');
|
109 |
```
|
110 |
|
111 |
+
Now, let's add the below code to create a charge through the library.
|
112 |
|
113 |
```php
|
114 |
+
$charge = OmiseCharge::create(array(
|
115 |
+
'amount' => 100000,
|
116 |
+
'currency' => 'THB',
|
117 |
+
'card' => 'tokn_test_4xs9408a642a1htto8z'
|
118 |
));
|
119 |
```
|
120 |
|
121 |
+
To see a real implementation code, you can check from the link below.
|
122 |
+
[https://github.com/omise/examples/tree/master/php](https://github.com/omise/examples/tree/master/php)
|
123 |
|
124 |
+
After this, you can check the complete documentation at [https://www.omise.co/docs](https://www.omise.co/docs).
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
+
## Development and Testing
|
127 |
|
128 |
+
To run an automated test suite, make sure you already have a [PHPUnit](https://phpunit.de) in your local machine.
|
|
|
|
|
129 |
Then run the PHPUnit:
|
130 |
|
131 |
+
```shell
|
132 |
phpunit omise-php/tests
|
133 |
```
|
134 |
|
135 |
If you want to run with a specific test, let's try
|
136 |
|
137 |
+
```bash
|
138 |
phpunit omise-php/tests/omise/AccountTest
|
139 |
```
|
140 |
|
141 |
## License
|
142 |
|
143 |
+
Omise-PHP is open-sourced software released under the [MIT License](https://opensource.org/licenses/MIT).
|
lib/omise-php/lib/omise/OmiseCardList.php
CHANGED
@@ -17,15 +17,10 @@ class OmiseCardList extends OmiseApiResource
|
|
17 |
*/
|
18 |
public function __construct($cards, $customerID, $options = array(), $publickey = null, $secretkey = null)
|
19 |
{
|
20 |
-
if (! is_array($options) && func_num_args() == 4) {
|
21 |
-
$publickey = func_get_arg(2);
|
22 |
-
$secretkey = func_get_arg(3);
|
23 |
-
}
|
24 |
-
|
25 |
parent::__construct($publickey, $secretkey);
|
26 |
$this->_customerID = $customerID;
|
27 |
|
28 |
-
if (is_array($options)) {
|
29 |
parent::g_reload($this->getUrl('?'.http_build_query($options)));
|
30 |
} else {
|
31 |
$this->refresh($cards);
|
17 |
*/
|
18 |
public function __construct($cards, $customerID, $options = array(), $publickey = null, $secretkey = null)
|
19 |
{
|
|
|
|
|
|
|
|
|
|
|
20 |
parent::__construct($publickey, $secretkey);
|
21 |
$this->_customerID = $customerID;
|
22 |
|
23 |
+
if (is_array($options) && ! empty($options)) {
|
24 |
parent::g_reload($this->getUrl('?'.http_build_query($options)));
|
25 |
} else {
|
26 |
$this->refresh($cards);
|
lib/omise-php/lib/omise/OmiseCustomer.php
CHANGED
@@ -88,10 +88,8 @@ class OmiseCustomer extends OmiseApiResource
|
|
88 |
*/
|
89 |
public function cards($options = array())
|
90 |
{
|
91 |
-
if ($this['object'] === 'customer'
|
92 |
return new OmiseCardList($this['cards'], $this['id'], $options, $this->_publickey, $this->_secretkey);
|
93 |
-
} else if ($this['object'] === 'customer') {
|
94 |
-
return new OmiseCardList($this['cards'], $this['id'], $this->_publickey, $this->_secretkey);
|
95 |
}
|
96 |
}
|
97 |
|
88 |
*/
|
89 |
public function cards($options = array())
|
90 |
{
|
91 |
+
if ($this['object'] === 'customer') {
|
92 |
return new OmiseCardList($this['cards'], $this['id'], $options, $this->_publickey, $this->_secretkey);
|
|
|
|
|
93 |
}
|
94 |
}
|
95 |
|
lib/omise-php/lib/omise/res/OmiseApiResource.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
require_once dirname(__FILE__).'/obj/OmiseObject.php';
|
4 |
require_once dirname(__FILE__).'/../exception/OmiseExceptions.php';
|
5 |
|
6 |
-
define('OMISE_PHP_LIB_VERSION', '2.
|
7 |
define('OMISE_API_URL', 'https://api.omise.co/');
|
8 |
define('OMISE_VAULT_URL', 'https://vault.omise.co/');
|
9 |
|
@@ -199,11 +199,16 @@ class OmiseApiResource extends OmiseObject
|
|
199 |
*/
|
200 |
private function _executeTest($url, $requestMethod, $key, $params = null)
|
201 |
{
|
202 |
-
//
|
203 |
-
$
|
204 |
-
|
205 |
-
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
// Finally.
|
209 |
$request_url = dirname(__FILE__).'/../../../tests/fixtures/'.$request_url.'-'.strtolower($requestMethod).'.json';
|
@@ -245,7 +250,7 @@ class OmiseApiResource extends OmiseObject
|
|
245 |
*/
|
246 |
private function genOptions($requestMethod, $userpwd, $params)
|
247 |
{
|
248 |
-
$user_agent = "OmisePHP/".OMISE_PHP_LIB_VERSION;
|
249 |
$omise_api_version = defined('OMISE_API_VERSION') ? OMISE_API_VERSION : null;
|
250 |
|
251 |
$options = array(
|
@@ -297,7 +302,7 @@ class OmiseApiResource extends OmiseObject
|
|
297 |
/**
|
298 |
* Checks whether the resource has been destroyed.
|
299 |
*
|
300 |
-
* @return
|
301 |
*/
|
302 |
protected function isDestroyed()
|
303 |
{
|
3 |
require_once dirname(__FILE__).'/obj/OmiseObject.php';
|
4 |
require_once dirname(__FILE__).'/../exception/OmiseExceptions.php';
|
5 |
|
6 |
+
define('OMISE_PHP_LIB_VERSION', '2.7.1');
|
7 |
define('OMISE_API_URL', 'https://api.omise.co/');
|
8 |
define('OMISE_VAULT_URL', 'https://vault.omise.co/');
|
9 |
|
199 |
*/
|
200 |
private function _executeTest($url, $requestMethod, $key, $params = null)
|
201 |
{
|
202 |
+
// Extract only hostname and URL path without trailing slash.
|
203 |
+
$parsed = parse_url($url);
|
204 |
+
$request_url = $parsed['host'] . rtrim($parsed['path'], '/');
|
205 |
+
|
206 |
+
// Convert query string into filename friendly format.
|
207 |
+
if (!empty($parsed['query'])) {
|
208 |
+
$query = base64_encode($parsed['query']);
|
209 |
+
$query = str_replace(array('+', '/', '='), array('-', '_', ''), $query);
|
210 |
+
$request_url = $request_url.'-'.$query;
|
211 |
+
}
|
212 |
|
213 |
// Finally.
|
214 |
$request_url = dirname(__FILE__).'/../../../tests/fixtures/'.$request_url.'-'.strtolower($requestMethod).'.json';
|
250 |
*/
|
251 |
private function genOptions($requestMethod, $userpwd, $params)
|
252 |
{
|
253 |
+
$user_agent = "OmisePHP/".OMISE_PHP_LIB_VERSION." PHP/".phpversion();
|
254 |
$omise_api_version = defined('OMISE_API_VERSION') ? OMISE_API_VERSION : null;
|
255 |
|
256 |
$options = array(
|
302 |
/**
|
303 |
* Checks whether the resource has been destroyed.
|
304 |
*
|
305 |
+
* @return bool|null
|
306 |
*/
|
307 |
protected function isDestroyed()
|
308 |
{
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Omise_Gateway</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
|
7 |
<channel>community</channel>
|
@@ -40,13 +40,27 @@ There's also advance search which helps narrow down your search to specific date
|
|
40 |
<h3>User Guides</h3>
|
41 |
Please check the following link to see "Installation Instruction" & "User Guides".<br />
|
42 |
<a href="http://omise.co/magento-plugin">http://omise.co/magento-plugin</a></description>
|
43 |
-
<notes
|
44 |

|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<authors><author><name>Omise</name><user>omise</user><email>apps@omise.co</email></author></authors>
|
47 |
-
<date>2017-03
|
48 |
-
<time>
|
49 |
-
<contents><target name="magecommunity"><dir name="Omise"><dir name="Gateway"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Edit"><file name="Form.php" hash="35295e47578bfd3b034bfe6c36c8a4cc"/></dir><file name="Edit.php" hash="84fdd93ef432aba685bcac6cdb9bbe49"/></dir><dir name="Dashboard"><file name="Dashboard.php" hash="993c3d2c63d3b2a6c64940a09042155b"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="c5c162c6c4d58bd8b479445097ae2299"/></dir></dir></dir></dir><dir name="Form"><file name="Cc.php" hash="9ece8b02993c3e9a84a5cfafe0150438"/><file name="
|
50 |
<compatible/>
|
51 |
<dependencies><required><php><min>5.4.0</min><max>7.1.2</max></php></required></dependencies>
|
52 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Omise_Gateway</name>
|
4 |
+
<version>1.11.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
|
7 |
<channel>community</channel>
|
40 |
<h3>User Guides</h3>
|
41 |
Please check the following link to see "Installation Instruction" & "User Guides".<br />
|
42 |
<a href="http://omise.co/magento-plugin">http://omise.co/magento-plugin</a></description>
|
43 |
+
<notes>Hi there, here is the latest release from us.
|
44 |

|
45 |
+
<h1>RELEASE NOTE</h1>
|
46 |
+

|
47 |
+
<strong>Enhancements</strong>
|
48 |
+

|
49 |
+
- Update Omise-PHP library to v2.7.1.
|
50 |
+

|
51 |
+
<strong>Bug Fixes</strong>
|
52 |
+

|
53 |
+
- Fix case-sensitive filename issue.
|
54 |
+

|
55 |
+
---
|
56 |
+

|
57 |
+
For more detail, please check our release note below.
|
58 |
+
<a href="https://github.com/omise/omise-magento/releases/tag/v1.11">https://github.com/omise/omise-magento/releases/tag/v1.11</a>
|
59 |
+
</notes>
|
60 |
<authors><author><name>Omise</name><user>omise</user><email>apps@omise.co</email></author></authors>
|
61 |
+
<date>2017-04-03</date>
|
62 |
+
<time>13:33:43</time>
|
63 |
+
<contents><target name="magecommunity"><dir name="Omise"><dir name="Gateway"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Edit"><file name="Form.php" hash="35295e47578bfd3b034bfe6c36c8a4cc"/></dir><file name="Edit.php" hash="84fdd93ef432aba685bcac6cdb9bbe49"/></dir><dir name="Dashboard"><file name="Dashboard.php" hash="993c3d2c63d3b2a6c64940a09042155b"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="c5c162c6c4d58bd8b479445097ae2299"/></dir></dir></dir></dir><dir name="Form"><file name="Cc.php" hash="9ece8b02993c3e9a84a5cfafe0150438"/><file name="Offsiteinternetbankingpayment.php" hash="8dd6eac77eafcf3d3d77a0a3b6764824"/></dir></dir><dir name="Helper"><file name="Data.php" hash="5c586a7cd4c9ac106cceda2fbd758145"/></dir><dir name="Model"><dir name="Config"><dir name="Var"><file name="Cctype.php" hash="ac2790871eaf969ce9e705c7e499188d"/><file name="Paymentaction.php" hash="2606f24f33aaae56b780e67011711b99"/></dir></dir><file name="Config.php" hash="328cae40a1233e412d3386be9bcf3ce2"/><file name="Offsiteinternetbankingpayment.php" hash="1153232c830e26681766b8b262cd5416"/><file name="Omise.php" hash="44589b5e3a51e1681f87df27f5dcf092"/><file name="OmiseAccount.php" hash="f716dcd2ece38c0381a61c1ff5f1151b"/><file name="OmiseBalance.php" hash="c2ab02f0a72423d4c5bec5df62459477"/><file name="OmiseCharge.php" hash="1fa0ff4a69881f9b67f353af017b76d4"/><file name="OmiseTransfer.php" hash="5d1f80b32ee835629977c483cee53330"/><file name="Payment.php" hash="68d2c07bebe659a841a010d9ead2f411"/><file name="PaymentMethod.php" hash="580295e13553d8eac13d0ee45fb02665"/><dir name="Resource"><file name="Config.php" hash="940c4e25613da01ce6c419c9a69f9577"/></dir><dir name="Strategies"><file name="AuthorizeStrategy.php" hash="fa143b7e10a88846263e8c4098618593"/><file name="AuthorizeThreeDSecureStrategy.php" hash="8c588b44729843b1dc8d3653a189a232"/><file name="CaptureStrategy.php" hash="d7dc0a76f52de532231273070888ac06"/><file name="CaptureThreeDSecureStrategy.php" hash="6abb4dc786965b09a8f460861311cd22"/><file name="ManualCaptureStrategy.php" hash="070b050bd18474d2164b5c36bfd5f81b"/><file name="OffsiteInternetBankingStrategy.php" hash="81dec322da649bad78f64b53d0bd9232"/><file name="StrategyAbstract.php" hash="1fa0a02d32d013da0f19ee286f78b423"/><file name="StrategyInterface.php" hash="b6efc25d7cfe232cd5b597ed6dfdd4cf"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OmiseController.php" hash="12e10c8f1b72437b5bea2a24df9ecab5"/></dir><dir name="Callback"><file name="ValidateoffsiteinternetbankingController.php" hash="56ed06847cd0405f167e7ab4ebfab937"/><file name="ValidatethreedsecureController.php" hash="0380871a1b590c0465d04b7df85d458a"/></dir></dir><dir name="data"><dir name="omise_gateway_setup"><file name="data-install-0.0.0.1.php" hash="ace699435b757bc10c2f19a5e9555dab"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6904e384ede6b5e4ba3203d748e9d802"/><file name="config.xml" hash="e78b64894a8d429cd99ad06d75426fd0"/><file name="system.xml" hash="cf6d397505b3aafa199c868f9b6f16a8"/></dir><dir name="sql"><dir name="omise_gateway_setup"><file name="install-0.0.0.1.php" hash="93f7f4a16be87ef83a84215c72e667a1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Omise_Gateway.xml" hash="6d354708ee537b9bd833e0916135e6bf"/></dir></target><target name="magelib"><dir name="omise-php"><file name="CHANGELOG.md" hash="c0fc5c2ca02a3f16ff2c6c286da3ae7e"/><file name="LICENSE" hash="4b764c86995cbfed1e733d4e1b28edc1"/><file name="README.md" hash="403943c009df14557a173c0d2d741567"/><dir name="data"><file name="ca_certificates.pem" hash="e2c6e1ebee2ffc481d3be02aaf12c46c"/></dir><dir name="lib"><file name="Omise.php" hash="0dd224bf0853d3c99a3cbcd4ceabdcce"/><dir name="omise"><file name="OmiseAccount.php" hash="a6f6065fa76ef7558bc9133ad42202b2"/><file name="OmiseBalance.php" hash="fe3c179b7b07aebe49216ce91fe5f941"/><file name="OmiseCard.php" hash="852846c4427d826011bb609d420134ca"/><file name="OmiseCardList.php" hash="62ea0afd7a3a8b594d8c26f9019bd75b"/><file name="OmiseCharge.php" hash="7e71211c81553de18bd9052fc73b680b"/><file name="OmiseCustomer.php" hash="bd6ce3ba417568dcc5d59ad30dbd4630"/><file name="OmiseDispute.php" hash="5828d42b8ea897d1e38a499979d6d68d"/><file name="OmiseEvent.php" hash="5a9ca900edb659178c4daf336b258c09"/><file name="OmiseLink.php" hash="6a0e55db8c00632eff2f3cefeb5b937b"/><file name="OmiseRecipient.php" hash="8563eb9f56716f19ef8bd86c0c0669a2"/><file name="OmiseRefund.php" hash="2188a91cdc0b8fe65b1eff49bf787935"/><file name="OmiseRefundList.php" hash="47a8b2ac14867921b394f31fe283bf11"/><file name="OmiseTest.php" hash="2c3f9a6aa6e8d074e2c3b62fdef9193b"/><file name="OmiseToken.php" hash="3d47a1fb374a783aa23d913f33a35554"/><file name="OmiseTransaction.php" hash="5913fa5e050ec79b36c95a70eb878579"/><file name="OmiseTransfer.php" hash="370d34418761adb3664b66105a2e78b0"/><dir name="exception"><file name="OmiseExceptions.php" hash="cdfb3256ceda24c0aabe0e4dedfbe3ee"/></dir><dir name="res"><file name="OmiseApiResource.php" hash="4fdeca43703ea6cb8424af75dc575f74"/><file name="OmiseVaultResource.php" hash="989cde47ba91688e1c48e9826e7b559f"/><dir name="obj"><file name="OmiseObject.php" hash="bc1cc21f51d557f8c2640696699e3556"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="omise"><file name="dashboard.phtml" hash="857dcf59e34e484b1e0db3cb49beef7b"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="payment"><dir name="form"><file name="omisecc.phtml" hash="e65ce4f060e83204e37760e4ca813d57"/><file name="omiseoffsiteinternetbankingpayment.phtml" hash="850380c1b5a0e6647abde75aa1613727"/><file name="omise-inapplicable-method.phtml" hash="f829e89be8470f340300c6d0227ddec2"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="omise"><file name="omise-admin.css" hash="6a293ba8afa28789c349baa5e2fe1e18"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="omise"><dir name="css"><file name="offsiteinternetbankingpayment.css" hash="2f9407e493c2a769d960e03c2f63ea16"/></dir><dir name="images"><file name="bay.svg" hash="78f135040300d87f34f070141712ea39"/><file name="bbl.svg" hash="23ef91aab184f73cb0fd340d33ec78ba"/><file name="ktb.svg" hash="bccf1cdf5d4383f6403afe26111d47b6"/><file name="scb.svg" hash="341040cf1820811793b30928623cc43f"/></dir></dir></dir></dir></dir></target></contents>
|
64 |
<compatible/>
|
65 |
<dependencies><required><php><min>5.4.0</min><max>7.1.2</max></php></required></dependencies>
|
66 |
</package>
|