mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
return 200 HTTP code on webhook response from payfast.
This commit is contained in:
parent
44c88496af
commit
46852794aa
@ -248,7 +248,7 @@ class CreditCard
|
|||||||
|
|
||||||
$payment = $this->payfast->createPayment($payment_record, Payment::STATUS_COMPLETED);
|
$payment = $this->payfast->createPayment($payment_record, Payment::STATUS_COMPLETED);
|
||||||
|
|
||||||
return redirect()->route('client.payments.show', ['payment' => $this->payfast->encodePrimaryKey($payment->id)]);
|
//return redirect()->route('client.payments.show', ['payment' => $this->payfast->encodePrimaryKey($payment->id)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function processUnsuccessfulPayment($server_response)
|
private function processUnsuccessfulPayment($server_response)
|
||||||
|
@ -169,6 +169,7 @@ class PayFastPaymentDriver extends BaseDriver
|
|||||||
{
|
{
|
||||||
|
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
|
nlog("payfast");
|
||||||
nlog($data);
|
nlog($data);
|
||||||
|
|
||||||
if(array_key_exists('m_payment_id', $data))
|
if(array_key_exists('m_payment_id', $data))
|
||||||
@ -179,17 +180,23 @@ class PayFastPaymentDriver extends BaseDriver
|
|||||||
switch ($hash)
|
switch ($hash)
|
||||||
{
|
{
|
||||||
case 'cc_auth':
|
case 'cc_auth':
|
||||||
return $this->setPaymentMethod(GatewayType::CREDIT_CARD)
|
$this->setPaymentMethod(GatewayType::CREDIT_CARD)
|
||||||
->authorizeResponse($request);
|
->authorizeResponse($request);
|
||||||
|
|
||||||
|
return response()->json([], 200);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$data['m_payment_id']])->first();
|
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$data['m_payment_id']])->first();
|
||||||
|
|
||||||
return $this->setPaymentMethod(GatewayType::CREDIT_CARD)
|
$this->setPaymentMethod(GatewayType::CREDIT_CARD)
|
||||||
->setPaymentHash($payment_hash)
|
->setPaymentHash($payment_hash)
|
||||||
->processPaymentResponse($request);
|
->processPaymentResponse($request);
|
||||||
|
|
||||||
|
return response()->json([], 200);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user