-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from MultiSafepay/release/1.6.0
Release of 1.6.0
- Loading branch information
Showing
22 changed files
with
479 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0"?> | ||
|
||
<addon scheme='3.0'> | ||
<id>multisafepay</id> | ||
<version>1.0</version> | ||
<name>MultiSafepay</name> | ||
<description>MultiSafepay</description> | ||
<priority>100500</priority> | ||
<status>active</status> | ||
<auto_install>PROFESSIONAL,MULTIVENDOR,ULTIMATE</auto_install> | ||
</addon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
if (!defined('BOOTSTRAP')) { die('Access denied'); } | ||
|
||
require_once(__DIR__ . '/../../payments/MultiSafepay.combined.php'); | ||
|
||
/** | ||
* Called after new shipment creation. | ||
* | ||
* @param array $shipment_data Array of shipment data. | ||
* @param array $order_info Shipment order info | ||
* @param int $group_key Group number | ||
* @param bool $all_products | ||
* @param int $shipment_id Created shipment identifier | ||
*/ | ||
function fn_multisafepay_create_shipment_post($shipment_data, $order_info, $group_key, $all_products, $shipment_id) | ||
{ | ||
// Only continue if in the Admin and order is processed by MultiSafepay | ||
if (AREA !== 'A' || empty($shipment_data) || !fn_is_multisafepay_order($order_info)) { | ||
return; | ||
} | ||
|
||
$processor_params = $order_info['payment_method']['processor_params']; | ||
|
||
$msp = new MultiSafepay(); | ||
$msp->test = $processor_params['mode'] === 'T'; | ||
$msp->merchant['account_id'] = $processor_params['account']; | ||
$msp->merchant['site_id'] = $processor_params['site_id']; | ||
$msp->merchant['site_code'] = $processor_params['securitycode']; | ||
$msp->transaction['id'] = $shipment_data['order_id']; | ||
$msp->transaction['status'] = 'shipped'; | ||
$msp->transaction['tracktracecode'] = $shipment_data['tracking_number']; | ||
$msp->transaction['reason'] = $shipment_data['comments']; | ||
$msp->transaction['carrier'] = $shipment_data['carrier']; | ||
$msp->transaction['shipdate'] = date("Y-m-d", $shipment_data['timestamp']); | ||
|
||
$msp->updateTransaction(); | ||
} | ||
|
||
function fn_is_multisafepay_order($order_info) | ||
{ | ||
if (empty($order_info)) { | ||
return false; | ||
} | ||
return strncmp($order_info['payment_method']['processor'], 'MultiSafepay', 12) === 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
if (!defined('BOOTSTRAP')) { die('Access denied'); } | ||
|
||
fn_register_hooks('create_shipment_post'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade the MultiSafepay plugin | ||
* to newer versions in the future. If you wish to customize the plugin for your | ||
* needs please document your changes and make backups before you update. | ||
* | ||
* @category MultiSafepay | ||
* @package Connect | ||
* @author MultiSafepay <integration@multisafepay.com> | ||
* @copyright Copyright (c) MultiSafepay, Inc. (https://www.multisafepay.com) | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
require_once('multisafepay.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/** | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade the MultiSafepay plugin | ||
* to newer versions in the future. If you wish to customize the plugin for your | ||
* needs please document your changes and make backups before you update. | ||
* | ||
* @category MultiSafepay | ||
* @package Connect | ||
* @author TechSupport <techsupport@multisafepay.com> | ||
* @copyright Copyright (c) 2018 MultiSafepay, Inc. (https://www.multisafepay.com) | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
require_once('multisafepay.php'); | ||
?> |
Empty file.
Empty file.
Oops, something went wrong.