Update gocardless integration for Verify Account+ users
This commit is contained in:
parent
cb2d7dc810
commit
7a73563dfe
|
|
@ -60,11 +60,13 @@ class DirectDebit implements MethodInterface, LivewireMethodInterface
|
|||
$session_token = \Illuminate\Support\Str::uuid()->toString();
|
||||
$exit_uri = route('client.payment_methods.index');
|
||||
|
||||
$verify = $this->go_cardless->company_gateway->getConfigField('verifyBankAccount') ? 'recommended' : 'when_available';
|
||||
|
||||
$response = $this->go_cardless->gateway->billingRequests()->create([
|
||||
"params" => [
|
||||
"mandate_request" => [
|
||||
"currency" => auth()->guard('contact')->user()->client->currency()->code,
|
||||
"verify" => "recommended" //when_available
|
||||
"verify" => $verify
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -17,11 +17,20 @@ return new class extends Migration
|
|||
\App\Models\CompanyGateway::withTrashed()->where('gateway_key','b9886f9257f0c6ee7c302f1c74475f6c')
|
||||
->cursor()
|
||||
->each(function ($cg){
|
||||
|
||||
$cg->setConfigField('verifyBankAccount',false);
|
||||
$cg->save();
|
||||
|
||||
});
|
||||
|
||||
$gateway = \App\Models\Gateway::where('key','b9886f9257f0c6ee7c302f1c74475f6c')->first();
|
||||
|
||||
$fields = json_decode($gateway->fields);
|
||||
$fields->verifyBankAccount = false;
|
||||
$gateway->fields = json_encode($fields);
|
||||
|
||||
$gateway->save();
|
||||
|
||||
\Illuminate\Support\Facades\Cache::forget('gateways');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue