Skip to content

Commit

Permalink
Remove comma formatting on numbers over 999.99
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-UKDM committed Feb 25, 2019
1 parent b35a01e commit 4caf087
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Unidays/tracking-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private function generate_query()

private function url_encode_number($number)
{
return urlencode(number_format($number, 2, '.', ','));
return urlencode(number_format($number, 2, '.', ''));
}

private function parse_boolean($bool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function initialise()
$details->withItemsTax(34.50);
$details->withShippingGross(5.00);
$details->withShippingDiscount(3.00);
$details->withItemsGross(230.00);
$details->withItemsGross(1000.00);
$details->withItemsOtherDiscount(10.00);
$details->withUnidaysDiscountPercentage(10.00);
$details->withNewCustomer(true);
Expand Down Expand Up @@ -67,7 +67,7 @@ public function ThePathShouldBeV1_2RedemptionJs()
* ["ItemsTax", "34.50"]
* ["ShippingGross", "5.00"]
* ["ShippingDiscount", "3.00"]
* ["ItemsGross", "230.00"]
* ["ItemsGross", "1000.00"]
* ["ItemsOtherDiscount", "10.00"]
* ["UNiDAYSDiscountPercentage", "10.00"]
* ["NewCustomer", "True"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function initialise()
$details->withItemsTax(34.50);
$details->withShippingGross(5.00);
$details->withShippingDiscount(3.00);
$details->withItemsGross(230.00);
$details->withItemsGross(1000.00);
$details->withItemsOtherDiscount(10.00);
$details->withUnidaysDiscountPercentage(10.00);
$details->withNewCustomer(true);
Expand Down Expand Up @@ -69,11 +69,11 @@ public function ThePathShouldBeV1_2Redemption()
* ["ItemsTax", "34.50"]
* ["ShippingGross", "5.00"]
* ["ShippingDiscount", "3.00"]
* ["ItemsGross", "230.00"]
* ["ItemsGross", "1000.00"]
* ["ItemsOtherDiscount", "10.00"]
* ["UNiDAYSDiscountPercentage", "10.00"]
* ["NewCustomer", "True"]
* ["Signature", "VsP++N2PQ7Jy/hH6wjkVcGRLRkqpyBFyZPCLW7u0UYuXiYvBlggi4SgCQ1GPs5mg3JswBYms8qTwRehFpWhhAg=="]
* ["Signature", "fx9sLAiZC+a+dvUcOFNhu4Ja31EgaX17m99y/m5BjlKS3NCMBbMouNPJ7MZCHqIUN0x66yz1z3Q5OB57vT7cgQ=="]
*/
public function TheParameterShouldBeCorrect($parameter, $result)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function initialise()
$details->withItemsTax(34.50);
$details->withShippingGross(5.00);
$details->withShippingDiscount(3.00);
$details->withItemsGross(230.00);
$details->withItemsGross(1000.00);
$details->withItemsOtherDiscount(10.00);
$details->withUnidaysDiscountPercentage(10.00);
$details->withNewCustomer(true);
Expand Down Expand Up @@ -69,11 +69,11 @@ public function ThePathShouldBeV1_2RedemptionJs()
* ["ItemsTax", "34.50"]
* ["ShippingGross", "5.00"]
* ["ShippingDiscount", "3.00"]
* ["ItemsGross", "230.00"]
* ["ItemsGross", "1000.00"]
* ["ItemsOtherDiscount", "10.00"]
* ["UNiDAYSDiscountPercentage", "10.00"]
* ["NewCustomer", "True"]
* ["Signature", "c6sNwe3kcvr3/NYH+661/37BSP1RFIgrJ2LJ5e3ETOTD0kPBb6gzqvR8uEhFEJaksfBxy9Ct/rrn9/8fH0tuQQ=="]
* ["Signature", "CJUr1kkv/426vsLQPGYlrt08xhkQ20ySx7262oGxRFFWbr7190A5Obalm6D67A45efC/MJAkGQeUgQjzIWXbZA=="]
*/
public function TheParameterShouldBeCorrect($parameter, $result)
{
Expand Down

0 comments on commit 4caf087

Please sign in to comment.