mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for WePay
This commit is contained in:
parent
befc9170fb
commit
8846f7537c
@ -31,7 +31,7 @@ class ExpenseTransformer extends BaseTransformer
|
||||
|
||||
return [
|
||||
'company_id' => $this->company->id,
|
||||
'amount' => $this->getFloat($data, 'expense.amount'),
|
||||
'amount' => abs($this->getFloat($data, 'expense.amount')),
|
||||
'currency_id' => $this->getCurrencyByCode(
|
||||
$data,
|
||||
'expense.currency_id'
|
||||
|
@ -133,7 +133,10 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
$this->nmo = null;
|
||||
$this->company = null;
|
||||
app('queue.worker')->shouldQuit = 1;
|
||||
|
||||
$mem_usage = memory_get_usage();
|
||||
|
||||
nlog('The script is now using: ' . round($mem_usage / 1024) . 'KBof memory.');
|
||||
|
||||
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
|
||||
|
||||
|
@ -41,7 +41,7 @@ class ACH
|
||||
public function authorizeView($data)
|
||||
{
|
||||
$data['gateway'] = $this->wepay_payment_driver;
|
||||
$data['country_code'] = $this->wepay_payment_driver->client ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
$data['country_code'] = $this->wepay_payment_driver?->client?->country ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
|
||||
return render('gateways.wepay.authorize.bank_transfer', $data);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class CreditCard
|
||||
public function authorizeView($data)
|
||||
{
|
||||
$data['gateway'] = $this->wepay_payment_driver;
|
||||
$data['country_code'] = $this->wepay_payment_driver->client ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
$data['country_code'] = $this->wepay_payment_driver?->client?->country ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
|
||||
return render('gateways.wepay.authorize.authorize', $data);
|
||||
}
|
||||
@ -102,7 +102,7 @@ class CreditCard
|
||||
{
|
||||
$data['gateway'] = $this->wepay_payment_driver;
|
||||
$data['description'] = ctrans('texts.invoices').': '.collect($data['invoices'])->pluck('invoice_number');
|
||||
$data['country_code'] = $this->wepay_payment_driver->client ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
$data['country_code'] = $this->wepay_payment_driver?->client?->country ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
|
||||
|
||||
return render('gateways.wepay.credit_card.pay', $data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user