Minor fixes for Payfast

This commit is contained in:
David Bomba 2021-07-10 16:39:14 +10:00
parent d774e81ca0
commit 1e03070e9e

View File

@ -78,7 +78,7 @@ class Token
$amount = round(($amount * pow(10, $this->payfast->client->currency()->precision)),0); $amount = round(($amount * pow(10, $this->payfast->client->currency()->precision)),0);
$header =[ $header =[
'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'), 'merchant-id' => $this->payfast->company_gateway->getConfigField('merchantId'),
'timestamp' => now()->format('c'), 'timestamp' => now()->format('c'),
'version' => 'v1', 'version' => 'v1',
]; ];
@ -163,7 +163,7 @@ class Token
]); ]);
try { 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 RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
]); ]);