Skip to content

Commit 2f76934

Browse files
author
Dat Pham
committed
Fix bug Payment error
1 parent 0073fdd commit 2f76934

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

src/lemonway/classes/SplitpaymentDeadline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public function pay($update = false)
188188
$invoiceCollection->orderBy('date_add')->setPageNumber(1)->setPageSize(1)->getFirst();
189189

190190
$order->addOrderPayment(
191-
$this->amount_to_pay,
191+
$hpay->CRED + $hpay->COM,
192192
$methodInstance->getTitle(),
193193
$hpay->ID,
194194
null,

src/lemonway/controllers/front/redirect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public function postProcess()
322322
$this->module->validateOrder(
323323
$cart->id, // $id_cart
324324
$id_order_state, // $id_order_state
325-
$hpay->CRED, // Amount really paid by customer (in the default currency)
325+
$hpay->CRED + $hpay->COM, // Amount really paid by customer (in the default currency)
326326
$methodInstance->getTitle(), // Payment method (eg. 'Credit card')
327327
$hpay->MSG, // Message to attach to order
328328
array("transaction_id" => $hpay->ID), // $extra_vars
@@ -356,7 +356,7 @@ public function postProcess()
356356

357357
// Add order payment
358358
$order->addOrderPayment(
359-
$hpay->CRED, // $amount_paid
359+
$hpay->CRED + $hpay->COM, // $amount_paid
360360
null, // $payment_method
361361
$hpay->ID, // $payment_transaction_id
362362
null, // $currency

src/lemonway/controllers/front/validation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function postProcess()
242242
$this->module->validateOrder(
243243
$cart->id, // $id_cart
244244
$id_order_state, // $id_order_state
245-
$hpay->CRED, // Amount really paid by customer (in the default currency)
245+
$hpay->CRED + $hpay->COM, // Amount really paid by customer (in the default currency)
246246
$methodInstance->getTitle(), // Payment method (eg. 'Credit card')
247247
$message, // Message to attach to order
248248
array("transaction_id" => $hpay->ID), // $extra_vars
@@ -276,7 +276,7 @@ public function postProcess()
276276

277277
// Add order payment
278278
$order->addOrderPayment(
279-
$hpay->CRED, // $amount_paid
279+
$hpay->CRED + $hpay->COM, // $amount_paid
280280
null, // $payment_method
281281
$hpay->ID, // $payment_transaction_id
282282
null, // $currency

src/lemonway/lemonway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function __construct()
9191
{
9292
$this->name = 'lemonway';
9393
$this->tab = 'payments_gateways';
94-
$this->version = '1.4.1';
94+
$this->version = '1.4.2';
9595
$this->author = 'Lemon Way';
9696
$this->need_instance = 0;
9797

src/lemonway/services/LemonWayKit.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ private static function accessConfig()
3131
{
3232
return array(
3333
'directKitUrl' => LemonWayConfig::getDirectkitUrl(),
34-
'webkitUrl' => LemonWayConfig::getWebkitUrl(),
35-
'isTestMode' => LemonWayConfig::isTestMode(),
3634
'wlLogin' => LemonWayConfig::getApiLogin(),
3735
'wlPass' => LemonWayConfig::getApiPassword(),
3836
'language' => 'en'
@@ -90,7 +88,7 @@ private function sendRequest($methodName, $params)
9088
$baseParams = array(
9189
'wlLogin' => $accessConfig['wlLogin'],
9290
'wlPass' => $accessConfig['wlPass'],
93-
'language' => 'fr',
91+
'language' => $accessConfig['language'],
9492
'version' => '10.0',
9593
'walletIp' => $ip,
9694
'walletUa' => $ua,

0 commit comments

Comments
 (0)