Fixes for paypal fees

This commit is contained in:
David Bomba 2022-05-18 20:30:57 +10:00
parent 52197bef68
commit 7bd7996d7a
2 changed files with 2 additions and 14 deletions

View File

@ -179,7 +179,7 @@ class PayPalExpressPaymentDriver extends BaseDriver
$_invoice = collect($this->payment_hash->data->invoices)->first();
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
$this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']);
// $this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']);
return [
'currency' => $this->client->getCurrencyCode(),
@ -218,18 +218,6 @@ class PayPalExpressPaymentDriver extends BaseDriver
'quantity' => 1,
]);
// if($this->fee > 0.1){
// $items[] = new Item([
// 'name' => " ",
// 'description' => ctrans('texts.gateway_fee_description'),
// 'price' => $this->fee,
// 'quantity' => 1,
// ]);
// }
return $items;
}

View File

@ -117,7 +117,7 @@ trait ChartQueries
GROUP BY invoices.date
HAVING currency_id = :currency_id
"), [
'company_currency' => $this->company->settings->currency_id,
'company_currency' => (int)$this->company->settings->currency_id,
'currency_id' => $currency_id,
'company_id' => $this->company->id,
'start_date' => $start_date,