1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Remove authorize method for SEPA

This commit is contained in:
David Bomba 2022-03-29 16:07:40 +11:00
parent 77d5016de7
commit 7e3f1f19ec
3 changed files with 16 additions and 17 deletions

View File

@ -529,17 +529,17 @@ class Client extends BaseModel implements HasLocalePreference
}
if ($this->currency()->code == 'EUR' && in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) {
foreach ($pms as $pm) {
if ($pm['gateway_type_id'] == GatewayType::SEPA) {
$cg = CompanyGateway::find($pm['company_gateway_id']);
// if ($this->currency()->code == 'EUR' && in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) {
// foreach ($pms as $pm) {
// if ($pm['gateway_type_id'] == GatewayType::SEPA) {
// $cg = CompanyGateway::find($pm['company_gateway_id']);
if ($cg && $cg->fees_and_limits->{GatewayType::SEPA}->is_enabled) {
return $cg;
}
}
}
}
// if ($cg && $cg->fees_and_limits->{GatewayType::SEPA}->is_enabled) {
// return $cg;
// }
// }
// }
// }
if ($this->country && $this->country->iso_3166_3 == 'GBR' && in_array(GatewayType::DIRECT_DEBIT, array_column($pms, 'gateway_type_id'))) {
foreach ($pms as $pm) {

View File

@ -34,6 +34,12 @@ class SEPA
public function authorizeView($data)
{
$data['gateway'] = $this->stripe;
$data['payment_method_id'] = GatewayType::SEPA;
$data['client'] = $this->stripe->client;
$data['country'] = $this->stripe->client->country->iso_3166_2;
$data['currency'] = $this->stripe->client->currency();
return render('gateways.stripe.sepa.authorize', $data);
}

View File

@ -101,13 +101,6 @@ class MarkPaid extends AbstractService
$client->balance += $payment->amount * -1;
$client->save();
// $this->invoice
// ->client
// ->service()
// ->updateBalance($payment->amount * -1)
// ->updatePaidToDate($payment->amount)
// ->save();
$this->invoice = $this->invoice
->service()
->workFlow()