mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for base driver
This commit is contained in:
parent
d9516d723a
commit
6d2430d086
@ -89,6 +89,8 @@ class CreditCard
|
|||||||
'notify_url' => $this->payfast->genericWebhookUrl(),
|
'notify_url' => $this->payfast->genericWebhookUrl(),
|
||||||
'amount' => 5,
|
'amount' => 5,
|
||||||
'item_name' => 'pre-auth',
|
'item_name' => 'pre-auth',
|
||||||
|
'item_description' => 'cc_auth',
|
||||||
|
'custom_str1' => 'cc_auth',
|
||||||
'subscription_type' => 2,
|
'subscription_type' => 2,
|
||||||
'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'),
|
'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'),
|
||||||
];
|
];
|
||||||
@ -100,7 +102,6 @@ class CreditCard
|
|||||||
return render('gateways.payfast.authorize', $data);
|
return render('gateways.payfast.authorize', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
'm_payment_id' => NULL,
|
'm_payment_id' => NULL,
|
||||||
'pf_payment_id' => '1409993',
|
'pf_payment_id' => '1409993',
|
||||||
@ -128,7 +129,6 @@ class CreditCard
|
|||||||
'billing_date' => '2021-07-05',
|
'billing_date' => '2021-07-05',
|
||||||
'signature' => 'ebdb4ca937d0e3f43462841c0afc6ad9',
|
'signature' => 'ebdb4ca937d0e3f43462841c0afc6ad9',
|
||||||
'q' => '/payment_notification_webhook/EhbnVYyzJZyccY85hcHIkIzNPI2rtHzznAyyyG73oSxZidAdN9gf8BvAKDomqeHp/4openRe7Az/WPe99p3eLy',
|
'q' => '/payment_notification_webhook/EhbnVYyzJZyccY85hcHIkIzNPI2rtHzznAyyyG73oSxZidAdN9gf8BvAKDomqeHp/4openRe7Az/WPe99p3eLy',
|
||||||
)
|
|
||||||
*/
|
*/
|
||||||
public function authorizeResponse($request)
|
public function authorizeResponse($request)
|
||||||
{
|
{
|
||||||
@ -147,7 +147,11 @@ class CreditCard
|
|||||||
|
|
||||||
$cgt['payment_meta'] = $payment_meta;
|
$cgt['payment_meta'] = $payment_meta;
|
||||||
|
|
||||||
$this->payfast->storeGatewayToken($cgt, []);
|
$token = $this->payfast->storeGatewayToken($cgt, []);
|
||||||
|
|
||||||
|
nlog($token);
|
||||||
|
|
||||||
|
return response()->json([], 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,8 +141,17 @@ class PayFastPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function processWebhookRequest(Request $request, Payment $payment = null)
|
public function processWebhookRequest(Request $request, Payment $payment = null)
|
||||||
{
|
{
|
||||||
|
$this->init();
|
||||||
|
|
||||||
nlog($request->all());
|
nlog($request->all());
|
||||||
|
$data = $request->all();
|
||||||
|
|
||||||
|
if(array_key_exists('custom_str1', $data) && $data['custom_str1'] == 'cc_auth')
|
||||||
|
{
|
||||||
|
return $this->setPaymentMethod(GatewayType::CREDIT_CARD)
|
||||||
|
->authorizeResponse($request);
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json([], 200);
|
return response()->json([], 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,6 @@ return [
|
|||||||
'gelf' => [
|
'gelf' => [
|
||||||
'driver' => 'custom',
|
'driver' => 'custom',
|
||||||
|
|
||||||
|
|
||||||
'via' => \Hedii\LaravelGelfLogger\GelfLoggerFactory::class,
|
'via' => \Hedii\LaravelGelfLogger\GelfLoggerFactory::class,
|
||||||
|
|
||||||
// This optional option determines the processors that should be
|
// This optional option determines the processors that should be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user