Fix for error handling in PayPal driver

This commit is contained in:
David Bomba 2021-01-06 20:28:48 +11:00
parent 65afd70b38
commit 04d8bcccb1
2 changed files with 8 additions and 3 deletions

View File

@ -108,7 +108,7 @@ class PaymentController extends Controller
$settings = auth()->user()->client->getMergedSettings();
nlog($settings);
// nlog($settings);
/* This loop checks for under / over payments and returns the user if a check fails */

View File

@ -158,10 +158,15 @@ class PayPalExpressPaymentDriver extends BaseDriver
}
if (!$response->isSuccessful()) {
PaymentFailureMailer::dispatch($this->client, $response->getMessage(), $this->client->company, $response['PAYMENTINFO_0_AMT']);
$data = $response->getData();
nlog($data);
PaymentFailureMailer::dispatch($this->client, $response->getMessage(), $this->client->company, $this->payment_hash->data->amount);
$message = [
'server_response' => $response->getMessage(),
'server_response' => $data['L_LONGMESSAGE0'],
'data' => $this->payment_hash->data,
];