Skip to content

Instantly share code, notes, and snippets.

@Rudis1261
Created July 15, 2015 14:57
Show Gist options
  • Save Rudis1261/f3297358a8f48a34f9df to your computer and use it in GitHub Desktop.
Save Rudis1261/f3297358a8f48a34f9df to your computer and use it in GitHub Desktop.
Just creating a quick test to ensure that a float gets converted to the correct INT value expected by SnapScan
<?php
$amount = (!empty($_GET['amount'])) ? $_GET['amount'] : 50;
$amount = $amount * 100;
$amount = (int)$amount;
$merchant = (!empty($_GET['merchant'])) ? $_GET['merchant'] : 'snapTest';
header("location:https://pos.snapscan.io/qr/{$merchant}?amount={$amount}&id=TestingTheAccount&strict=true");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment