Fixes for flow2

This commit is contained in:
David Bomba 2024-09-05 15:55:14 +10:00
parent 63f3115a02
commit 45553416de
4 changed files with 14 additions and 14 deletions

View File

@ -55,7 +55,6 @@ class ProcessPayment extends Component
$company_gateway = CompanyGateway::find($this->getContext()['company_gateway_id']);
if (!$responder_data['success']) {
nlog("ouchiees");
throw new PaymentFailed($responder_data['error'], 400);
}

View File

@ -54,8 +54,6 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver
$request['gateway_response'] = str_replace("Error: ", "", $request['gateway_response']);
$response = json_decode($request['gateway_response'], true);
nlog($response);
if($request->has('token') && strlen($request->input('token')) > 2) {
return $this->processTokenPayment($request, $response);
}

View File

@ -184,14 +184,6 @@ class PaymentMethod
}
}
if (($this->client->getSetting('use_credits_payment') == 'option' || $this->client->getSetting('use_credits_payment') == 'always') && $this->client->service()->getCreditBalance() > 0) {
$this->payment_urls[] = [
'label' => ctrans('texts.apply_credit'),
'company_gateway_id' => CompanyGateway::GATEWAY_CREDIT,
'gateway_type_id' => GatewayType::CREDIT,
];
}
if (($this->client->getSetting('use_credits_payment') == 'option' || $this->client->getSetting('use_credits_payment') == 'always') && $this->client->service()->getCreditBalance() > 0) {
// Show credits as only payment option if both statements are true.
if (

View File

@ -0,0 +1,11 @@
<div class="rounded-lg border bg-card text-card-foreground shadow-sm overflow-hidden px-4 py-5 bg-white sm:gap-4 sm:px-6">
<h2 class="font-semibold tracking-tight group flex items-center gap-2 text-lg mb-3">
{{ ctrans('texts.error') }}
</h2>
<h3>
{{ $errorMessage }}
</h3>
</div>