@@ -195,9 +195,11 @@ public function index()
195
195
}
196
196
197
197
protected function convertCurrency ($ amount ) {
198
- $ currency = $ this ->session ->data ['currency ' ];
199
- $ configCurrency = $ this ->config ->get ("config_currency " );
200
- return $ this ->currency ->convert ($ amount , $ configCurrency , $ currency );
198
+ $ currency = Util::load ()->model ("localisation/currency " );
199
+ $ currencies = $ currency ->getCurrencies ();
200
+ $ convertedAmount = $ amount * $ currencies [$ this ->session ->data ['currency ' ]]['value ' ];
201
+
202
+ return $ convertedAmount ;
201
203
}
202
204
203
205
//Format text
@@ -231,7 +233,6 @@ public function payment()
231
233
$ order = $ this ->getOpenCartOrder ($ order_id );
232
234
233
235
$ currency = $ this ->session ->data ['currency ' ];
234
- $ currency_value = $ this ->currency ->getValue ($ this ->session ->data ['currency ' ]);
235
236
$ amount = $ this ->convertCurrency ($ order ['total ' ]);
236
237
$ description = str_replace ("% " , $ order ['order_id ' ], html_entity_decode ($ this ->config ->get (MollieHelper::getModuleCode () . "_ideal_description " ), ENT_QUOTES , "UTF-8 " ));
237
238
$ return_url = $ this ->url ->link ("payment/mollie_ " . static ::MODULE_NAME . "/callback&order_id= " . $ order ['order_id ' ], "" , "SSL " );
@@ -315,9 +316,9 @@ public function payment()
315
316
//Check if coupon applied
316
317
if (isset ($ this ->session ->data ['coupon ' ])) {
317
318
//Get coupon data
318
- $ this -> load ->model ('extension/total/coupon ' );
319
+ $ coupon = Util:: load () ->model ('extension/total/coupon ' );
319
320
320
- $ coupon_info = $ this -> model_extension_total_coupon ->getCoupon ($ this ->session ->data ['coupon ' ]);
321
+ $ coupon_info = $ coupon ->getCoupon ($ this ->session ->data ['coupon ' ]);
321
322
322
323
if ($ coupon_info ) {
323
324
$ discount_total = 0 ;
0 commit comments