1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for Paypal Token payments

This commit is contained in:
David Bomba 2022-11-22 14:37:50 +11:00
parent 64fb9c9a85
commit 1bd1d482ec
2 changed files with 5 additions and 2 deletions

View File

@ -111,7 +111,10 @@ class PayPal
'paymentMethodNonce' => $gateway_response->nonce, 'paymentMethodNonce' => $gateway_response->nonce,
]); ]);
return $payment_method->paymentMethod->token; if($payment_method->success)
return $payment_method->paymentMethod->token;
else
throw new PaymentFailed(property_exists($payment_method, 'message') ? $payment_method->message : 'Undefined error storing payment token.', 0);
} }
/** /**

View File

@ -31,7 +31,7 @@
{{ ctrans('texts.type') }} {{ ctrans('texts.type') }}
</dt> </dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $payment_method->meta?->brand }} {{ property_exists($payment_method->meta, 'brand') ? $payment_method->meta?->brand : ''}}
{{ property_exists($payment_method->meta, 'scheme') ? $payment_method->meta?->scheme : '' }} {{ property_exists($payment_method->meta, 'scheme') ? $payment_method->meta?->scheme : '' }}
</dd> </dd>
</div> </div>