1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Adjustments for gocardless currency amount

This commit is contained in:
David Bomba 2023-03-22 11:36:46 +11:00
parent 6e6019feaf
commit 0e80303033
5 changed files with 7 additions and 5 deletions

View File

@ -136,7 +136,7 @@ class EmailController extends BaseController
$mo->email_template_body = $request->input('template');
$mo->email_template_subject = str_replace("template", "subject", $request->input('template'));
if ($request->has('cc_email')) {
if ($request->has('cc_email') && $request->cc_email) {
$mo->cc[] = new Address($request->cc_email);
}

View File

@ -43,7 +43,7 @@ class SendEmailRequest extends Request
'template' => 'bail|required',
'entity' => 'bail|required',
'entity_id' => 'bail|required',
'cc_email' => 'bail|sometimes|email',
'cc_email' => 'bail|sometimes|email|nullable',
];
}

View File

@ -175,7 +175,8 @@ class ACH implements MethodInterface
try {
$payment = $this->go_cardless->gateway->payments()->create([
'params' => [
'amount' => $request->amount,
// 'amount' => $request->amount,
'amount' => (int)rtrim(round($request->amount),0),
'currency' => $request->currency,
'description' => $description,
'metadata' => [

View File

@ -179,7 +179,8 @@ class DirectDebit implements MethodInterface
try {
$payment = $this->go_cardless->gateway->payments()->create([
'params' => [
'amount' => $request->amount,
// 'amount' => $request->amount,
'amount' => (int)rtrim(round($request->amount),0),
'currency' => $request->currency,
'description' => $description,
'metadata' => [

View File

@ -175,7 +175,7 @@ class SEPA implements MethodInterface
try {
$payment = $this->go_cardless->gateway->payments()->create([
'params' => [
'amount' => $request->amount,
'amount' => (int)rtrim(round($request->amount),0),
'currency' => $request->currency,
'description' => $description,
'metadata' => [