diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index b4c8f280af28..09853abe0b02 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -650,6 +650,9 @@ class BasePaymentDriver $account = $this->account(); $invitation = $this->invitation; $invoice = $this->invoice(); + if (! $invoice->canBePaid()) { + return false; + } $invoice->markSentIfUnsent(); $payment = Payment::createNew($invitation); diff --git a/app/Ninja/PaymentDrivers/MolliePaymentDriver.php b/app/Ninja/PaymentDrivers/MolliePaymentDriver.php index 2181cd4d6d77..0bc42e5d3d1a 100644 --- a/app/Ninja/PaymentDrivers/MolliePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/MolliePaymentDriver.php @@ -6,6 +6,16 @@ use Exception; class MolliePaymentDriver extends BasePaymentDriver { + protected function paymentDetails($paymentMethod = false) + { + $data = parent::paymentDetails($paymentMethod); + + // Enable the webhooks + $data['notifyUrl'] = $data['returnUrl']; + + return $data; + } + public function completeOffsitePurchase($input) { $details = $this->paymentDetails(); diff --git a/resources/views/accounts/account_gateway_wepay.blade.php b/resources/views/accounts/account_gateway_wepay.blade.php index 97c358541a6e..4093d2f02ce7 100644 --- a/resources/views/accounts/account_gateway_wepay.blade.php +++ b/resources/views/accounts/account_gateway_wepay.blade.php @@ -42,7 +42,7 @@ ->radios([ trans('texts.country_United States') => ['value' => 'US'], trans('texts.country_Canada') => ['value' => 'CA'], - //trans('texts.country_United Kingdom') => ['value' => 'GB'], + trans('texts.country_United Kingdom') => ['value' => 'GB'], ]) !!}