Skip to content

Commit 3086492

Browse files
committed
- [X] Fix KWD Sign calculation issue
1 parent 300a8c7 commit 3086492

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Tap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Tap
4343
// @var float Initial delay between retries, in seconds
4444
private static $initialNetworkRetryDelay = 0.5;
4545

46-
const VERSION = '1.0.8';
46+
const VERSION = '2.1.0';
4747

4848
/**
4949
* @return mixed

lib/WebhookSignature.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ private static function generateSignature($payload)
102102
$object = $payload['object'];
103103

104104
$id = $payload['id'];
105-
$amount = number_format($payload['amount'], 2);
106105
$currency = $payload['currency'];
106+
$amount = number_format($payload['amount'], $currency == 'KWD' ? 3 : 2);
107107
$gateway_reference = $payload['reference']['gateway'];
108108
$payment_reference = $payload['reference']['payment'];
109109
$updated = $payload['updated'] ?? null;

0 commit comments

Comments
 (0)