mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
16b297f1a7
@ -36,7 +36,7 @@ class MigrationCompleted extends Mailable
|
||||
$data['settings'] = $this->company->settings;
|
||||
$data['company'] = $this->company->fresh();
|
||||
$data['whitelabel'] = $this->company->account->isPaid() ? true : false;
|
||||
$data['check_data'] = $this->check_data;
|
||||
$data['check_data'] = $this->check_data ?: '';
|
||||
$data['logo'] = $this->company->present()->logo();
|
||||
|
||||
$result = $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
|
@ -197,14 +197,20 @@ class ACH
|
||||
if($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');
|
||||
|
||||
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
||||
// 'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
||||
'unique_id' => Str::random(40),
|
||||
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
||||
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
||||
'currency' => $this->wepay_payment_driver->client->getCurrencyCode(),
|
||||
'short_description' => 'A vacation home rental',
|
||||
'short_description' => 'Goods and Services',
|
||||
'type' => 'goods',
|
||||
'fee' => [
|
||||
'fee_payer' => config('ninja.wepay.fee_payer'),
|
||||
'app_fee' => $app_fee,
|
||||
],
|
||||
'payment_method' => array(
|
||||
'type' => 'payment_bank',
|
||||
'payment_bank' => array(
|
||||
|
@ -139,16 +139,21 @@ use WePayCommon;
|
||||
}
|
||||
|
||||
// USD, CAD, and GBP.
|
||||
nlog($request->all());
|
||||
// nlog($request->all());
|
||||
|
||||
$app_fee = (config('ninja.wepay.fee_cc_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed');
|
||||
// charge the credit card
|
||||
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
||||
// 'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
||||
'unique_id' => Str::random(40),
|
||||
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
||||
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
||||
'currency' => $this->wepay_payment_driver->client->getCurrencyCode(),
|
||||
'short_description' => 'A vacation home rental',
|
||||
'short_description' => 'Goods and services',
|
||||
'type' => 'goods',
|
||||
'fee' => [
|
||||
'fee_payer' => config('ninja.wepay.fee_payer'),
|
||||
'app_fee' => $app_fee,
|
||||
],
|
||||
'payment_method' => array(
|
||||
'type' => 'credit_card',
|
||||
'credit_card' => array(
|
||||
|
@ -266,11 +266,10 @@ class WePayPaymentDriver extends BaseDriver
|
||||
|
||||
$response = $this->wepay->request('checkout/refund', array(
|
||||
'checkout_id' => $payment->transaction_reference,
|
||||
'refund_reason' => 'Refund',
|
||||
'refund_reason' => 'Refund by merchant',
|
||||
'amount' => $amount
|
||||
));
|
||||
|
||||
|
||||
return [
|
||||
'transaction_reference' => $response->checkout_id,
|
||||
'transaction_response' => json_encode($response),
|
||||
|
@ -152,6 +152,10 @@ return [
|
||||
'environment' => env('WEPAY_ENVIRONMENT', 'stage'),
|
||||
'client_id' => env('WEPAY_CLIENT_ID', ''),
|
||||
'client_secret' => env('WEPAY_CLIENT_SECRET',''),
|
||||
'fee_payer' => env('WEPAY_FEE_PAYER'),
|
||||
'fee_cc_multiplier' => env('WEPAY_APP_FEE_CC_MULTIPLIER'),
|
||||
'fee_ach_multiplier' => env('WEPAY_APP_FEE_ACH_MULTIPLIER'),
|
||||
'fee_fixed' => env('WEPAY_APP_FEE_FIXED'),
|
||||
],
|
||||
'ninja_stripe_publishable_key' => env('NINJA_PUBLISHABLE_KEY', null),
|
||||
'ninja_stripe_client_id' => env('NINJA_STRIPE_CLIENT_ID', null),
|
||||
|
@ -67,7 +67,7 @@
|
||||
<p><b>{{ ctrans('texts.documents') }}:</b> {{ count($company->documents) }} </p>
|
||||
@endif
|
||||
|
||||
@if($check_data)
|
||||
@if(isset($check_data))
|
||||
<p><b>Data Quality:</b></p>
|
||||
<p> {!! $check_data !!} </p>
|
||||
@endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user