Skip to content

Commit

Permalink
Fix bug Payment error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dat Pham committed Sep 28, 2018
1 parent 0073fdd commit 2f76934
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lemonway/classes/SplitpaymentDeadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function pay($update = false)
$invoiceCollection->orderBy('date_add')->setPageNumber(1)->setPageSize(1)->getFirst();

$order->addOrderPayment(
$this->amount_to_pay,
$hpay->CRED + $hpay->COM,
$methodInstance->getTitle(),
$hpay->ID,
null,
Expand Down
4 changes: 2 additions & 2 deletions src/lemonway/controllers/front/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public function postProcess()
$this->module->validateOrder(
$cart->id, // $id_cart
$id_order_state, // $id_order_state
$hpay->CRED, // Amount really paid by customer (in the default currency)
$hpay->CRED + $hpay->COM, // Amount really paid by customer (in the default currency)
$methodInstance->getTitle(), // Payment method (eg. 'Credit card')
$hpay->MSG, // Message to attach to order
array("transaction_id" => $hpay->ID), // $extra_vars
Expand Down Expand Up @@ -356,7 +356,7 @@ public function postProcess()

// Add order payment
$order->addOrderPayment(
$hpay->CRED, // $amount_paid
$hpay->CRED + $hpay->COM, // $amount_paid
null, // $payment_method
$hpay->ID, // $payment_transaction_id
null, // $currency
Expand Down
4 changes: 2 additions & 2 deletions src/lemonway/controllers/front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function postProcess()
$this->module->validateOrder(
$cart->id, // $id_cart
$id_order_state, // $id_order_state
$hpay->CRED, // Amount really paid by customer (in the default currency)
$hpay->CRED + $hpay->COM, // Amount really paid by customer (in the default currency)
$methodInstance->getTitle(), // Payment method (eg. 'Credit card')
$message, // Message to attach to order
array("transaction_id" => $hpay->ID), // $extra_vars
Expand Down Expand Up @@ -276,7 +276,7 @@ public function postProcess()

// Add order payment
$order->addOrderPayment(
$hpay->CRED, // $amount_paid
$hpay->CRED + $hpay->COM, // $amount_paid
null, // $payment_method
$hpay->ID, // $payment_transaction_id
null, // $currency
Expand Down
2 changes: 1 addition & 1 deletion src/lemonway/lemonway.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct()
{
$this->name = 'lemonway';
$this->tab = 'payments_gateways';
$this->version = '1.4.1';
$this->version = '1.4.2';
$this->author = 'Lemon Way';
$this->need_instance = 0;

Expand Down
4 changes: 1 addition & 3 deletions src/lemonway/services/LemonWayKit.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ private static function accessConfig()
{
return array(
'directKitUrl' => LemonWayConfig::getDirectkitUrl(),
'webkitUrl' => LemonWayConfig::getWebkitUrl(),
'isTestMode' => LemonWayConfig::isTestMode(),
'wlLogin' => LemonWayConfig::getApiLogin(),
'wlPass' => LemonWayConfig::getApiPassword(),
'language' => 'en'
Expand Down Expand Up @@ -90,7 +88,7 @@ private function sendRequest($methodName, $params)
$baseParams = array(
'wlLogin' => $accessConfig['wlLogin'],
'wlPass' => $accessConfig['wlPass'],
'language' => 'fr',
'language' => $accessConfig['language'],
'version' => '10.0',
'walletIp' => $ip,
'walletUa' => $ua,
Expand Down

0 comments on commit 2f76934

Please sign in to comment.