Skip to content

Commit 04bb00e

Browse files
committed
code improvement
1 parent b265686 commit 04bb00e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Services/Qris.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public function createDynamic()
3030
'transactionNo' => (string) $this->getTransactionNo(),
3131
'referenceNo' => (string) $this->getReferenceNo(),
3232
'amount' => (int) $this->getAmount(),
33-
'validTime' => (int) $this->getValidTime(3600), // seconds
33+
'validTime' => (int) $this->getValidTime(3600), // in seconds
3434
'storeName' => (string) $this->getStoreName(),
3535
'cityName' => (string) $this->getCityName(),
3636
];
3737

38-
$content['signature'] = md5(implode('', $content).$config['secret_key']);
38+
$content['signature'] = md5(implode('', array_values($content)) . $config['secret_key']);
3939

4040
$this->client->setRequestRawPayload($content);
4141

@@ -66,7 +66,7 @@ public function createDynamicWithoutTip()
6666
'cityName' => (string) $this->getCityName(),
6767
];
6868

69-
$content['signature'] = md5(implode('', $content).$config['secret_key']);
69+
$content['signature'] = md5(implode('', array_values($content)) . $config['secret_key']);
7070

7171
$this->client->setRequestRawPayload($content);
7272

@@ -92,7 +92,7 @@ public function paymentStatus()
9292
'transactionNo' => (string) $this->getTransactionNo()
9393
];
9494

95-
$content['signature'] = md5(implode('', $content).$config['secret_key']);
95+
$content['signature'] = md5(implode('', array_values($content)) . $config['secret_key']);
9696

9797
$this->client->setRequestRawPayload($content);
9898

@@ -124,7 +124,7 @@ public function refund()
124124
'retrievalReferenceNo' => (string) $this->getRetrievalReferenceNo(),
125125
];
126126

127-
$content['signature'] = md5(implode('', $content).$config['secret_key']);
127+
$content['signature'] = md5(implode('', array_values($content)) . $config['secret_key']);
128128

129129
$this->client->setRequestRawPayload($content);
130130

@@ -152,7 +152,7 @@ public function cancel()
152152
'qrisData' => (string) $this->getQrisData(),
153153
];
154154

155-
$content['signature'] = md5(implode('', $content) . $config['secret_key']);
155+
$content['signature'] = md5(implode('', array_values($content)) . $config['secret_key']);
156156

157157
$this->client->setRequestRawPayload($content);
158158

0 commit comments

Comments
 (0)