PayFast API token billing

This commit is contained in:
David Bomba 2021-09-23 17:56:56 +10:00
parent b152221854
commit 5bbeaaba60

View File

@ -93,10 +93,15 @@ class Token
// $header['signature'] = md5( $this->generate_parameter_string(array_merge($header, $body), false) );
// $result = $this->send($header, $body, $cgt->token);
$api = new \PayFast\PayFastPayment(
[
'merchantId' => $this->company_gateway->getConfigField('merchantId'),
'passPhrase' => $this->company_gateway->getConfigField('passPhrase'),
'testMode' => $this->company_gateway->getConfigField('testMode')
]
);
$adhocArray = $this->payfast
->init()
$adhocArray = $api
->payfast
->subscriptions
->adhoc($cgt->token, ['amount' => $amount, 'item_name' => 'purchase']);