Freightos Payment

 

Order details

[insert_php]
$orderId = $_REQUEST[‘order’];
$amount = $_REQUEST[‘amount’]/100;
$FF = $_REQUEST[‘ff’];
$currency = $_REQUEST[‘currency’];
$symbol = “$”;

if(isset($currency)){
switch ($currency){
case “USD”:
$symbol = “$”;
break;
case “GBP”:
$symbol = “£”;
break;
case “EUR”:
$symbol = “€”;
break;
default: $symbol = $currency;
}
}else{
$currency = “USD”;
}

if(isset($orderId)){
echo “Payment for order: #”.$orderId.”
“;
}

if(isset($amount)){
echo “Order total amount: “.$symbol.” “.number_format($amount,2).”
“;
}

if(isset($FF)){
echo “Ordered from: “.$FF.”
“;
}

[/insert_php]

Payment Summary


[insert_php]
$orderTotal = $_REQUEST[“amount”];
$rate = 0.02;

if(isset($_REQUEST[“rate”])) {
$rate = $_REQUEST[“rate”] /100;
}

$commission = $orderTotal * $rate /100;
$orderPlus = $orderTotal * (1 + $rate) / 100;
[/insert_php]

Order total:[insert_php] echo $symbol.” “.number_format($orderTotal/100, 2); [/insert_php]
Platform fee ([insert_php]echo $rate*100; [/insert_php]%):[insert_php] echo $symbol.” “.number_format($commission, 2); [/insert_php]
Grand total:[insert_php] echo $symbol.” “.number_format($orderPlus, 2); [/insert_php]

[stripe name=”Freightos” description=”Payment for order [insert_php]echo $orderId;[/insert_php]” amount=”[insert_php]echo floor($orderPlus * 100);[/insert_php]” currency=”[insert_php]echo $currency;[/insert_php]”  email=”[insert_php]echo $_REQUEST[“email”];[/insert_php]” enable_remember=”false”]