php-cs-fixer & required fields check

This commit is contained in:
Benjamin Beganović 2020-11-27 11:12:05 +01:00
parent 5d3d31ddef
commit 50ae8fd608
2 changed files with 19 additions and 7 deletions

View File

@ -80,6 +80,12 @@ class PayPalExpressPaymentDriver extends BaseDriver
public function processPaymentView($data)
{
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
$this->initializeOmnipayGateway();
$this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['amount_with_fee']]);
@ -114,6 +120,12 @@ class PayPalExpressPaymentDriver extends BaseDriver
public function processPaymentResponse($request)
{
if (count($this->required_fields) > 0) {
return redirect()
->route('client.profile.edit', ['client_contact' => auth()->user()->hashed_id])
->with('missing_required_fields', $this->required_fields);
}
$this->initializeOmnipayGateway();
$response = $this->omnipay_gateway