From 1e03070e9e31f697ed769196ca1206f77e0f03b2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 10 Jul 2021 16:39:14 +1000 Subject: [PATCH] Minor fixes for Payfast --- app/PaymentDrivers/PayFast/Token.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/PayFast/Token.php b/app/PaymentDrivers/PayFast/Token.php index d1557b9d68..a7397cdddd 100644 --- a/app/PaymentDrivers/PayFast/Token.php +++ b/app/PaymentDrivers/PayFast/Token.php @@ -78,7 +78,7 @@ class Token $amount = round(($amount * pow(10, $this->payfast->client->currency()->precision)),0); $header =[ - 'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'), + 'merchant-id' => $this->payfast->company_gateway->getConfigField('merchantId'), 'timestamp' => now()->format('c'), 'version' => 'v1', ]; @@ -163,7 +163,7 @@ class Token ]); try { - $response = $client->post("https://api.payfast.co.za/subscriptions/{$token}/adhoc",[ + $response = $client->post("https://sandbox.payfast.co.za/subscriptions/{$token}/adhoc",[ RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false ]);