Skip to content

Commit 551caad

Browse files
committed
Fix samdays - on version v1.4.30
1 parent ffcfcd3 commit 551caad

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

1.7.7/mobilpay_cc/controllers/front/betavalidation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ public function postProcess()
9595
$IpnOrderIdParts = explode('#', $objPmReq->orderId);
9696
$realOrderId = intval($IpnOrderIdParts[0]);
9797
$lockerId = intval($IpnOrderIdParts[1]);
98+
$lockerName = strval($IpnOrderIdParts[2]);
99+
$lockerAddress = strval($IpnOrderIdParts[3]);
98100
$cart = new Cart($realOrderId);
99101
$customer = new Customer((int)$cart->id_customer);
100102

@@ -141,7 +143,7 @@ public function postProcess()
141143
*/
142144

143145
if($order_id > 0) {
144-
$sql = "INSERT INTO "._DB_PREFIX_."sameday_order_locker ( id_order, id_locker ) values( '$order_id', '$lockerId' )";
146+
$sql = "INSERT INTO "._DB_PREFIX_."sameday_order_locker ( id_order, id_locker, address_locker, name_locker ) values( '$order_id', '$lockerId', '$lockerAddress', '$lockerName' )";
145147
Db::getInstance()->execute($sql);
146148
}
147149
}

1.7.7/mobilpay_cc/mobilpay_cc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,16 @@ public function hookPaymentOptions($params)
398398

399399
try {
400400
/**
401-
* Locker ID
401+
* Locker Info
402402
*/
403403
$lockerId = (int)isset($_COOKIE['samedaycourier_locker_id']) ? $_COOKIE['samedaycourier_locker_id'] : 0;
404+
$lockerName = (int)isset($_COOKIE['samedaycourier_locker_name']) ? $_COOKIE['samedaycourier_locker_name'] : null;
405+
$lockerAddress = (int)isset($_COOKIE['samedaycourier_locker_address']) ? $_COOKIE['samedaycourier_locker_address'] : null;
404406

405407
$objPmReqCard = new Mobilpay_Payment_Request_Card();
406408
$objPmReqCard->signature = Configuration::get('MPCC_SIGNATURE');
407409

408-
$objPmReqCard->orderId = intval($params['cart']->id) . '#' .$lockerId.'#'. time();
410+
$objPmReqCard->orderId = intval($params['cart']->id) . '#' .$lockerId.'#'.$lockerName.'#' .$lockerAddress.'#'. time();
409411
$objPmReqCard->returnUrl = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT,'UTF-8') . __PS_BASE_URI__ . 'index.php?controller=order-confirmation?key=' . $customer->secure_key . '&id_cart=' . intval($params['cart']->id) . '&id_module=' . intval($this->id);
410412

411413

0 commit comments

Comments
 (0)