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

Stripe direct debit

This commit is contained in:
David Bomba 2023-02-27 11:08:58 +11:00
parent d51221c10e
commit aaaa297253
3 changed files with 110 additions and 5 deletions

View File

@ -201,17 +201,19 @@ nlog($pi);
}
private function formatDataforEur(PaymentIntent $pi): array
{
return [
'amount' => Number::formatMoney($this->stripe->convertFromStripeAmount($pi->next_action->display_bank_transfer_instructions->amount_remaining, $this->stripe->client->currency()->precision, $this->stripe->client->currency()), $this->stripe->client),
'account_holder_name' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->sort_code->account_holder_name,
'account_number' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->sort_code->account_number,
'sort_code' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->sort_code->sort_code,
'account_holder_name' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->iban->account_holder_name,
'account_number' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->iban->iban,
'sort_code' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->iban->bic,
'reference' => $pi->next_action->display_bank_transfer_instructions->reference,
'description' => $pi->description,
'gateway' => $this->stripe->company_gateway,
'currency' => $pi->next_action->display_bank_transfer_instructions->currency,
];
@ -235,10 +237,10 @@ nlog($pi);
'bank_name' =>$pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->zengin->bank_name,
'branch_code' =>$pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->zengin->branch_code,
'branch_name' =>$pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->zengin->branch_name,
'sort_code' => $pi->next_action->display_bank_transfer_instructions->financial_addresses[0]->zengin->sort_code,
'reference' => $pi->next_action->display_bank_transfer_instructions->reference,
'description' => $pi->description,
'gateway' => $this->stripe->company_gateway,
'currency' => $pi->next_action->display_bank_transfer_instructions->currency,
];

View File

@ -5002,7 +5002,13 @@ $LANG = array(
'gateway_payment_text_no_invoice' => 'Payment with no invoice for amount :amount for client :client',
'click_to_variables' => 'Client here to see all variables.',
'ship_to' => 'Ship to',
'stripe_direct_debit_details' => 'Please transfer into the nominated bank account above.'
'stripe_direct_debit_details' => 'Please transfer into the nominated bank account above.',
'branch_name' => 'Branch Name',
'branch_code' => 'Branch Code',
'bank_name' => 'Bank Name',
'bank_code' => 'Bank Code',
'bic' => 'BIC',
);

View File

@ -94,6 +94,103 @@
{{ ctrans('texts.stripe_direct_debit_details') }}
</dd>
@elseif($currency == 'jpy')
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.account_number') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $account_number }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.account_name') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $account_holder_name }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.account_type') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $account_type }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.bank_name') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $bank_name }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.bank_code') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $bank_code }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.branch_name') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $branch_name }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.branch_code') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $branch_code }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.reference') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $reference }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.balance_due') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $amount }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ ctrans('texts.stripe_direct_debit_details') }}
</dd>
@elseif($currency == 'eur')
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.account_name') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $account_holder_name }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.account_number') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $account_number }}
</dd>
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.bic') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $sort_code }}
</dd>
@endif
</div>