Version Notes
* Fixing Providers
Download this release
Release Info
Developer | Eduardo Aguilar |
Extension | Compropago_Payment_Extension |
Version | 2.1.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2.2
- app/code/community/Compropago/CpPayment/Model/Providers.php +19 -14
- app/code/community/Compropago/CpPayment/Model/Standard.php +1 -1
- app/code/community/Compropago/CpPayment/controllers/IndexController.php +5 -0
- app/code/community/Compropago/CpPayment/etc/config.xml +1 -1
- app/design/frontend/base/default/template/compropago/cppayment/cash.phtml +38 -30
- lib/Compropago/composer.lock +7 -7
- lib/Compropago/vendor/autoload.php +1 -1
- lib/Compropago/vendor/composer/autoload_classmap.php +1 -0
- lib/Compropago/vendor/composer/autoload_real.php +4 -4
- lib/Compropago/vendor/composer/autoload_static.php +5 -4
- lib/Compropago/vendor/composer/installed.json +8 -8
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Client.php +2 -10
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Extern/TransactTables.php +3 -19
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Factory.php +1 -16
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php +1 -0
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/Exchange.php +15 -0
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/NewOrderInfo.php +1 -0
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/OrderInfo.php +7 -5
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/PlaceOrderInfo.php +3 -0
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/Provider.php +1 -0
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Serialize.php +26 -5
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Service.php +40 -60
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/UnitTest/Test.php +109 -183
- lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/UnitTest/autoload.php +1 -0
- lib/Compropago/vendor/compropago/php-sdk/README.md +32 -25
- lib/Compropago/vendor/compropago/php-sdk/composer.json +2 -2
- package.xml +9 -10
app/code/community/Compropago/CpPayment/Model/Providers.php
CHANGED
@@ -25,20 +25,25 @@ use CompropagoSdk\Client;
|
|
25 |
|
26 |
class Compropago_CpPayment_Model_Providers
|
27 |
{
|
28 |
-
|
29 |
public function toOptionArray()
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
-
|
41 |
-
return $options;
|
42 |
-
}
|
43 |
-
|
44 |
}
|
25 |
|
26 |
class Compropago_CpPayment_Model_Providers
|
27 |
{
|
|
|
28 |
public function toOptionArray()
|
29 |
+
{
|
30 |
+
$options = array();
|
31 |
+
$client = new Client('', '', false);
|
32 |
+
$flag = false;
|
33 |
+
foreach ($client->api->listDefaultProviders() as $provider){
|
34 |
+
$options[] = array(
|
35 |
+
'value' => $provider->internal_name,
|
36 |
+
'label' => $provider->name
|
37 |
+
);
|
38 |
+
if ($provider->internal_name == "OXXO") { $flag = true; }
|
39 |
+
}
|
40 |
+
if (!$flag) {
|
41 |
+
$OXXO[] = [
|
42 |
+
'value' => "OXXO",
|
43 |
+
'label' => "Oxxo"
|
44 |
+
];
|
45 |
+
$options = array_merge($OXXO,$options);
|
46 |
+
}
|
47 |
+
return $options;
|
48 |
}
|
|
|
|
|
|
|
|
|
49 |
}
|
app/code/community/Compropago/CpPayment/Model/Standard.php
CHANGED
@@ -264,7 +264,7 @@ class Compropago_CpPayment_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
264 |
$quoteData = $quote->getData();
|
265 |
$grandTotal = $quoteData['grand_total'];
|
266 |
|
267 |
-
$providers = $client->api->listProviders(
|
268 |
$filter = explode(',', $this->getConfigData('compropago_provider_available'));
|
269 |
|
270 |
$record = array();
|
264 |
$quoteData = $quote->getData();
|
265 |
$grandTotal = $quoteData['grand_total'];
|
266 |
|
267 |
+
$providers = $client->api->listProviders($grandTotal, Mage::app()->getStore()->getCurrentCurrencyCode());
|
268 |
$filter = explode(',', $this->getConfigData('compropago_provider_available'));
|
269 |
|
270 |
$record = array();
|
app/code/community/Compropago/CpPayment/controllers/IndexController.php
CHANGED
@@ -136,6 +136,7 @@ class Compropago_CpPayment_IndexController extends Mage_Core_Controller_Front_Ac
|
|
136 |
//$history->setIsCustomerNotified(true);
|
137 |
$_order->save();
|
138 |
$nomestatus = 'COMPROPAGO_PENDING';
|
|
|
139 |
break;
|
140 |
case 'charge.success':
|
141 |
$status = $this->_model->getConfigData('compropago_order_status_approved');
|
@@ -146,6 +147,7 @@ class Compropago_CpPayment_IndexController extends Mage_Core_Controller_Front_Ac
|
|
146 |
$history->setIsCustomerNotified(true);
|
147 |
$_order->save();
|
148 |
$nomestatus = 'COMPROPAGO_SUCCESS';
|
|
|
149 |
break;
|
150 |
case 'charge.declined':
|
151 |
$status = $this->_model->getConfigData('compropago_order_status_in_process');
|
@@ -156,6 +158,7 @@ class Compropago_CpPayment_IndexController extends Mage_Core_Controller_Front_Ac
|
|
156 |
$history->setIsCustomerNotified(false);
|
157 |
$_order->save();
|
158 |
$nomestatus = 'COMPROPAGO_DECLINED';
|
|
|
159 |
break;
|
160 |
case 'charge.deleted':
|
161 |
$status = $this->_model->getConfigData('compropago_order_status_cancelled');
|
@@ -166,6 +169,7 @@ class Compropago_CpPayment_IndexController extends Mage_Core_Controller_Front_Ac
|
|
166 |
$history->setIsCustomerNotified(false);
|
167 |
$_order->save();
|
168 |
$nomestatus = 'COMPROPAGO_DELETED';
|
|
|
169 |
break;
|
170 |
case 'charge.expired':
|
171 |
$status = $this->_model->getConfigData('compropago_order_status_cancelled');
|
@@ -176,6 +180,7 @@ class Compropago_CpPayment_IndexController extends Mage_Core_Controller_Front_Ac
|
|
176 |
$history->setIsCustomerNotified(false);
|
177 |
$_order->save();
|
178 |
$nomestatus = 'COMPROPAGO_EXPIRED';
|
|
|
179 |
break;
|
180 |
default:
|
181 |
$_order->save();
|
136 |
//$history->setIsCustomerNotified(true);
|
137 |
$_order->save();
|
138 |
$nomestatus = 'COMPROPAGO_PENDING';
|
139 |
+
var_dump($nomestatus);
|
140 |
break;
|
141 |
case 'charge.success':
|
142 |
$status = $this->_model->getConfigData('compropago_order_status_approved');
|
147 |
$history->setIsCustomerNotified(true);
|
148 |
$_order->save();
|
149 |
$nomestatus = 'COMPROPAGO_SUCCESS';
|
150 |
+
var_dump($nomestatus);
|
151 |
break;
|
152 |
case 'charge.declined':
|
153 |
$status = $this->_model->getConfigData('compropago_order_status_in_process');
|
158 |
$history->setIsCustomerNotified(false);
|
159 |
$_order->save();
|
160 |
$nomestatus = 'COMPROPAGO_DECLINED';
|
161 |
+
var_dump($nomestatus);
|
162 |
break;
|
163 |
case 'charge.deleted':
|
164 |
$status = $this->_model->getConfigData('compropago_order_status_cancelled');
|
169 |
$history->setIsCustomerNotified(false);
|
170 |
$_order->save();
|
171 |
$nomestatus = 'COMPROPAGO_DELETED';
|
172 |
+
var_dump($nomestatus);
|
173 |
break;
|
174 |
case 'charge.expired':
|
175 |
$status = $this->_model->getConfigData('compropago_order_status_cancelled');
|
180 |
$history->setIsCustomerNotified(false);
|
181 |
$_order->save();
|
182 |
$nomestatus = 'COMPROPAGO_EXPIRED';
|
183 |
+
var_dump($nomestatus);
|
184 |
break;
|
185 |
default:
|
186 |
$_order->save();
|
app/code/community/Compropago/CpPayment/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Compropago_CpPayment>
|
5 |
-
<version>2.1.
|
6 |
</Compropago_CpPayment>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Compropago_CpPayment>
|
5 |
+
<version>2.1.2</version>
|
6 |
</Compropago_CpPayment>
|
7 |
</modules>
|
8 |
|
app/design/frontend/base/default/template/compropago/cppayment/cash.phtml
CHANGED
@@ -7,41 +7,49 @@ $_getProviders = $_model->getProviders();
|
|
7 |
<script> setBack(document.getElementById("store_code_selected").value.toLowerCase()); </script>
|
8 |
|
9 |
<div>
|
|
|
10 |
<ul id="payment_form_<?php echo $_code; ?>" style="display: none">
|
11 |
-
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
<?php } else { ?>
|
27 |
-
<
|
28 |
-
<div class="row stores-compact" id="<?php echo $_code; ?>_store">
|
29 |
-
<?php foreach ($_getProviders as $_provider){ ?>
|
30 |
-
|
31 |
-
<label class="cp-provider"
|
32 |
-
onclick="seleccionar(this);"
|
33 |
-
data-provider="<?php echo $_provider->internal_name; ?>"
|
34 |
-
>
|
35 |
-
<img src="<?php echo $_provider->image_medium; ?>"
|
36 |
-
alt="<?php echo $_provider->name; ?>"
|
37 |
-
>
|
38 |
-
</label>
|
39 |
-
|
40 |
-
<?php } ?>
|
41 |
-
<input id="store_code_selected" type="hidden" name="payment[store_code]" value="">
|
42 |
-
<input type="hidden" id="customer_phone" name="payment[customer_phone]" value="">
|
43 |
-
</div>
|
44 |
-
</li>
|
45 |
<?php } ?>
|
46 |
</ul>
|
|
|
47 |
</div>
|
7 |
<script> setBack(document.getElementById("store_code_selected").value.toLowerCase()); </script>
|
8 |
|
9 |
<div>
|
10 |
+
|
11 |
<ul id="payment_form_<?php echo $_code; ?>" style="display: none">
|
12 |
+
<?php if (!empty($_getProviders)){ ?>
|
13 |
|
14 |
+
<h2>Selecciona el establecimeinto para realizar tu pago:</h2>
|
15 |
|
16 |
+
<?php if (!$_model->showLogoProviders()) { ?>
|
17 |
+
|
18 |
+
<li>
|
19 |
+
<div id="<?php echo $_code; ?>_store">
|
20 |
+
<select class="provider-select" id="store_code_selected" name="payment[store_code]">
|
21 |
+
<?php foreach ($_getProviders as $_provider){ ?>
|
22 |
+
<option value="<?php echo $_provider->internal_name; ?>"><?php echo $_provider->name; ?></option>
|
23 |
+
<?php } ?>
|
24 |
+
</select>
|
25 |
+
<input type="hidden" id="customer_phone" name="payment[customer_phone]" value="">
|
26 |
+
</div>
|
27 |
+
</li>
|
28 |
+
|
29 |
+
<?php } else { ?>
|
30 |
+
<li>
|
31 |
+
<div class="row stores-compact" id="<?php echo $_code; ?>_store">
|
32 |
+
<?php foreach ($_getProviders as $_provider){ ?>
|
33 |
+
|
34 |
+
<label class="cp-provider"
|
35 |
+
onclick="seleccionar(this);"
|
36 |
+
data-provider="<?php echo $_provider->internal_name; ?>"
|
37 |
+
>
|
38 |
+
<img src="<?php echo $_provider->image_medium; ?>"
|
39 |
+
alt="<?php echo $_provider->name; ?>"
|
40 |
+
>
|
41 |
+
</label>
|
42 |
+
|
43 |
+
<?php } ?>
|
44 |
+
<input id="store_code_selected" type="hidden" name="payment[store_code]" value="">
|
45 |
+
<input type="hidden" id="customer_phone" name="payment[customer_phone]" value="">
|
46 |
+
</div>
|
47 |
+
</li>
|
48 |
+
<?php } ?>
|
49 |
|
50 |
<?php } else { ?>
|
51 |
+
<div style="text-align:center;"><h3>Servicio temporalmente inactivo.</h3></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<?php } ?>
|
53 |
</ul>
|
54 |
+
|
55 |
</div>
|
lib/Compropago/composer.lock
CHANGED
@@ -8,23 +8,23 @@
|
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "compropago/php-sdk",
|
11 |
-
"version": "3.0.
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/compropago/compropago-php.git",
|
15 |
-
"reference": "
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/compropago/compropago-php/zipball/
|
20 |
-
"reference": "
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"require": {
|
24 |
-
"php": ">=5.
|
25 |
},
|
26 |
"require-dev": {
|
27 |
-
"phpunit/phpunit": ">=
|
28 |
},
|
29 |
"type": "library",
|
30 |
"autoload": {
|
@@ -48,7 +48,7 @@
|
|
48 |
"pagos internet",
|
49 |
"payment gateway"
|
50 |
],
|
51 |
-
"time": "2017-
|
52 |
}
|
53 |
],
|
54 |
"packages-dev": [],
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "compropago/php-sdk",
|
11 |
+
"version": "3.0.4",
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/compropago/compropago-php.git",
|
15 |
+
"reference": "d8ddde3edfa2b4b2a237112fcd46612a276ef0a7"
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
+
"url": "https://api.github.com/repos/compropago/compropago-php/zipball/d8ddde3edfa2b4b2a237112fcd46612a276ef0a7",
|
20 |
+
"reference": "d8ddde3edfa2b4b2a237112fcd46612a276ef0a7",
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"require": {
|
24 |
+
"php": ">=5.4"
|
25 |
},
|
26 |
"require-dev": {
|
27 |
+
"phpunit/phpunit": ">=4.8"
|
28 |
},
|
29 |
"type": "library",
|
30 |
"autoload": {
|
48 |
"pagos internet",
|
49 |
"payment gateway"
|
50 |
],
|
51 |
+
"time": "2017-02-16T20:38:48+00:00"
|
52 |
}
|
53 |
],
|
54 |
"packages-dev": [],
|
lib/Compropago/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitafea82d3c9dea57010619a6a5628092f::getLoader();
|
lib/Compropago/vendor/composer/autoload_classmap.php
CHANGED
@@ -12,6 +12,7 @@ return array(
|
|
12 |
'CompropagoSdk\\Factory\\Models\\CpOrderInfo' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php',
|
13 |
'CompropagoSdk\\Factory\\Models\\Customer' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Customer.php',
|
14 |
'CompropagoSdk\\Factory\\Models\\EvalAuthInfo' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/EvalAuthInfo.php',
|
|
|
15 |
'CompropagoSdk\\Factory\\Models\\FeeDetails' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/FeeDetails.php',
|
16 |
'CompropagoSdk\\Factory\\Models\\InstructionDetails' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/InstructionDetails.php',
|
17 |
'CompropagoSdk\\Factory\\Models\\Instructions' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Instructions.php',
|
12 |
'CompropagoSdk\\Factory\\Models\\CpOrderInfo' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php',
|
13 |
'CompropagoSdk\\Factory\\Models\\Customer' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Customer.php',
|
14 |
'CompropagoSdk\\Factory\\Models\\EvalAuthInfo' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/EvalAuthInfo.php',
|
15 |
+
'CompropagoSdk\\Factory\\Models\\Exchange' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Exchange.php',
|
16 |
'CompropagoSdk\\Factory\\Models\\FeeDetails' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/FeeDetails.php',
|
17 |
'CompropagoSdk\\Factory\\Models\\InstructionDetails' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/InstructionDetails.php',
|
18 |
'CompropagoSdk\\Factory\\Models\\Instructions' => $vendorDir . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Instructions.php',
|
lib/Compropago/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd4cd0f315e5eff0f7da018057a772bc8
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitafea82d3c9dea57010619a6a5628092f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitafea82d3c9dea57010619a6a5628092f', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitafea82d3c9dea57010619a6a5628092f', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitafea82d3c9dea57010619a6a5628092f::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
lib/Compropago/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
@@ -27,6 +27,7 @@ class ComposerStaticInitd4cd0f315e5eff0f7da018057a772bc8
|
|
27 |
'CompropagoSdk\\Factory\\Models\\CpOrderInfo' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php',
|
28 |
'CompropagoSdk\\Factory\\Models\\Customer' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Customer.php',
|
29 |
'CompropagoSdk\\Factory\\Models\\EvalAuthInfo' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/EvalAuthInfo.php',
|
|
|
30 |
'CompropagoSdk\\Factory\\Models\\FeeDetails' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/FeeDetails.php',
|
31 |
'CompropagoSdk\\Factory\\Models\\InstructionDetails' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/InstructionDetails.php',
|
32 |
'CompropagoSdk\\Factory\\Models\\Instructions' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Instructions.php',
|
@@ -49,9 +50,9 @@ class ComposerStaticInitd4cd0f315e5eff0f7da018057a772bc8
|
|
49 |
public static function getInitializer(ClassLoader $loader)
|
50 |
{
|
51 |
return \Closure::bind(function () use ($loader) {
|
52 |
-
$loader->prefixLengthsPsr4 =
|
53 |
-
$loader->prefixDirsPsr4 =
|
54 |
-
$loader->classMap =
|
55 |
|
56 |
}, null, ClassLoader::class);
|
57 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitafea82d3c9dea57010619a6a5628092f
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
27 |
'CompropagoSdk\\Factory\\Models\\CpOrderInfo' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php',
|
28 |
'CompropagoSdk\\Factory\\Models\\Customer' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Customer.php',
|
29 |
'CompropagoSdk\\Factory\\Models\\EvalAuthInfo' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/EvalAuthInfo.php',
|
30 |
+
'CompropagoSdk\\Factory\\Models\\Exchange' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Exchange.php',
|
31 |
'CompropagoSdk\\Factory\\Models\\FeeDetails' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/FeeDetails.php',
|
32 |
'CompropagoSdk\\Factory\\Models\\InstructionDetails' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/InstructionDetails.php',
|
33 |
'CompropagoSdk\\Factory\\Models\\Instructions' => __DIR__ . '/..' . '/compropago/php-sdk/CompropagoSdk/Factory/Models/Instructions.php',
|
50 |
public static function getInitializer(ClassLoader $loader)
|
51 |
{
|
52 |
return \Closure::bind(function () use ($loader) {
|
53 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitafea82d3c9dea57010619a6a5628092f::$prefixLengthsPsr4;
|
54 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitafea82d3c9dea57010619a6a5628092f::$prefixDirsPsr4;
|
55 |
+
$loader->classMap = ComposerStaticInitafea82d3c9dea57010619a6a5628092f::$classMap;
|
56 |
|
57 |
}, null, ClassLoader::class);
|
58 |
}
|
lib/Compropago/vendor/composer/installed.json
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "compropago/php-sdk",
|
4 |
-
"version": "3.0.
|
5 |
-
"version_normalized": "3.0.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/compropago/compropago-php.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/compropago/compropago-php/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
-
"php": ">=5.
|
19 |
},
|
20 |
"require-dev": {
|
21 |
-
"phpunit/phpunit": ">=
|
22 |
},
|
23 |
-
"time": "2017-
|
24 |
"type": "library",
|
25 |
"installation-source": "dist",
|
26 |
"autoload": {
|
1 |
[
|
2 |
{
|
3 |
"name": "compropago/php-sdk",
|
4 |
+
"version": "3.0.4",
|
5 |
+
"version_normalized": "3.0.4.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/compropago/compropago-php.git",
|
9 |
+
"reference": "d8ddde3edfa2b4b2a237112fcd46612a276ef0a7"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/compropago/compropago-php/zipball/d8ddde3edfa2b4b2a237112fcd46612a276ef0a7",
|
14 |
+
"reference": "d8ddde3edfa2b4b2a237112fcd46612a276ef0a7",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
+
"php": ">=5.4"
|
19 |
},
|
20 |
"require-dev": {
|
21 |
+
"phpunit/phpunit": ">=4.8"
|
22 |
},
|
23 |
+
"time": "2017-02-16T20:38:48+00:00",
|
24 |
"type": "library",
|
25 |
"installation-source": "dist",
|
26 |
"autoload": {
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Client.php
CHANGED
@@ -4,14 +4,11 @@ namespace CompropagoSdk;
|
|
4 |
|
5 |
class Client
|
6 |
{
|
7 |
-
const VERSION="3.0.
|
8 |
|
9 |
const API_LIVE_URI='http://api.compropago.com/v1/';
|
10 |
const API_SANDBOX_URI='http://api.compropago.com/v1/';
|
11 |
|
12 |
-
#const API_LIVE_URI='http://api-staging-compropago.herokuapp.com/v1/';
|
13 |
-
#const API_SANDBOX_URI='http://api-staging-compropago.herokuapp.com/v1/';
|
14 |
-
|
15 |
public $publickey;
|
16 |
public $privatekey;
|
17 |
public $live;
|
@@ -40,9 +37,4 @@ class Client
|
|
40 |
{
|
41 |
return $this->publickey;
|
42 |
}
|
43 |
-
|
44 |
-
public function getFullAuth()
|
45 |
-
{
|
46 |
-
return $this->privatekey.':'.$this->publickey;
|
47 |
-
}
|
48 |
-
}
|
4 |
|
5 |
class Client
|
6 |
{
|
7 |
+
const VERSION="3.0.4";
|
8 |
|
9 |
const API_LIVE_URI='http://api.compropago.com/v1/';
|
10 |
const API_SANDBOX_URI='http://api.compropago.com/v1/';
|
11 |
|
|
|
|
|
|
|
12 |
public $publickey;
|
13 |
public $privatekey;
|
14 |
public $live;
|
37 |
{
|
38 |
return $this->publickey;
|
39 |
}
|
40 |
+
}
|
|
|
|
|
|
|
|
|
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Extern/TransactTables.php
CHANGED
@@ -1,24 +1,8 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
* Copyright 2015 Compropago.
|
4 |
-
*
|
5 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
-
* you may not use this file except in compliance with the License.
|
7 |
-
* You may obtain a copy of the License at
|
8 |
-
*
|
9 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
-
*
|
11 |
-
* Unless required by applicable law or agreed to in writing, software
|
12 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
-
* See the License for the specific language governing permissions and
|
15 |
-
* limitations under the License.
|
16 |
-
*/
|
17 |
-
/**
|
18 |
-
* Compropago $Library
|
19 |
-
* @author Eduardo Aguilar <eduardo.aguilar@compropago.com>
|
20 |
-
*/
|
21 |
namespace CompropagoSdk\Extern;
|
|
|
|
|
22 |
class TransactTables
|
23 |
{
|
24 |
/**
|
1 |
<?php
|
2 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
namespace CompropagoSdk\Extern;
|
4 |
+
|
5 |
+
|
6 |
class TransactTables
|
7 |
{
|
8 |
/**
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Factory.php
CHANGED
@@ -2,27 +2,12 @@
|
|
2 |
|
3 |
namespace CompropagoSdk\Factory;
|
4 |
|
5 |
-
use CompropagoSdk\Factory\Models\CpOrderInfo;
|
6 |
-
use CompropagoSdk\Factory\Models\Customer;
|
7 |
-
use CompropagoSdk\Factory\Models\EvalAuthInfo;
|
8 |
-
use CompropagoSdk\Factory\Models\FeeDetails;
|
9 |
-
use CompropagoSdk\Factory\Models\InstructionDetails;
|
10 |
-
use CompropagoSdk\Factory\Models\Instructions;
|
11 |
-
use CompropagoSdk\Factory\Models\NewOrderInfo;
|
12 |
-
use CompropagoSdk\Factory\Models\OrderInfo;
|
13 |
-
use CompropagoSdk\Factory\Models\PlaceOrderInfo;
|
14 |
-
use CompropagoSdk\Factory\Models\Provider;
|
15 |
-
use CompropagoSdk\Factory\Models\SmsData;
|
16 |
-
use CompropagoSdk\Factory\Models\SmsInfo;
|
17 |
-
use CompropagoSdk\Factory\Models\SmsObject;
|
18 |
-
use CompropagoSdk\Factory\Models\Webhook;
|
19 |
-
|
20 |
class Factory
|
21 |
{
|
22 |
/**
|
23 |
* @param $class
|
24 |
* @param array $data
|
25 |
-
* @return
|
26 |
* @throws \Exception
|
27 |
*/
|
28 |
public static function getInstanceOf($class, $data=array())
|
2 |
|
3 |
namespace CompropagoSdk\Factory;
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
class Factory
|
6 |
{
|
7 |
/**
|
8 |
* @param $class
|
9 |
* @param array $data
|
10 |
+
* @return mixed
|
11 |
* @throws \Exception
|
12 |
*/
|
13 |
public static function getInstanceOf($class, $data=array())
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/CpOrderInfo.php
CHANGED
@@ -23,6 +23,7 @@ class CpOrderInfo
|
|
23 |
public $amount_refunded;
|
24 |
public $description;
|
25 |
public $dispute;
|
|
|
26 |
|
27 |
public function __construct()
|
28 |
{
|
23 |
public $amount_refunded;
|
24 |
public $description;
|
25 |
public $dispute;
|
26 |
+
public $api_version;
|
27 |
|
28 |
public function __construct()
|
29 |
{
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/Exchange.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace CompropagoSdk\Factory\Models;
|
4 |
+
|
5 |
+
|
6 |
+
class Exchange
|
7 |
+
{
|
8 |
+
public $rate;
|
9 |
+
public $request;
|
10 |
+
public $origin_amount;
|
11 |
+
public $final_amount;
|
12 |
+
public $origin_currency;
|
13 |
+
public $final_currency;
|
14 |
+
public $exchange_id;
|
15 |
+
}
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/NewOrderInfo.php
CHANGED
@@ -21,6 +21,7 @@ class NewOrderInfo
|
|
21 |
public $order_info;
|
22 |
public $fee_details;
|
23 |
public $instructions;
|
|
|
24 |
|
25 |
public function __construct()
|
26 |
{
|
21 |
public $order_info;
|
22 |
public $fee_details;
|
23 |
public $instructions;
|
24 |
+
public $api_version;
|
25 |
|
26 |
public function __construct()
|
27 |
{
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/OrderInfo.php
CHANGED
@@ -5,11 +5,13 @@ namespace CompropagoSdk\Factory\Models;
|
|
5 |
class OrderInfo
|
6 |
{
|
7 |
public $order_id;
|
8 |
-
public $order_price;
|
9 |
public $order_name;
|
10 |
-
public $
|
11 |
-
public $store;
|
12 |
-
public $country;
|
13 |
public $image_url;
|
14 |
-
public $
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
5 |
class OrderInfo
|
6 |
{
|
7 |
public $order_id;
|
|
|
8 |
public $order_name;
|
9 |
+
public $order_price;
|
|
|
|
|
10 |
public $image_url;
|
11 |
+
public $exchage;
|
12 |
+
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
$this->exchage = new Exchange();
|
16 |
+
}
|
17 |
}
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/PlaceOrderInfo.php
CHANGED
@@ -13,6 +13,7 @@ class PlaceOrderInfo
|
|
13 |
public $customer_email;
|
14 |
public $payment_type;
|
15 |
public $currency;
|
|
|
16 |
public $image_url;
|
17 |
public $app_client_name;
|
18 |
public $app_client_version;
|
@@ -25,6 +26,7 @@ class PlaceOrderInfo
|
|
25 |
$customer_email,
|
26 |
$payment_type="OXXO",
|
27 |
$currency="MXN",
|
|
|
28 |
$image_url=null,
|
29 |
$app_client_name="phpsdk",
|
30 |
$app_client_version=Client::VERSION
|
@@ -37,6 +39,7 @@ class PlaceOrderInfo
|
|
37 |
$this->customer_email = $customer_email;
|
38 |
$this->payment_type = $payment_type;
|
39 |
$this->currency = $currency;
|
|
|
40 |
$this->image_url = $image_url;
|
41 |
$this->app_client_name = $app_client_name;
|
42 |
$this->app_client_version = $app_client_version;
|
13 |
public $customer_email;
|
14 |
public $payment_type;
|
15 |
public $currency;
|
16 |
+
public $expiration_time;
|
17 |
public $image_url;
|
18 |
public $app_client_name;
|
19 |
public $app_client_version;
|
26 |
$customer_email,
|
27 |
$payment_type="OXXO",
|
28 |
$currency="MXN",
|
29 |
+
$expiration_time=null,
|
30 |
$image_url=null,
|
31 |
$app_client_name="phpsdk",
|
32 |
$app_client_version=Client::VERSION
|
39 |
$this->customer_email = $customer_email;
|
40 |
$this->payment_type = $payment_type;
|
41 |
$this->currency = $currency;
|
42 |
+
$this->expiration_time = $expiration_time;
|
43 |
$this->image_url = $image_url;
|
44 |
$this->app_client_name = $app_client_name;
|
45 |
$this->app_client_version = $app_client_version;
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Models/Provider.php
CHANGED
@@ -6,6 +6,7 @@ class Provider
|
|
6 |
{
|
7 |
public $name;
|
8 |
public $store_image;
|
|
|
9 |
public $is_active;
|
10 |
public $internal_name;
|
11 |
public $image_small;
|
6 |
{
|
7 |
public $name;
|
8 |
public $store_image;
|
9 |
+
public $availability;
|
10 |
public $is_active;
|
11 |
public $internal_name;
|
12 |
public $image_small;
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Factory/Serialize.php
CHANGED
@@ -6,6 +6,7 @@ use CompropagoSdk\Client;
|
|
6 |
use CompropagoSdk\Factory\Models\CpOrderInfo;
|
7 |
use CompropagoSdk\Factory\Models\Customer;
|
8 |
use CompropagoSdk\Factory\Models\EvalAuthInfo;
|
|
|
9 |
use CompropagoSdk\Factory\Models\FeeDetails;
|
10 |
use CompropagoSdk\Factory\Models\InstructionDetails;
|
11 |
use CompropagoSdk\Factory\Models\Instructions;
|
@@ -46,6 +47,7 @@ class Serialize
|
|
46 |
$obj->amount_refunded = $data['amount_refunded'];
|
47 |
$obj->description = $data['description'];
|
48 |
$obj->dispute = $data['dispute'];
|
|
|
49 |
|
50 |
return $obj;
|
51 |
}
|
@@ -164,6 +166,26 @@ class Serialize
|
|
164 |
$obj->order_info = self::orderInfo($data['order_info']);
|
165 |
$obj->fee_details = self::feeDetails($data['fee_details']);
|
166 |
$obj->instructions = self::instructions($data['instructions']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
return $obj;
|
169 |
}
|
@@ -177,13 +199,10 @@ class Serialize
|
|
177 |
$obj = new OrderInfo();
|
178 |
|
179 |
$obj->order_id = isset($data['order_id']) ? $data['order_id'] : null;
|
180 |
-
$obj->order_price = isset($data['order_price']) ? $data['order_price'] : null;
|
181 |
$obj->order_name = isset($data['order_name']) ? $data['order_name'] : null;
|
182 |
-
$obj->
|
183 |
-
$obj->store = isset($data['store']) ? $data['store'] : null;
|
184 |
-
$obj->country = isset($data['country']) ? $data['country'] : null;
|
185 |
$obj->image_url = isset($data['image_url']) ? $data['image_url'] : null;
|
186 |
-
$obj->
|
187 |
|
188 |
return $obj;
|
189 |
}
|
@@ -202,6 +221,7 @@ class Serialize
|
|
202 |
$data['customer_email'],
|
203 |
empty($data['payment_type']) ? 'OXXO' : $data['payment_type'],
|
204 |
empty($data['currency']) ? 'MXN' : $data['currency'],
|
|
|
205 |
empty($data['image_url']) ? '': $data['image_url'],
|
206 |
empty($data['app_client_name']) ? 'php-sdk' : $data['app_client_name'],
|
207 |
empty($data['app_client_version']) ? Client::VERSION : $data['app_client_version']
|
@@ -218,6 +238,7 @@ class Serialize
|
|
218 |
|
219 |
$obj->name = $data['name'];
|
220 |
$obj->store_image = $data['store_image'];
|
|
|
221 |
$obj->is_active = $data['is_active'];
|
222 |
$obj->internal_name = $data['internal_name'];
|
223 |
$obj->image_small = $data['image_small'];
|
6 |
use CompropagoSdk\Factory\Models\CpOrderInfo;
|
7 |
use CompropagoSdk\Factory\Models\Customer;
|
8 |
use CompropagoSdk\Factory\Models\EvalAuthInfo;
|
9 |
+
use CompropagoSdk\Factory\Models\Exchange;
|
10 |
use CompropagoSdk\Factory\Models\FeeDetails;
|
11 |
use CompropagoSdk\Factory\Models\InstructionDetails;
|
12 |
use CompropagoSdk\Factory\Models\Instructions;
|
47 |
$obj->amount_refunded = $data['amount_refunded'];
|
48 |
$obj->description = $data['description'];
|
49 |
$obj->dispute = $data['dispute'];
|
50 |
+
$obj->api_version = $data['api_version'];
|
51 |
|
52 |
return $obj;
|
53 |
}
|
166 |
$obj->order_info = self::orderInfo($data['order_info']);
|
167 |
$obj->fee_details = self::feeDetails($data['fee_details']);
|
168 |
$obj->instructions = self::instructions($data['instructions']);
|
169 |
+
$obj->api_version = $data['api_version'];
|
170 |
+
|
171 |
+
return $obj;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
public static function exchange($data=array())
|
176 |
+
{
|
177 |
+
if (empty($data)) {
|
178 |
+
return new Exchange();
|
179 |
+
} else {
|
180 |
+
$obj = new Exchange();
|
181 |
+
|
182 |
+
$obj->rate = $data['rate'];
|
183 |
+
$obj->request = $data['request'];
|
184 |
+
$obj->origin_amount = $data['origin_amount'];
|
185 |
+
$obj->final_amount = $data['final_amount'];
|
186 |
+
$obj->origin_currency = $data['origin_currency'];
|
187 |
+
$obj->final_currency = $data['final_currency'];
|
188 |
+
$obj->exchange_id = $data['exchange_id'];
|
189 |
|
190 |
return $obj;
|
191 |
}
|
199 |
$obj = new OrderInfo();
|
200 |
|
201 |
$obj->order_id = isset($data['order_id']) ? $data['order_id'] : null;
|
|
|
202 |
$obj->order_name = isset($data['order_name']) ? $data['order_name'] : null;
|
203 |
+
$obj->order_price = isset($data['order_price']) ? $data['order_price'] : null;
|
|
|
|
|
204 |
$obj->image_url = isset($data['image_url']) ? $data['image_url'] : null;
|
205 |
+
$obj->exchage = self::exchange($data['exchange']);
|
206 |
|
207 |
return $obj;
|
208 |
}
|
221 |
$data['customer_email'],
|
222 |
empty($data['payment_type']) ? 'OXXO' : $data['payment_type'],
|
223 |
empty($data['currency']) ? 'MXN' : $data['currency'],
|
224 |
+
empty($data['expiration_time']) ? null : $data['expiration_time'],
|
225 |
empty($data['image_url']) ? '': $data['image_url'],
|
226 |
empty($data['app_client_name']) ? 'php-sdk' : $data['app_client_name'],
|
227 |
empty($data['app_client_version']) ? Client::VERSION : $data['app_client_version']
|
238 |
|
239 |
$obj->name = $data['name'];
|
240 |
$obj->store_image = $data['store_image'];
|
241 |
+
$obj->availability = $data['availability'];
|
242 |
$obj->is_active = $data['is_active'];
|
243 |
$obj->internal_name = $data['internal_name'];
|
244 |
$obj->image_small = $data['image_small'];
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/Service.php
CHANGED
@@ -3,11 +3,7 @@
|
|
3 |
namespace CompropagoSdk;
|
4 |
|
5 |
use CompropagoSdk\Factory\Factory;
|
6 |
-
use CompropagoSdk\Factory\Models\CpOrderInfo;
|
7 |
-
use CompropagoSdk\Factory\Models\NewOrderInfo;
|
8 |
use CompropagoSdk\Factory\Models\PlaceOrderInfo;
|
9 |
-
use CompropagoSdk\Factory\Models\SmsInfo;
|
10 |
-
use CompropagoSdk\Factory\Models\Webhook;
|
11 |
use CompropagoSdk\Tools\Request;
|
12 |
|
13 |
class Service
|
@@ -20,20 +16,24 @@ class Service
|
|
20 |
}
|
21 |
|
22 |
/**
|
23 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
* @param int $limit
|
25 |
* @param string $currency
|
26 |
* @return array
|
27 |
*/
|
28 |
-
public function listProviders($
|
29 |
{
|
30 |
-
|
31 |
-
$url = $this->client->deployUri.'providers/';
|
32 |
-
$keys = ['user' => $this->client->getUser(), 'pass' => $this->client->getPass()];
|
33 |
-
} else {
|
34 |
-
$url = $this->client->deployUri.'providers/true/';
|
35 |
-
$keys = [];
|
36 |
-
}
|
37 |
|
38 |
if ($limit > 0) {
|
39 |
$url .= '?order_total='.$limit;
|
@@ -43,28 +43,36 @@ class Service
|
|
43 |
$url .= '¤cy='.$currency;
|
44 |
}
|
45 |
|
46 |
-
$response = Request::get($url, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
return Factory::getInstanceOf('ListProviders', $response);
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
* @param $orderId
|
53 |
-
* @return CpOrderInfo
|
54 |
*/
|
55 |
public function verifyOrder( $orderId )
|
56 |
{
|
57 |
-
$response = Request::get(
|
58 |
-
$this->client->deployUri.'charges/'.$orderId.'/',
|
59 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
60 |
-
);
|
61 |
-
|
62 |
return Factory::getInstanceOf('CpOrderInfo', $response);
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
* @param PlaceOrderInfo $neworder
|
67 |
-
* @return NewOrderInfo
|
68 |
*/
|
69 |
public function placeOrder(PlaceOrderInfo $neworder)
|
70 |
{
|
@@ -76,52 +84,38 @@ class Service
|
|
76 |
'customer_email' => $neworder->customer_email,
|
77 |
'payment_type' => $neworder->payment_type,
|
78 |
'currency' => $neworder->currency,
|
|
|
79 |
'image_url' => $neworder->image_url,
|
80 |
'app_client_name' => $neworder->app_client_name,
|
81 |
'app_client_version' => $neworder->app_client_version
|
82 |
];
|
83 |
|
84 |
-
$response = Request::post(
|
85 |
-
$this->client->deployUri.'charges/',
|
86 |
-
$params,
|
87 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
88 |
-
);
|
89 |
-
|
90 |
return Factory::getInstanceOf('NewOrderInfo', $response);
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
* @param $number
|
95 |
* @param $orderId
|
96 |
-
* @return SmsInfo
|
97 |
*/
|
98 |
public function sendSmsInstructions($number,$orderId)
|
99 |
{
|
100 |
$params = ['customer_phone' => $number];
|
101 |
|
102 |
-
$response = Request::post(
|
103 |
-
$this->client->deployUri.'charges/'.$orderId.'/sms/',
|
104 |
-
$params,
|
105 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
106 |
-
);
|
107 |
-
|
108 |
return Factory::getInstanceOf('SmsInfo', $response);
|
109 |
}
|
110 |
|
111 |
/**
|
112 |
* @param $url
|
113 |
-
* @return Webhook
|
114 |
*/
|
115 |
public function createWebhook($url)
|
116 |
{
|
117 |
$params = ['url' => $url];
|
118 |
|
119 |
-
$response = Request::post(
|
120 |
-
$this->client->deployUri.'webhooks/stores/',
|
121 |
-
$params,
|
122 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
123 |
-
);
|
124 |
-
|
125 |
return Factory::getInstanceOf('Webhook', $response);
|
126 |
}
|
127 |
|
@@ -130,44 +124,30 @@ class Service
|
|
130 |
*/
|
131 |
public function listWebhooks()
|
132 |
{
|
133 |
-
$response = Request::get(
|
134 |
-
$this->client->deployUri.'webhooks/stores/',
|
135 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
136 |
-
);
|
137 |
-
|
138 |
return Factory::getInstanceOf('ListWebhooks', $response);
|
139 |
}
|
140 |
|
141 |
/**
|
142 |
* @param $webhookId
|
143 |
* @param $url
|
144 |
-
* @return Webhook
|
145 |
*/
|
146 |
public function updateWebhook($webhookId, $url)
|
147 |
{
|
148 |
$params = ['url' => $url];
|
149 |
|
150 |
-
$response = Request::put(
|
151 |
-
$this->client->deployUri.'webhooks/stores/'.$webhookId.'/',
|
152 |
-
$params,
|
153 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
154 |
-
);
|
155 |
-
|
156 |
return Factory::getInstanceOf('Webhook', $response);
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
* @param $webhookId
|
161 |
-
* @return Webhook
|
162 |
*/
|
163 |
public function deleteWebhook($webhookId)
|
164 |
{
|
165 |
-
$response = Request::delete(
|
166 |
-
$this->client->deployUri.'webhooks/stores/'.$webhookId.'/',
|
167 |
-
null,
|
168 |
-
['user' => $this->client->getUser(), 'pass' => $this->client->getPass()]
|
169 |
-
);
|
170 |
-
|
171 |
return Factory::getInstanceOf('Webhook', $response);
|
172 |
}
|
173 |
}
|
3 |
namespace CompropagoSdk;
|
4 |
|
5 |
use CompropagoSdk\Factory\Factory;
|
|
|
|
|
6 |
use CompropagoSdk\Factory\Models\PlaceOrderInfo;
|
|
|
|
|
7 |
use CompropagoSdk\Tools\Request;
|
8 |
|
9 |
class Service
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
+
* @return array
|
20 |
+
*/
|
21 |
+
private function getAuth()
|
22 |
+
{
|
23 |
+
return [
|
24 |
+
"user" => $this->client->getUser(),
|
25 |
+
"pass" => $this->client->getPass()
|
26 |
+
];
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
* @param int $limit
|
31 |
* @param string $currency
|
32 |
* @return array
|
33 |
*/
|
34 |
+
public function listProviders($limit = 0, $currency='MXN')
|
35 |
{
|
36 |
+
$url = $this->client->deployUri . 'providers/';
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
if ($limit > 0) {
|
39 |
$url .= '?order_total='.$limit;
|
43 |
$url .= '¤cy='.$currency;
|
44 |
}
|
45 |
|
46 |
+
$response = Request::get($url, $this->getAuth());
|
47 |
+
|
48 |
+
return Factory::getInstanceOf('ListProviders', $response);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function listDefaultProviders()
|
55 |
+
{
|
56 |
+
$url = $this->client->deployUri . 'providers/true/';
|
57 |
+
|
58 |
+
$response = Request::get($url);
|
59 |
|
60 |
return Factory::getInstanceOf('ListProviders', $response);
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
* @param $orderId
|
65 |
+
* @return \CompropagoSdk\Factory\Models\CpOrderInfo
|
66 |
*/
|
67 |
public function verifyOrder( $orderId )
|
68 |
{
|
69 |
+
$response = Request::get($this->client->deployUri.'charges/'.$orderId.'/', $this->getAuth());
|
|
|
|
|
|
|
|
|
70 |
return Factory::getInstanceOf('CpOrderInfo', $response);
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* @param PlaceOrderInfo $neworder
|
75 |
+
* @return \CompropagoSdk\Factory\Models\NewOrderInfo
|
76 |
*/
|
77 |
public function placeOrder(PlaceOrderInfo $neworder)
|
78 |
{
|
84 |
'customer_email' => $neworder->customer_email,
|
85 |
'payment_type' => $neworder->payment_type,
|
86 |
'currency' => $neworder->currency,
|
87 |
+
'expiration_time' => $neworder->expiration_time,
|
88 |
'image_url' => $neworder->image_url,
|
89 |
'app_client_name' => $neworder->app_client_name,
|
90 |
'app_client_version' => $neworder->app_client_version
|
91 |
];
|
92 |
|
93 |
+
$response = Request::post($this->client->deployUri.'charges/', $params, $this->getAuth());
|
|
|
|
|
|
|
|
|
|
|
94 |
return Factory::getInstanceOf('NewOrderInfo', $response);
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
* @param $number
|
99 |
* @param $orderId
|
100 |
+
* @return \CompropagoSdk\Factory\Models\SmsInfo
|
101 |
*/
|
102 |
public function sendSmsInstructions($number,$orderId)
|
103 |
{
|
104 |
$params = ['customer_phone' => $number];
|
105 |
|
106 |
+
$response = Request::post($this->client->deployUri.'charges/'.$orderId.'/sms/', $params, $this->getAuth());
|
|
|
|
|
|
|
|
|
|
|
107 |
return Factory::getInstanceOf('SmsInfo', $response);
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
* @param $url
|
112 |
+
* @return \CompropagoSdk\Factory\Models\Webhook
|
113 |
*/
|
114 |
public function createWebhook($url)
|
115 |
{
|
116 |
$params = ['url' => $url];
|
117 |
|
118 |
+
$response = Request::post($this->client->deployUri.'webhooks/stores/', $params, $this->getAuth());
|
|
|
|
|
|
|
|
|
|
|
119 |
return Factory::getInstanceOf('Webhook', $response);
|
120 |
}
|
121 |
|
124 |
*/
|
125 |
public function listWebhooks()
|
126 |
{
|
127 |
+
$response = Request::get($this->client->deployUri.'webhooks/stores/', $this->getAuth());
|
|
|
|
|
|
|
|
|
128 |
return Factory::getInstanceOf('ListWebhooks', $response);
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
* @param $webhookId
|
133 |
* @param $url
|
134 |
+
* @return \CompropagoSdk\Factory\Models\Webhook
|
135 |
*/
|
136 |
public function updateWebhook($webhookId, $url)
|
137 |
{
|
138 |
$params = ['url' => $url];
|
139 |
|
140 |
+
$response = Request::put($this->client->deployUri.'webhooks/stores/'.$webhookId.'/', $params, $this->getAuth());
|
|
|
|
|
|
|
|
|
|
|
141 |
return Factory::getInstanceOf('Webhook', $response);
|
142 |
}
|
143 |
|
144 |
/**
|
145 |
* @param $webhookId
|
146 |
+
* @return \CompropagoSdk\Factory\Models\Webhook
|
147 |
*/
|
148 |
public function deleteWebhook($webhookId)
|
149 |
{
|
150 |
+
$response = Request::delete($this->client->deployUri.'webhooks/stores/'.$webhookId.'/', null, $this->getAuth());
|
|
|
|
|
|
|
|
|
|
|
151 |
return Factory::getInstanceOf('Webhook', $response);
|
152 |
}
|
153 |
}
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/UnitTest/Test.php
CHANGED
@@ -25,6 +25,10 @@ require_once 'autoload.php';
|
|
25 |
|
26 |
use CompropagoSdk\Client;
|
27 |
use CompropagoSdk\Factory\Factory;
|
|
|
|
|
|
|
|
|
28 |
use CompropagoSdk\Tools\Validations;
|
29 |
|
30 |
class Test extends \PHPUnit_Framework_TestCase
|
@@ -34,6 +38,7 @@ class Test extends \PHPUnit_Framework_TestCase
|
|
34 |
private $mode = false;
|
35 |
|
36 |
private $phonenumber = "5561463627";
|
|
|
37 |
|
38 |
private $order_info = [
|
39 |
'order_id' => 12,
|
@@ -45,94 +50,73 @@ class Test extends \PHPUnit_Framework_TestCase
|
|
45 |
|
46 |
public function testCreateClient()
|
47 |
{
|
48 |
-
$
|
49 |
-
try{
|
50 |
-
$client = new Client(
|
51 |
-
|
52 |
-
|
53 |
-
$this->mode
|
54 |
-
);
|
55 |
-
$this->assertTrue(!empty($client));
|
56 |
-
}catch(\Exception $e){
|
57 |
-
$this->assertTrue(!empty($client));
|
58 |
echo "====>>".$e->getMessage()."\n";
|
59 |
}
|
60 |
-
|
61 |
-
return $client;
|
62 |
}
|
63 |
|
64 |
public function testEvalAuth()
|
65 |
{
|
66 |
-
$res =
|
67 |
-
try{
|
68 |
-
$client = new Client(
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
$res = Validations::evalAuth($client);
|
74 |
-
}catch(\Exception $e){
|
75 |
echo "====>>".$e->getMessage()."\n";
|
76 |
}
|
77 |
-
|
78 |
-
$this->assertTrue(!empty($res));
|
79 |
}
|
80 |
|
81 |
-
public function
|
82 |
{
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
}catch(\Exception $e){
|
91 |
-
$res = array();
|
92 |
echo "====>>".$e->getMessage()."\n";
|
93 |
}
|
94 |
-
|
95 |
-
$this->assertTrue(is_array($res) && !empty($res));
|
96 |
}
|
97 |
|
98 |
-
public function
|
99 |
{
|
100 |
$flag = true;
|
101 |
-
try{
|
102 |
-
$client = new Client(
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
$res = $client->api->listProviders(false, 15000);
|
108 |
-
|
109 |
-
foreach ($res as $provider){
|
110 |
-
if($provider->transaction_limit < 15000){
|
111 |
$flag = false;
|
112 |
break;
|
113 |
}
|
114 |
}
|
115 |
-
}catch(\Exception $e){
|
116 |
echo "====>>".$e->getMessage()."\n";
|
117 |
$flag = false;
|
118 |
}
|
119 |
-
|
120 |
$this->assertTrue($flag);
|
121 |
}
|
122 |
|
123 |
-
public function
|
124 |
{
|
125 |
$flag = true;
|
126 |
try {
|
127 |
-
$client = new Client(
|
128 |
-
|
129 |
-
$this->privatekey,
|
130 |
-
$this->mode
|
131 |
-
);
|
132 |
-
$provs = $client->api->listProviders(true, 700, 'USD');
|
133 |
|
134 |
foreach ($provs as $prov) {
|
135 |
-
if ($prov->transaction_limit <
|
136 |
$flag = false;
|
137 |
break;
|
138 |
}
|
@@ -144,193 +128,135 @@ class Test extends \PHPUnit_Framework_TestCase
|
|
144 |
$this->assertTrue($flag);
|
145 |
}
|
146 |
|
147 |
-
public function
|
148 |
{
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
$this->mode
|
154 |
-
);
|
155 |
-
$res = $client->api->listProviders(true);
|
156 |
-
|
157 |
-
if($res){
|
158 |
-
$res = $client->api->listProviders(true);
|
159 |
-
}
|
160 |
-
}catch(\Exception $e){
|
161 |
-
echo "====>>".$e->getMessage()."\n";
|
162 |
-
}
|
163 |
|
164 |
-
|
165 |
-
}
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
try{
|
170 |
-
$client = new Client(
|
171 |
-
$this->publickey,
|
172 |
-
$this->privatekey,
|
173 |
-
$this->mode
|
174 |
-
);
|
175 |
-
$res = $client->api->listProviders(true, 15000);
|
176 |
-
|
177 |
-
$flag = true;
|
178 |
-
foreach ($res as $provider){
|
179 |
-
if($provider->transaction_limit < 15000){
|
180 |
-
$flag = false;
|
181 |
-
break;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}catch(\Exception $e){
|
185 |
echo "====>>".$e->getMessage()."\n";
|
186 |
}
|
187 |
|
188 |
-
$this->assertTrue(
|
189 |
}
|
190 |
|
191 |
-
public function
|
192 |
{
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
199 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
200 |
-
$
|
201 |
-
}catch(\Exception $e){
|
202 |
-
echo "====>>".$e->getMessage()."\n";
|
203 |
-
}
|
204 |
|
205 |
-
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
|
208 |
-
public function
|
209 |
{
|
|
|
210 |
try {
|
211 |
-
$client = new Client(
|
212 |
-
$this->publickey,
|
213 |
-
$this->privatekey,
|
214 |
-
$this->mode
|
215 |
-
);
|
216 |
-
|
217 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
|
|
218 |
$order_aux = $client->api->placeOrder($order);
|
|
|
219 |
|
220 |
-
$res = $
|
221 |
} catch (\Exception $e) {
|
222 |
echo "====>>".$e->getMessage()."\n";
|
223 |
}
|
224 |
-
|
225 |
-
$this->assertTrue(!empty($res));
|
226 |
}
|
227 |
|
228 |
-
public function
|
229 |
{
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
$this->privatekey,
|
234 |
-
$this->mode
|
235 |
-
);
|
236 |
-
|
237 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
|
|
238 |
$order_aux = $client->api->placeOrder($order);
|
|
|
239 |
|
240 |
-
$res =
|
241 |
-
}catch(\Exception $e){
|
242 |
echo "====>>".$e->getMessage()."\n";
|
243 |
}
|
244 |
-
|
245 |
-
$this->assertTrue(!empty($res));
|
246 |
}
|
247 |
|
248 |
public function testListWebhooks()
|
249 |
{
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
);
|
256 |
-
|
257 |
-
if(is_array($res)){
|
258 |
-
if(count($res) > 0 && get_class($res[0]) == "CompropagoSdk\\Factory\\Models\\Webhook"){
|
259 |
-
$flag = true;
|
260 |
-
}else{
|
261 |
-
$flag = false;
|
262 |
-
}
|
263 |
-
}else{
|
264 |
-
$flag = false;
|
265 |
-
}
|
266 |
-
}catch(\Exception $e){
|
267 |
echo "====>>".$e->getMessage()."\n";
|
268 |
-
$flag = false;
|
269 |
}
|
270 |
-
|
271 |
-
$this->assertTrue($flag);
|
272 |
}
|
273 |
|
274 |
public function testCreateWebhook()
|
275 |
{
|
276 |
-
$
|
277 |
-
try{
|
278 |
-
$client = new Client(
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
$res = $client->api->createWebhook("http://prueba.com");
|
284 |
-
|
285 |
-
$flag = (get_class($res) == "CompropagoSdk\\Factory\\Models\\Webhook");
|
286 |
-
}catch(\Exception $e){
|
287 |
echo "====>>".$e->getMessage()."\n";
|
288 |
}
|
289 |
|
290 |
-
$this->assertTrue($
|
291 |
}
|
292 |
|
293 |
public function testUpdateWebhook()
|
294 |
{
|
295 |
-
$
|
296 |
-
try{
|
297 |
-
$client = new Client(
|
298 |
-
$this->publickey,
|
299 |
-
$this->privatekey,
|
300 |
-
$this->mode
|
301 |
-
);
|
302 |
-
|
303 |
$webhook = $client->api->createWebhook("http://prueba.com");
|
304 |
|
305 |
-
$
|
306 |
|
307 |
-
$
|
308 |
-
}catch(\Exception $e){
|
309 |
echo "====>>".$e->getMessage()."\n";
|
310 |
}
|
311 |
|
312 |
-
$this->assertTrue($
|
313 |
}
|
314 |
|
315 |
public function testDeleteWebhook()
|
316 |
{
|
317 |
-
$
|
318 |
-
|
319 |
-
|
320 |
-
$client = new Client(
|
321 |
-
$this->publickey,
|
322 |
-
$this->privatekey,
|
323 |
-
$this->mode
|
324 |
-
);
|
325 |
-
|
326 |
$webhook = $client->api->createWebhook("http://prueba2.com");
|
327 |
-
$
|
328 |
|
329 |
-
$
|
330 |
-
}catch(\Exception $e){
|
331 |
echo "\n".$e->getMessage()."\n";
|
332 |
}
|
333 |
|
334 |
-
$this->assertTrue($
|
335 |
}
|
336 |
}
|
25 |
|
26 |
use CompropagoSdk\Client;
|
27 |
use CompropagoSdk\Factory\Factory;
|
28 |
+
use CompropagoSdk\Factory\Models\CpOrderInfo;
|
29 |
+
use CompropagoSdk\Factory\Models\EvalAuthInfo;
|
30 |
+
use CompropagoSdk\Factory\Models\Provider;
|
31 |
+
use CompropagoSdk\Factory\Models\Webhook;
|
32 |
use CompropagoSdk\Tools\Validations;
|
33 |
|
34 |
class Test extends \PHPUnit_Framework_TestCase
|
38 |
private $mode = false;
|
39 |
|
40 |
private $phonenumber = "5561463627";
|
41 |
+
private $limit = 15000;
|
42 |
|
43 |
private $order_info = [
|
44 |
'order_id' => 12,
|
50 |
|
51 |
public function testCreateClient()
|
52 |
{
|
53 |
+
$res = false;
|
54 |
+
try {
|
55 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
56 |
+
$res = true;
|
57 |
+
} catch(\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
58 |
echo "====>>".$e->getMessage()."\n";
|
59 |
}
|
60 |
+
$this->assertTrue($res);
|
|
|
61 |
}
|
62 |
|
63 |
public function testEvalAuth()
|
64 |
{
|
65 |
+
$res = false;
|
66 |
+
try {
|
67 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
68 |
+
$response = Validations::evalAuth($client);
|
69 |
+
|
70 |
+
$res = $response instanceof EvalAuthInfo;
|
71 |
+
} catch(\Exception $e) {
|
|
|
|
|
72 |
echo "====>>".$e->getMessage()."\n";
|
73 |
}
|
74 |
+
$this->assertTrue($res);
|
|
|
75 |
}
|
76 |
|
77 |
+
public function testProviders()
|
78 |
{
|
79 |
+
$res = false;
|
80 |
+
try {
|
81 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
82 |
+
$response = $client->api->listProviders();
|
83 |
+
|
84 |
+
$res = $response[0] instanceof Provider;
|
85 |
+
} catch(\Exception $e) {
|
|
|
|
|
86 |
echo "====>>".$e->getMessage()."\n";
|
87 |
}
|
88 |
+
$this->assertTrue($res);
|
|
|
89 |
}
|
90 |
|
91 |
+
public function testProvidersLimit()
|
92 |
{
|
93 |
$flag = true;
|
94 |
+
try {
|
95 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
96 |
+
$res = $client->api->listProviders($this->limit);
|
97 |
+
|
98 |
+
foreach ($res as $provider) {
|
99 |
+
if ($provider->transaction_limit < $this->limit) {
|
|
|
|
|
|
|
|
|
100 |
$flag = false;
|
101 |
break;
|
102 |
}
|
103 |
}
|
104 |
+
} catch(\Exception $e) {
|
105 |
echo "====>>".$e->getMessage()."\n";
|
106 |
$flag = false;
|
107 |
}
|
|
|
108 |
$this->assertTrue($flag);
|
109 |
}
|
110 |
|
111 |
+
public function testProvidersCurrency()
|
112 |
{
|
113 |
$flag = true;
|
114 |
try {
|
115 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
116 |
+
$provs = $client->api->listProviders(700, 'USD');
|
|
|
|
|
|
|
|
|
117 |
|
118 |
foreach ($provs as $prov) {
|
119 |
+
if ($prov->transaction_limit < $this->limit) {
|
120 |
$flag = false;
|
121 |
break;
|
122 |
}
|
128 |
$this->assertTrue($flag);
|
129 |
}
|
130 |
|
131 |
+
public function testPlaceOrder()
|
132 |
{
|
133 |
+
$res = false;
|
134 |
+
try {
|
135 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
136 |
+
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
$response = $client->api->placeOrder($order);
|
|
|
139 |
|
140 |
+
$res = !empty($response->id);
|
141 |
+
} catch(\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
echo "====>>".$e->getMessage()."\n";
|
143 |
}
|
144 |
|
145 |
+
$this->assertTrue($res);
|
146 |
}
|
147 |
|
148 |
+
public function testPlaceOrderExpdate()
|
149 |
{
|
150 |
+
$res = false;
|
151 |
+
try {
|
152 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
153 |
+
|
154 |
+
$epoch = time() + (6 * 60 * 60);
|
155 |
+
$this->order_info['expiration_time'] = $epoch;
|
156 |
+
|
157 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
158 |
+
$response = $client->api->placeOrder($order);
|
|
|
|
|
|
|
159 |
|
160 |
+
$res = $epoch == $response->exp_date;
|
161 |
+
} catch (\Exception $e) {
|
162 |
+
echo "====>> ".$e->getMessage();
|
163 |
+
}
|
164 |
+
$this->assertTrue($res);
|
165 |
}
|
166 |
|
167 |
+
public function testVerifyOrder()
|
168 |
{
|
169 |
+
$res = false;
|
170 |
try {
|
171 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
|
|
|
|
|
|
|
|
|
|
172 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
173 |
+
|
174 |
$order_aux = $client->api->placeOrder($order);
|
175 |
+
$response = $client->api->verifyOrder($order_aux->id);
|
176 |
|
177 |
+
$res = $response instanceof CpOrderInfo;
|
178 |
} catch (\Exception $e) {
|
179 |
echo "====>>".$e->getMessage()."\n";
|
180 |
}
|
181 |
+
$this->assertTrue($res);
|
|
|
182 |
}
|
183 |
|
184 |
+
public function testSms()
|
185 |
{
|
186 |
+
$res = false;
|
187 |
+
try {
|
188 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
|
|
|
|
|
|
|
|
189 |
$order = Factory::getInstanceOf('PlaceOrderInfo', $this->order_info);
|
190 |
+
|
191 |
$order_aux = $client->api->placeOrder($order);
|
192 |
+
$response = $client->api->sendSmsInstructions($this->phonenumber, $order_aux->id);
|
193 |
|
194 |
+
$res = !empty($response->type);
|
195 |
+
} catch(\Exception $e) {
|
196 |
echo "====>>".$e->getMessage()."\n";
|
197 |
}
|
198 |
+
$this->assertTrue($res);
|
|
|
199 |
}
|
200 |
|
201 |
public function testListWebhooks()
|
202 |
{
|
203 |
+
$res = false;
|
204 |
+
try {
|
205 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
206 |
+
$webhooks = $client->api->listWebhooks();
|
207 |
+
|
208 |
+
$res = is_array($webhooks) && ($webhooks[0] instanceof Webhook);
|
209 |
+
} catch(\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
echo "====>>".$e->getMessage()."\n";
|
|
|
211 |
}
|
212 |
+
$this->assertTrue($res);
|
|
|
213 |
}
|
214 |
|
215 |
public function testCreateWebhook()
|
216 |
{
|
217 |
+
$res = false;
|
218 |
+
try {
|
219 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
220 |
+
$response = $client->api->createWebhook("http://prueba.com");
|
221 |
+
|
222 |
+
$res = $response instanceof Webhook;
|
223 |
+
} catch(\Exception $e) {
|
|
|
|
|
|
|
|
|
224 |
echo "====>>".$e->getMessage()."\n";
|
225 |
}
|
226 |
|
227 |
+
$this->assertTrue($res);
|
228 |
}
|
229 |
|
230 |
public function testUpdateWebhook()
|
231 |
{
|
232 |
+
$res = false;
|
233 |
+
try {
|
234 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
|
|
|
|
|
|
|
|
|
|
235 |
$webhook = $client->api->createWebhook("http://prueba.com");
|
236 |
|
237 |
+
$response = $client->api->updateWebhook($webhook->id, "http://prueba2.com");
|
238 |
|
239 |
+
$res = $response instanceof Webhook;
|
240 |
+
} catch(\Exception $e) {
|
241 |
echo "====>>".$e->getMessage()."\n";
|
242 |
}
|
243 |
|
244 |
+
$this->assertTrue($res);
|
245 |
}
|
246 |
|
247 |
public function testDeleteWebhook()
|
248 |
{
|
249 |
+
$res = false;
|
250 |
+
try {
|
251 |
+
$client = new Client($this->publickey, $this->privatekey, $this->mode);
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
$webhook = $client->api->createWebhook("http://prueba2.com");
|
253 |
+
$response = $client->api->deleteWebhook($webhook->id);
|
254 |
|
255 |
+
$res = $response instanceof Webhook;
|
256 |
+
} catch(\Exception $e) {
|
257 |
echo "\n".$e->getMessage()."\n";
|
258 |
}
|
259 |
|
260 |
+
$this->assertTrue($res);
|
261 |
}
|
262 |
}
|
lib/Compropago/vendor/compropago/php-sdk/CompropagoSdk/UnitTest/autoload.php
CHANGED
@@ -15,6 +15,7 @@ require_once __DIR__ .'/../Factory/Models/InstructionDetails.php';
|
|
15 |
require_once __DIR__ .'/../Factory/Models/Instructions.php';
|
16 |
require_once __DIR__ .'/../Factory/Models/NewOrderInfo.php';
|
17 |
require_once __DIR__ .'/../Factory/Models/OrderInfo.php';
|
|
|
18 |
require_once __DIR__ .'/../Factory/Models/PlaceOrderInfo.php';
|
19 |
require_once __DIR__ .'/../Factory/Models/Provider.php';
|
20 |
require_once __DIR__ .'/../Factory/Models/SmsData.php';
|
15 |
require_once __DIR__ .'/../Factory/Models/Instructions.php';
|
16 |
require_once __DIR__ .'/../Factory/Models/NewOrderInfo.php';
|
17 |
require_once __DIR__ .'/../Factory/Models/OrderInfo.php';
|
18 |
+
require_once __DIR__ .'/../Factory/Models/Exchange.php';
|
19 |
require_once __DIR__ .'/../Factory/Models/PlaceOrderInfo.php';
|
20 |
require_once __DIR__ .'/../Factory/Models/Provider.php';
|
21 |
require_once __DIR__ .'/../Factory/Models/SmsData.php';
|
lib/Compropago/vendor/compropago/php-sdk/README.md
CHANGED
@@ -56,6 +56,9 @@ el acceso a todas las clases del SDK.
|
|
56 |
```php
|
57 |
<?php
|
58 |
require_once 'CompropagoSdk/UnitTest/autoload.php';
|
|
|
|
|
|
|
59 |
```
|
60 |
|
61 |
### Instalación pro Composer
|
@@ -74,6 +77,17 @@ O si lo prefiere puede incluirlo directamente en su archivo composer.json
|
|
74 |
}
|
75 |
```
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
## Documentación
|
78 |
|
79 |
### Documentación ComproPago PHP SDK
|
@@ -101,16 +115,6 @@ Información de Comisiones y Horarios, como Transferir tu dinero y la Seguridad
|
|
101 |
|
102 |
Se debe contar con una cuenta activa de ComproPago. [Registrarse en ComproPago](https://compropago.com)
|
103 |
|
104 |
-
### General
|
105 |
-
|
106 |
-
Para poder hacer uso de la librería es necesario incluir la libreria principales del SDK
|
107 |
-
|
108 |
-
```php
|
109 |
-
<?php
|
110 |
-
|
111 |
-
require 'vendor/autoload.php';
|
112 |
-
```
|
113 |
-
|
114 |
### Configuración del Cliente
|
115 |
|
116 |
Para poder hacer uso de la gema y llamados al API es necesario que primero configure sus Llaves de conexión y crear
|
@@ -124,7 +128,6 @@ un instancia de Client.
|
|
124 |
# @param string publickey Llave publica correspondiente al modo de la tienda
|
125 |
# @param string privatekey Llave privada correspondiente al modo de la tienda
|
126 |
# @param bool live Modo de la tienda (false = Test | true = Live)
|
127 |
-
|
128 |
$client = new Client(
|
129 |
'pk_test_5989d8209974e2d62', # publickey
|
130 |
'sk_test_6ff4e982253c44c42', # privatekey
|
@@ -134,10 +137,6 @@ $client = new Client(
|
|
134 |
|
135 |
### Uso Básico de la Libreria
|
136 |
|
137 |
-
> Consulte la documentación de la librería PHP de ComproPago para conocer más de sus capacidades, configuraciones y
|
138 |
-
métodos.
|
139 |
-
|
140 |
-
|
141 |
#### Llamados al los servicios por SDK
|
142 |
|
143 |
Para poder hacer uso de los servicos de ComproPago, solo debe de llamar a los metodos contenidos en la propiedad **api**
|
@@ -153,7 +152,16 @@ de la variable **client** como se muestra a continuación.
|
|
153 |
<?php
|
154 |
|
155 |
# Se genera el objeto con la informacion de la orden
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
$order_info = [
|
158 |
'order_id' => 12,
|
159 |
'order_name' => 'M4 php sdk',
|
@@ -161,13 +169,13 @@ $order_info = [
|
|
161 |
'customer_name' => 'Eduardo',
|
162 |
'customer_email' => 'asd@asd.com',
|
163 |
'payment_type' => 'OXXO',
|
164 |
-
'currency' => 'MXN'
|
|
|
165 |
];
|
166 |
-
$order =
|
167 |
|
168 |
|
169 |
# Llamada al metodo 'place_order' del API para generar la orden
|
170 |
-
|
171 |
# @param [PlaceOrderInfo] order
|
172 |
# @return [NewOrderInfo]
|
173 |
$neworder = $client->api->placeOrder($order);
|
@@ -234,13 +242,12 @@ $providers = $client->api->listProviders();
|
|
234 |
```php
|
235 |
<?php
|
236 |
/**
|
237 |
-
* @param
|
238 |
-
* @param
|
239 |
-
* @param bool $fetch
|
240 |
* @return array
|
241 |
* @throws \Exception
|
242 |
*/
|
243 |
-
public function listProviders($
|
244 |
```
|
245 |
|
246 |
##### Envio de instrucciones SMS
|
@@ -287,7 +294,7 @@ logica de aprobacion en su tienda en linea. El proceso que siguenes el siguiente
|
|
287 |
```php
|
288 |
<?php
|
289 |
# $cadena_obtenida es un String
|
290 |
-
$info =
|
291 |
```
|
292 |
|
293 |
3. Generar la logica de aprovacion correspondiente al estatus de la orden.
|
@@ -322,7 +329,7 @@ atributo **api** del objeto **Client** y el cual regresa una instancia de tipo *
|
|
322 |
|
323 |
```php
|
324 |
<?php
|
325 |
-
$updated_webhook = $client->api->updateWebhook($webhook->
|
326 |
```
|
327 |
|
328 |
###### Prototipo del metodo updateWebhook()
|
56 |
```php
|
57 |
<?php
|
58 |
require_once 'CompropagoSdk/UnitTest/autoload.php';
|
59 |
+
|
60 |
+
use CompropagoSdk\Client;
|
61 |
+
use CompropagoSdk\Factory\Factory;
|
62 |
```
|
63 |
|
64 |
### Instalación pro Composer
|
77 |
}
|
78 |
```
|
79 |
|
80 |
+
Para poder hacer uso de la librería es necesario incluir el archivo principal del SDK
|
81 |
+
|
82 |
+
```php
|
83 |
+
<?php
|
84 |
+
|
85 |
+
require 'vendor/autoload.php';
|
86 |
+
|
87 |
+
use CompropagoSdk\Client;
|
88 |
+
use CompropagoSdk\Factory\Factory;
|
89 |
+
```
|
90 |
+
|
91 |
## Documentación
|
92 |
|
93 |
### Documentación ComproPago PHP SDK
|
115 |
|
116 |
Se debe contar con una cuenta activa de ComproPago. [Registrarse en ComproPago](https://compropago.com)
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
### Configuración del Cliente
|
119 |
|
120 |
Para poder hacer uso de la gema y llamados al API es necesario que primero configure sus Llaves de conexión y crear
|
128 |
# @param string publickey Llave publica correspondiente al modo de la tienda
|
129 |
# @param string privatekey Llave privada correspondiente al modo de la tienda
|
130 |
# @param bool live Modo de la tienda (false = Test | true = Live)
|
|
|
131 |
$client = new Client(
|
132 |
'pk_test_5989d8209974e2d62', # publickey
|
133 |
'sk_test_6ff4e982253c44c42', # privatekey
|
137 |
|
138 |
### Uso Básico de la Libreria
|
139 |
|
|
|
|
|
|
|
|
|
140 |
#### Llamados al los servicios por SDK
|
141 |
|
142 |
Para poder hacer uso de los servicos de ComproPago, solo debe de llamar a los metodos contenidos en la propiedad **api**
|
152 |
<?php
|
153 |
|
154 |
# Se genera el objeto con la informacion de la orden
|
155 |
+
/**
|
156 |
+
* @param string order_id Id de la orden
|
157 |
+
* @param string order_name Nombre del producto o productos de la orden
|
158 |
+
* @param float order_price Monto total de la orden
|
159 |
+
* @param string customer_name Nombre completo del cliente
|
160 |
+
* @param string customer_email Correo electronico del cliente
|
161 |
+
* @param string payment_type (default = OXXO) Valor del atributo internal_name' de un objeto 'Provider'
|
162 |
+
* @param string currency (default = MXN) Codigo de la moneda con la que se esta creando el cargo
|
163 |
+
* @param int expiration_time (default = null) Fecha en formato Epoch la cual indica la fecha de expiración de la orden
|
164 |
+
*/
|
165 |
$order_info = [
|
166 |
'order_id' => 12,
|
167 |
'order_name' => 'M4 php sdk',
|
169 |
'customer_name' => 'Eduardo',
|
170 |
'customer_email' => 'asd@asd.com',
|
171 |
'payment_type' => 'OXXO',
|
172 |
+
'currency' => 'MXN',
|
173 |
+
'expiration_time' => 1484799158
|
174 |
];
|
175 |
+
$order = Factory::getInstanceOf('PlaceOrderInfo', $order_info);
|
176 |
|
177 |
|
178 |
# Llamada al metodo 'place_order' del API para generar la orden
|
|
|
179 |
# @param [PlaceOrderInfo] order
|
180 |
# @return [NewOrderInfo]
|
181 |
$neworder = $client->api->placeOrder($order);
|
242 |
```php
|
243 |
<?php
|
244 |
/**
|
245 |
+
* @param $limit
|
246 |
+
* @param $currency (Default="MXN") Supported Currencies "USD", "EUR" & "GBP"
|
|
|
247 |
* @return array
|
248 |
* @throws \Exception
|
249 |
*/
|
250 |
+
public function listProviders($limit = 0, $currency = 'MXN'){}
|
251 |
```
|
252 |
|
253 |
##### Envio de instrucciones SMS
|
294 |
```php
|
295 |
<?php
|
296 |
# $cadena_obtenida es un String
|
297 |
+
$info = Factory::getInstanceOf('CpOrderInfo', $cadena_obtenida);
|
298 |
```
|
299 |
|
300 |
3. Generar la logica de aprovacion correspondiente al estatus de la orden.
|
329 |
|
330 |
```php
|
331 |
<?php
|
332 |
+
$updated_webhook = $client->api->updateWebhook($webhook->id, 'http://sitio.com/nuevo_webhook');
|
333 |
```
|
334 |
|
335 |
###### Prototipo del metodo updateWebhook()
|
lib/Compropago/vendor/compropago/php-sdk/composer.json
CHANGED
@@ -12,10 +12,10 @@
|
|
12 |
}
|
13 |
],
|
14 |
"require": {
|
15 |
-
"php": ">=5.
|
16 |
},
|
17 |
"require-dev":{
|
18 |
-
"phpunit/phpunit": ">=
|
19 |
},
|
20 |
"autoload": {
|
21 |
"psr-4": {
|
12 |
}
|
13 |
],
|
14 |
"require": {
|
15 |
+
"php": ">=5.4"
|
16 |
},
|
17 |
"require-dev":{
|
18 |
+
"phpunit/phpunit": ">=4.8"
|
19 |
},
|
20 |
"autoload": {
|
21 |
"psr-4": {
|
package.xml
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Compropago_Payment_Extension</name>
|
4 |
-
<version>2.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>*
|
12 |
-
</
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<
|
16 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Compropago_CpPayment.xml" hash="39b519aeecb171cb993e0ee4e064f29a"/></dir></target><target name="magecommunity"><dir name="Compropago"><dir name="CpPayment"><dir name="Block"><file name="Form.php" hash="fedfa50d8860395445eec7e4def4df7d"/><file name="Info.php" hash="d34706306b26afc91b7b0190edbe73a0"/></dir><dir name="Helper"><file name="Data.php" hash="0ae647f79d66d82cc976408c120fcbb6"/></dir><dir name="Model"><file name="Observer.php" hash="240cb5799b8ed42ff62f7f43e14c648f"/><file name="Providers.php" hash="57bbb11a08f26afa92a98ca0dd9f940b"/><file name="Standard.php" hash="c2c427674ea9d94c1a7cfb476dea26e1"/></dir><dir name="controllers"><file name="IndexController.php" hash="4b2c048e6f17d7721298a86baa209fc5"/></dir><dir name="etc"><file name="config.xml" hash="4aec58a07b59df2fbbc60d43c575539f"/><file name="system.xml" hash="8a96aa67ae243dfb980fefb94066143a"/></dir><dir name="sql"><dir name="cppayment_setup"><file name="install-2.0.0.php" hash="3a1215b9adb72418e27ee6fffd604d73"/><file name="install-2.1.0.php" hash="3a1215b9adb72418e27ee6fffd604d73"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cppayment.xml" hash="aadfc4eed58b61274c257d022363e0bb"/></dir><dir name="template"><dir name="compropago"><dir name="cppayment"><file name="cash.phtml" hash="1b226a7e6f65bd591f49345b11b03fac"/><file name="info.phtml" hash="717385b1db73eed01c81e64e8dafb0a6"/><file name="mark.phtml" hash="4eb1668734994184ea2a2f10c9bf8e13"/><file name="success.phtml" hash="1292183b370d80bddf50b67b9b8f13f0"/><file name=".DS_Store" hash="6d26a77bb0aa1f0b0471ffbeb4126011"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="compropago"><dir name="cppayment"><file name="info.phtml" hash="cef0629238404e0441a56af1d072ba82"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Compropago"><file name="composer.json" hash="bf6638c9ddfed8bcdb7596a5e64d1aca"/><file name="composer.lock" hash="e687ae6c45f73765aa985b4743dfba64"/><dir name="vendor"><file name="autoload.php" hash="4595cb94f03a113906186bff4a8b575b"/><dir name="composer"><file name="ClassLoader.php" hash="d925befc389a2a2d5ecb76b81899d775"/><file name="LICENSE" hash="9b01fc9e0129adc080344653fbcbbc0f"/><file name="autoload_classmap.php" hash="57a1800204f81c8bae5e08dd69479854"/><file name="autoload_namespaces.php" hash="35e12c7d76c4a81633bcf547c0e229a9"/><file name="autoload_psr4.php" hash="94c7252625076c04000283666cfd7cc0"/><file name="autoload_real.php" hash="26c81866f019e3fbca597a361e5bd03b"/><file name="autoload_static.php" hash="8d8f3c1b1b7eb4061be818b8be979820"/><file name="installed.json" hash="3c8dab59a5f4c01e4407209e82ff2ef7"/></dir><dir name="compropago"><dir name="php-sdk"><file name="CHANGELOG.md" hash="bbaebfede967523edfa97b0afc17e6c9"/><dir name="CompropagoSdk"><file name="Client.php" hash="f6ca9200cb74dd4e6b0eec21fd7a1d73"/><dir name="Extern"><file name="TransactTables.php" hash="15176b9e3da1da264c8ed3b25bc95b89"/></dir><dir name="Factory"><file name="Factory.php" hash="7b3ee12649eac6fab670d89b6f3ad124"/><dir name="Models"><file name="CpOrderInfo.php" hash="467a5b7234e392046c042d30ca7c887c"/><file name="Customer.php" hash="063820ab5593af6ca1f5651faefd1f7d"/><file name="EvalAuthInfo.php" hash="f20efd78c8444de1319ffcdff6fe17a6"/><file name="FeeDetails.php" hash="abb7dd814c9406c8b3c3140b49603594"/><file name="InstructionDetails.php" hash="f62a708998cb78b5fadf3ba06c7ff499"/><file name="Instructions.php" hash="d791bb0c351ba5527d2c42052d264d49"/><file name="NewOrderInfo.php" hash="e8e7bea0a47c288cf9e1fd50ff1b789b"/><file name="OrderInfo.php" hash="fd9a05922bcdab2e176cd1058688514e"/><file name="PlaceOrderInfo.php" hash="02a127b6f4ae1f5ee193fedfdafca1e3"/><file name="Provider.php" hash="c45d8402bfcc3b67d7767b597ad6bafb"/><file name="SmsData.php" hash="79485fd7121b5220df4ccc913fe1e8d2"/><file name="SmsInfo.php" hash="53b5d46bc67e9ff9e3e0fb6154bd5b12"/><file name="SmsObject.php" hash="ac4a5eb8cf4c22850e89491544b4506d"/><file name="Webhook.php" hash="8e8f101d6ffe2493e3bdfc4cd2290bec"/></dir><file name="Serialize.php" hash="41e68aa6ba77c60adf5c5e373cdd1cc4"/></dir><file name="Service.php" hash="2b5d7a9c62c70d561662e163b0dc5202"/><dir name="Tools"><file name="Http.php" hash="ae5f0911464eedbb3708d26a8ee04fcf"/><file name="Request.php" hash="6f1942e3fae6fc6ca9821b7c693e35d9"/><file name="Validations.php" hash="db3d42e0abc7855012c52126c69d67ff"/><file name="cacerts.pem" hash="a527b93e71b94759d99643641ff3b531"/></dir><dir name="UnitTest"><file name="Test.php" hash="d8ac1827e879ae5b6bb8c9c87c4b5ba1"/><file name="autoload.php" hash="c43ead2675f0fee011d0a56affd871b5"/></dir></dir><file name="LICENSE" hash="abac77493634e3d1c15493847c602b03"/><file name="README.md" hash="8482e8e4fd34ef47c24bfc6f36ff7796"/><file name="composer.json" hash="19cd4efb372eaca1997cefc9b310545c"/><file name=".gitignore" hash="34ac7e14eb103b0316bf4efc1ddb8bc0"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="cppayment"><file name="compropago-logo.png" hash="2a3e98095b5c9df0669b7dc70f0682cd"/><file name="gitmerge.gif" hash="31c57faf2960d93d98e9d39bd71df00b"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="compropago"><file name="compropago.css" hash="5a4b5271ef09e42b63eaeabb73d7d9e8"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="compropago"><file name="compropago.js" hash="ffdf6e940b91554944656fff2cbdb6c5"/></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
-
<dependencies><required><php><min>5.
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Compropago_Payment_Extension</name>
|
4 |
+
<version>2.1.2.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>ComproPago Payment Gateway</summary>
|
10 |
+
<description>Pagos en efectivo en tiendas de conveniencia</description>
|
11 |
+
<notes>* Fixing Providers</notes>
|
12 |
+
<authors><author><name>Eduardo Aguilar</name><user>eduardoay</user><email>eduardo.aguilar@compropago.com</email></author><author><name>Christian Aguirre</name><user>christian8aguirre</user><email>christian@compropago.com</email></author></authors>
|
13 |
+
<date>2017-04-11</date>
|
14 |
+
<time>19:34:24</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Compropago_CpPayment.xml" hash="39b519aeecb171cb993e0ee4e064f29a"/></dir></target><target name="magecommunity"><dir name="Compropago"><dir name="CpPayment"><dir name="Block"><file name="Form.php" hash="fedfa50d8860395445eec7e4def4df7d"/><file name="Info.php" hash="d34706306b26afc91b7b0190edbe73a0"/></dir><dir name="Helper"><file name="Data.php" hash="0ae647f79d66d82cc976408c120fcbb6"/></dir><dir name="Model"><file name="Observer.php" hash="240cb5799b8ed42ff62f7f43e14c648f"/><file name="Providers.php" hash="9574ca518ea2ed5e3dbf07f567285257"/><file name="Standard.php" hash="6a57e173dc4a294b64a5f21125e99903"/></dir><dir name="controllers"><file name="IndexController.php" hash="296a30fd79631eee84865c413eba88d4"/></dir><dir name="etc"><file name="config.xml" hash="52df200ca4eff7a4c7b5aad8dca3e822"/><file name="system.xml" hash="8a96aa67ae243dfb980fefb94066143a"/></dir><dir name="sql"><dir name="cppayment_setup"><file name="install-2.0.0.php" hash="3a1215b9adb72418e27ee6fffd604d73"/><file name="install-2.1.0.php" hash="3a1215b9adb72418e27ee6fffd604d73"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="compropago"><dir name="cppayment"><file name="info.phtml" hash="cef0629238404e0441a56af1d072ba82"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cppayment.xml" hash="aadfc4eed58b61274c257d022363e0bb"/></dir><dir name="template"><dir name="compropago"><dir name="cppayment"><file name="cash.phtml" hash="f100a9584be4cc0cd7f5a9de7f35ee00"/><file name="info.phtml" hash="717385b1db73eed01c81e64e8dafb0a6"/><file name="mark.phtml" hash="4eb1668734994184ea2a2f10c9bf8e13"/><file name="success.phtml" hash="1292183b370d80bddf50b67b9b8f13f0"/><file name=".DS_Store" hash="6d26a77bb0aa1f0b0471ffbeb4126011"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="compropago"><file name="compropago.js" hash="ffdf6e940b91554944656fff2cbdb6c5"/></dir></dir></target><target name="magelib"><dir name="Compropago"><file name="composer.json" hash="bf6638c9ddfed8bcdb7596a5e64d1aca"/><file name="composer.lock" hash="a0a2093b8d9044e1fa6fe4fa1b7e41e7"/><dir name="vendor"><file name="autoload.php" hash="8570695b211c779dba07dd6a2c07be3b"/><dir name="composer"><file name="ClassLoader.php" hash="d925befc389a2a2d5ecb76b81899d775"/><file name="LICENSE" hash="9b01fc9e0129adc080344653fbcbbc0f"/><file name="autoload_classmap.php" hash="07846ed23a0f5d3faa8d72a48d50e89c"/><file name="autoload_namespaces.php" hash="35e12c7d76c4a81633bcf547c0e229a9"/><file name="autoload_psr4.php" hash="94c7252625076c04000283666cfd7cc0"/><file name="autoload_real.php" hash="246736bc78177bb6b76761ca8d555228"/><file name="autoload_static.php" hash="77d190713c337e2a0068b4889be056cd"/><file name="installed.json" hash="94f41624ca9ee66445e5c0cf2bed8819"/></dir><dir name="compropago"><dir name="php-sdk"><file name="CHANGELOG.md" hash="bbaebfede967523edfa97b0afc17e6c9"/><dir name="CompropagoSdk"><file name="Client.php" hash="0dc58113b889f9646be290251357f6a2"/><dir name="Extern"><file name="TransactTables.php" hash="562a011e9c460131f3db8949744c6234"/></dir><dir name="Factory"><file name="Factory.php" hash="eb741f422a6abc7731787abba202d776"/><dir name="Models"><file name="CpOrderInfo.php" hash="5913e6adaf32b974f6048ececb0b64cc"/><file name="Customer.php" hash="063820ab5593af6ca1f5651faefd1f7d"/><file name="EvalAuthInfo.php" hash="f20efd78c8444de1319ffcdff6fe17a6"/><file name="Exchange.php" hash="6ea4dff1aa9686a68580c370926b9bad"/><file name="FeeDetails.php" hash="abb7dd814c9406c8b3c3140b49603594"/><file name="InstructionDetails.php" hash="f62a708998cb78b5fadf3ba06c7ff499"/><file name="Instructions.php" hash="d791bb0c351ba5527d2c42052d264d49"/><file name="NewOrderInfo.php" hash="5cba9b129567b0e8430f7a2de845e526"/><file name="OrderInfo.php" hash="1a8331117aff23655230a1e483271ea2"/><file name="PlaceOrderInfo.php" hash="054e6d46c5ac9783a91dbdcaff24d978"/><file name="Provider.php" hash="3d337431ed60cded52053b120bd793a2"/><file name="SmsData.php" hash="79485fd7121b5220df4ccc913fe1e8d2"/><file name="SmsInfo.php" hash="53b5d46bc67e9ff9e3e0fb6154bd5b12"/><file name="SmsObject.php" hash="ac4a5eb8cf4c22850e89491544b4506d"/><file name="Webhook.php" hash="8e8f101d6ffe2493e3bdfc4cd2290bec"/></dir><file name="Serialize.php" hash="72563586862511c363c0c0cf38c3182a"/></dir><file name="Service.php" hash="3d36dec2e3fb0d756edfed1e17ebf3c8"/><dir name="Tools"><file name="Http.php" hash="ae5f0911464eedbb3708d26a8ee04fcf"/><file name="Request.php" hash="6f1942e3fae6fc6ca9821b7c693e35d9"/><file name="Validations.php" hash="db3d42e0abc7855012c52126c69d67ff"/><file name="cacerts.pem" hash="a527b93e71b94759d99643641ff3b531"/></dir><dir name="UnitTest"><file name="Test.php" hash="c7d75c6edbedadc836e3ffb935f976ea"/><file name="autoload.php" hash="8d0f9e165df15f4e81541e976af3d0f1"/></dir></dir><file name="LICENSE" hash="abac77493634e3d1c15493847c602b03"/><file name="README.md" hash="bdbdb17b5b905b9f6af904b07ba7e0e1"/><file name="composer.json" hash="495a25c62fd7a965ce220d473cb6ce5c"/><file name=".gitignore" hash="34ac7e14eb103b0316bf4efc1ddb8bc0"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="cppayment"><file name="compropago-logo.png" hash="2a3e98095b5c9df0669b7dc70f0682cd"/><file name="gitmerge.gif" hash="31c57faf2960d93d98e9d39bd71df00b"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="compropago"><file name="compropago.css" hash="5a4b5271ef09e42b63eaeabb73d7d9e8"/></dir></dir></dir></dir></target></contents>
|
|
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.4.0</min><max>8.0.0</max></php></required></dependencies>
|
18 |
</package>
|