mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 23:24:29 -04:00
Fixes for flow2
This commit is contained in:
parent
63f3115a02
commit
45553416de
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class PaymentMethod
|
||||
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
|
||||
|
||||
//gateways disabled
|
||||
if($company_gateways == '0') {
|
||||
if ($company_gateways == '0') {
|
||||
$transformed_ids = [];
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ class PaymentMethod
|
||||
if ($company_gateways || $company_gateways == '0') {
|
||||
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
|
||||
|
||||
if($company_gateways == '0') {
|
||||
if ($company_gateways == '0') {
|
||||
$transformed_ids = [];
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ class PaymentMethod
|
||||
$this->payment_methods = $payment_methods_collections->intersectByKeys($payment_methods_collections->flatten(1)->unique());
|
||||
|
||||
//@15-06-2024
|
||||
foreach($this->payment_methods as $key => $type) {
|
||||
foreach ($this->payment_methods as $key => $type) {
|
||||
foreach ($type as $gateway_id => $gateway_type_id) {
|
||||
$gate = $this->gateways->where('id', $gateway_id)->first();
|
||||
$this->buildUrl($gate, $gateway_type_id);
|
||||
@ -183,14 +183,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.
|
||||
|
11
resources/views/portal/ninja2020/flow2/error.blade.php
Normal file
11
resources/views/portal/ninja2020/flow2/error.blade.php
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user