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:
parent
6e6019feaf
commit
0e80303033
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -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' => [
|
||||
|
@ -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' => [
|
||||
|
@ -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' => [
|
||||
|
Loading…
Reference in New Issue
Block a user