mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for PPCP
This commit is contained in:
parent
92324b4a20
commit
9212b71b8a
@ -195,12 +195,21 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
private function checkPaymentsReceivable(): self
|
private function checkPaymentsReceivable(): self
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->company_gateway->getConfigField('email_verified') != 'true' ||
|
if($this->company_gateway->getConfigField('status') != 'active'){
|
||||||
$this->company_gateway->getConfigField('payments_receivable') != 'Yes' ||
|
|
||||||
$this->company_gateway->getConfigField('consent') != 'true' ||
|
if (class_exists(\Modules\Admin\Services\PayPal\PayPalService::class)) {
|
||||||
$this->company_gateway->getConfigField('permissions') != 'true'
|
$pp = new \Modules\Admin\Services\PayPal\PayPalService($this->company_gateway->company, $this->company_gateway->user);
|
||||||
){
|
$pp->updateMerchantStatus($this->company_gateway);
|
||||||
|
|
||||||
|
$this->company_gateway = $this->company_gateway->fresh();
|
||||||
|
$config = $this->company_gateway->getConfig();
|
||||||
|
|
||||||
|
if($config->status == 'active')
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
throw new PaymentFailed('Unable to accept payments at this time, please contact PayPal for more information.', 401);
|
throw new PaymentFailed('Unable to accept payments at this time, please contact PayPal for more information.', 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user