Updates for checking payment gateway status

This commit is contained in:
David Bomba 2023-11-06 17:41:20 +11:00
parent 08b4d320cd
commit 92324b4a20

View File

@ -196,8 +196,13 @@ class PayPalPPCPPaymentDriver extends BaseDriver
private function checkPaymentsReceivable(): self
{
if(!$this->company_gateway->getConfigField('payments_receivable'))
if($this->company_gateway->getConfigField('email_verified') != 'true' ||
$this->company_gateway->getConfigField('payments_receivable') != 'Yes' ||
$this->company_gateway->getConfigField('consent') != 'true' ||
$this->company_gateway->getConfigField('permissions') != 'true'
){
throw new PaymentFailed('Unable to accept payments at this time, please contact PayPal for more information.', 401);
}
return $this;