Skip to content

Commit 4caf087

Browse files
committed
Remove comma formatting on numbers over 999.99
1 parent b35a01e commit 4caf087

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Unidays/tracking-helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function generate_query()
9898

9999
private function url_encode_number($number)
100100
{
101-
return urlencode(number_format($number, 2, '.', ','));
101+
return urlencode(number_format($number, 2, '.', ''));
102102
}
103103

104104
private function parse_boolean($bool)

test/Unidays/TrackingHelperTests/WhenRequestingAScriptUrlWithAllParamsSetTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function initialise()
1515
$details->withItemsTax(34.50);
1616
$details->withShippingGross(5.00);
1717
$details->withShippingDiscount(3.00);
18-
$details->withItemsGross(230.00);
18+
$details->withItemsGross(1000.00);
1919
$details->withItemsOtherDiscount(10.00);
2020
$details->withUnidaysDiscountPercentage(10.00);
2121
$details->withNewCustomer(true);
@@ -67,7 +67,7 @@ public function ThePathShouldBeV1_2RedemptionJs()
6767
* ["ItemsTax", "34.50"]
6868
* ["ShippingGross", "5.00"]
6969
* ["ShippingDiscount", "3.00"]
70-
* ["ItemsGross", "230.00"]
70+
* ["ItemsGross", "1000.00"]
7171
* ["ItemsOtherDiscount", "10.00"]
7272
* ["UNiDAYSDiscountPercentage", "10.00"]
7373
* ["NewCustomer", "True"]

test/Unidays/TrackingHelperTests/WhenRequestingAServerUrlWithAllParamsSetTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function initialise()
1515
$details->withItemsTax(34.50);
1616
$details->withShippingGross(5.00);
1717
$details->withShippingDiscount(3.00);
18-
$details->withItemsGross(230.00);
18+
$details->withItemsGross(1000.00);
1919
$details->withItemsOtherDiscount(10.00);
2020
$details->withUnidaysDiscountPercentage(10.00);
2121
$details->withNewCustomer(true);
@@ -69,11 +69,11 @@ public function ThePathShouldBeV1_2Redemption()
6969
* ["ItemsTax", "34.50"]
7070
* ["ShippingGross", "5.00"]
7171
* ["ShippingDiscount", "3.00"]
72-
* ["ItemsGross", "230.00"]
72+
* ["ItemsGross", "1000.00"]
7373
* ["ItemsOtherDiscount", "10.00"]
7474
* ["UNiDAYSDiscountPercentage", "10.00"]
7575
* ["NewCustomer", "True"]
76-
* ["Signature", "VsP++N2PQ7Jy/hH6wjkVcGRLRkqpyBFyZPCLW7u0UYuXiYvBlggi4SgCQ1GPs5mg3JswBYms8qTwRehFpWhhAg=="]
76+
* ["Signature", "fx9sLAiZC+a+dvUcOFNhu4Ja31EgaX17m99y/m5BjlKS3NCMBbMouNPJ7MZCHqIUN0x66yz1z3Q5OB57vT7cgQ=="]
7777
*/
7878
public function TheParameterShouldBeCorrect($parameter, $result)
7979
{

test/Unidays/TrackingHelperTests/WhenRequestingASignedScriptUrlWithAllParamsSetTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function initialise()
1515
$details->withItemsTax(34.50);
1616
$details->withShippingGross(5.00);
1717
$details->withShippingDiscount(3.00);
18-
$details->withItemsGross(230.00);
18+
$details->withItemsGross(1000.00);
1919
$details->withItemsOtherDiscount(10.00);
2020
$details->withUnidaysDiscountPercentage(10.00);
2121
$details->withNewCustomer(true);
@@ -69,11 +69,11 @@ public function ThePathShouldBeV1_2RedemptionJs()
6969
* ["ItemsTax", "34.50"]
7070
* ["ShippingGross", "5.00"]
7171
* ["ShippingDiscount", "3.00"]
72-
* ["ItemsGross", "230.00"]
72+
* ["ItemsGross", "1000.00"]
7373
* ["ItemsOtherDiscount", "10.00"]
7474
* ["UNiDAYSDiscountPercentage", "10.00"]
7575
* ["NewCustomer", "True"]
76-
* ["Signature", "c6sNwe3kcvr3/NYH+661/37BSP1RFIgrJ2LJ5e3ETOTD0kPBb6gzqvR8uEhFEJaksfBxy9Ct/rrn9/8fH0tuQQ=="]
76+
* ["Signature", "CJUr1kkv/426vsLQPGYlrt08xhkQ20ySx7262oGxRFFWbr7190A5Obalm6D67A45efC/MJAkGQeUgQjzIWXbZA=="]
7777
*/
7878
public function TheParameterShouldBeCorrect($parameter, $result)
7979
{

0 commit comments

Comments
 (0)