mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
minor fixes for wepay
This commit is contained in:
parent
da7e368d63
commit
62359e4097
@ -80,7 +80,7 @@ class ValidRefundableRequest implements Rule
|
||||
$invoice = Invoice::whereId($invoice['invoice_id'])->whereCompanyId($payment->company_id)->withTrashed()->first();
|
||||
|
||||
if ($payment->invoices()->exists()) {
|
||||
$paymentable_invoice = $payment->invoices->where('id', $invoice->id)->first();
|
||||
$paymentable_invoice = $payment->invoices->where('invoice_id', $invoice->id)->first();
|
||||
|
||||
if (! $paymentable_invoice) {
|
||||
$this->error_msg = ctrans('texts.invoice_not_related_to_payment', ['invoice' => $invoice->hashed_id]);
|
||||
|
@ -194,7 +194,7 @@ class ACH
|
||||
$token = ClientGatewayToken::find($this->decodePrimaryKey($request->input('source')));
|
||||
$token_meta = $token->meta;
|
||||
|
||||
if($token_meta->state != "authorized")
|
||||
if(!property_exists($token_meta, 'state') || $token_meta->state != "authorized")
|
||||
return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]);
|
||||
|
||||
$app_fee = (config('ninja.wepay.fee_ach_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed');
|
||||
|
Loading…
x
Reference in New Issue
Block a user