Skip to content

Commit

Permalink
store amount upto 2 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
gdhar67 authored Jun 11, 2018
1 parent a444fb5 commit 82278d7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/agate.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,18 @@ function plgVmConfirmedOrder($cart, $order)
// agatelog(print_r( $order, true ));

$redirect_url = (JROUTE::_ (JURI::root () . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . JRequest::getInt ('Itemid')));
$order_total = $order['details']['BT']->order_total;
$order_total = number_format((float)$order['details']['BT']->order_total, 2, '.', '');
$baseUri = "http://gateway.agate.services/" ;
$convertUrl = "http://gateway.agate.services/convert/";
$api_key = $method->merchant_apikey;
$currencySymbol = $currency_code_3;

agatelog("Entered Confirm payment.....");

// Convert amount to IUSD
$amount_iUSD = convertCurToIUSD($convertUrl, $order_total, $api_key, $currencySymbol);

// Redirecting user for the payment
agatelog("Entered Confirm payment.....");

// Convert amount to IUSD
$amount_iUSD = convertCurToIUSD($convertUrl, $order_total, $api_key, $currencySymbol);

// Redirecting user for the payment
redirectPayment($baseUri, $amount_iUSD, $order_total, $currencySymbol, $api_key, $redirect_url);

exit;
Expand Down

0 comments on commit 82278d7

Please sign in to comment.