mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:54:30 -04:00
Working on gocardless
This commit is contained in:
parent
95910ecaec
commit
a7afa16c69
@ -299,7 +299,9 @@ class OnlinePaymentController extends BaseController
|
|||||||
|
|
||||||
return response()->json(['message' => $result]);
|
return response()->json(['message' => $result]);
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
//Utils::logError($exception->getMessage(), 'PHP');
|
if (! Uitls::isNinjaProd()) {
|
||||||
|
Utils::logError($exception->getMessage(), 'HOOK');
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json(['message' => $exception->getMessage()], 500);
|
return response()->json(['message' => $exception->getMessage()], 500);
|
||||||
}
|
}
|
||||||
|
@ -69,5 +69,26 @@ class GoCardlessV2RedirectPaymentDriver extends BasePaymentDriver
|
|||||||
return $paymentMethod;
|
return $paymentMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function creatingPayment($payment, $paymentMethod)
|
||||||
|
{
|
||||||
|
\Log::info(json_encode($this->purchaseResponse));
|
||||||
|
//$payment->payment_status_id = $this->purchaseResponse['status'] == 'succeeded' ? PAYMENT_STATUS_COMPLETED : PAYMENT_STATUS_PENDING;
|
||||||
|
|
||||||
|
return $payment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handleWebHook($input)
|
||||||
|
{
|
||||||
|
\Log::info('handleWebHook... ' . $_SERVER['HTTP_WEBHOOK_SIGNATURE']);
|
||||||
|
\Log::info(json_encode($input));
|
||||||
|
|
||||||
|
$event = $this->gateway()->parseNotification(
|
||||||
|
file_get_contents('php://input'),
|
||||||
|
$_SERVER['HTTP_WEBHOOK_SIGNATURE']
|
||||||
|
);
|
||||||
|
|
||||||
|
\Log::info('event:');
|
||||||
|
\Log::info(json_encode($event));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user