From 210a4a5993e1f8afc4cdf18137e03a20ed8385bd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 23 Sep 2021 15:34:20 +1000 Subject: [PATCH] Turning on token billing for PayFast --- app/PaymentDrivers/PayFast/Token.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/PayFast/Token.php b/app/PaymentDrivers/PayFast/Token.php index 367c6e6b9f..0078aa9e4e 100644 --- a/app/PaymentDrivers/PayFast/Token.php +++ b/app/PaymentDrivers/PayFast/Token.php @@ -86,11 +86,11 @@ class Token $body = [ 'amount' => $amount, 'item_name' => 'purchase', - // 'item_description' => ctrans('texts.invoices') . ': ' . collect($payment_hash->invoices())->pluck('invoice_number'), + 'item_description' => ctrans('texts.invoices') . ': ' . collect($payment_hash->invoices())->pluck('invoice_number'), 'm_payment_id' => $payment_hash->hash, ]; - $header['signature'] = $this->generate_parameter_string(array_merge($header, $body)); + $header['signature'] = md5( $this->generate_parameter_string(array_merge($header, $body)) ); $result = $this->send($header, $body, $cgt->token); @@ -168,7 +168,9 @@ class Token $parameter_string = rtrim( $parameter_string, '&' ); } - return md5( $parameter_string ); + nlog($parameter_string); + + return $parameter_string; }