1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Static analysis

This commit is contained in:
David Bomba 2024-08-05 14:04:05 +10:00
parent b81eb57744
commit 08f9443c82
2 changed files with 2 additions and 4 deletions

View File

@ -163,7 +163,7 @@ class PaymentMethod implements MethodInterface
return $this->processPendingPayment($response['id'], (float) $response['amount'], PaymentType::ACSS , $customer->token);
} catch(\Throwable $e) {
$this->processUnsuccessfulPayment( new InvalidResponseException($e->getMessage(), (int) $e->getCode()) );
$this->processUnsuccessfulPayment( new \Exception($e->getMessage(), (int) $e->getCode()) );
}
}

View File

@ -136,11 +136,9 @@ class RotessaPaymentDriver extends BaseDriver
$result = $this->gatewayRequest("get","customers/{$contact->id}");
$result = $result->json();
$this->client = Client::find($contact->client_id);
$this->client = Client::query()->find($contact->client_id);
$customer = array_merge($result, ['id' => $contact->id, 'custom_identifier' => $contact->custom_identifier ]);
// $customer = (new Customer($result))->additional( ['id' => $contact->id, 'custom_identifier' => $contact->custom_identifier ]); //creates a new customer in rotessa
// $this->findOrCreateCustomer($customer->additional + $customer->jsonSerialize());
$this->findOrCreateCustomer($customer);