diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index 1df96990a873..66b85a335656 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -84,7 +84,7 @@ class OnlinePaymentController extends BaseController } } - private function error($paymentDriver, $exception, $showPayment) + private function error($paymentDriver, $exception, $showPayment = false) { if (is_string($exception)) { $displayError = $exception; diff --git a/app/Models/Payment.php b/app/Models/Payment.php index d3efe368cd52..8e496c602a33 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -162,7 +162,7 @@ class Payment extends EntityModel Event::fire(new PaymentCompleted($this)); } - public function markFailed($failureMessage) + public function markFailed($failureMessage = '') { $this->payment_status_id = PAYMENT_STATUS_FAILED; $this->gateway_error = $failureMessage; diff --git a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php index f98dc79446ec..13456e8f532f 100644 --- a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php +++ b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php @@ -215,6 +215,7 @@ class WePayPaymentDriver extends BasePaymentDriver public function handleWebHook($input) { + $accountGateway = $this->accountGateway; $accountId = $accountGateway->account_id; foreach (array_keys($input) as $key) {