mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:44:28 -04:00
Better WePay setup UI
This commit is contained in:
parent
1524447cd4
commit
9afd0741f7
@ -87,6 +87,7 @@ class AccountGatewayController extends BaseController
|
|||||||
->where('id', '!=', GATEWAY_GOCARDLESS)
|
->where('id', '!=', GATEWAY_GOCARDLESS)
|
||||||
->where('id', '!=', GATEWAY_DWOLLA)
|
->where('id', '!=', GATEWAY_DWOLLA)
|
||||||
->where('id', '!=', GATEWAY_STRIPE)
|
->where('id', '!=', GATEWAY_STRIPE)
|
||||||
|
->where('id', '!=', GATEWAY_WEPAY)
|
||||||
->orderBy('name')->get();
|
->orderBy('name')->get();
|
||||||
$data['hiddenFields'] = Gateway::$hiddenFields;
|
$data['hiddenFields'] = Gateway::$hiddenFields;
|
||||||
|
|
||||||
@ -245,9 +246,12 @@ class AccountGatewayController extends BaseController
|
|||||||
$accountGateway = AccountGateway::createNew();
|
$accountGateway = AccountGateway::createNew();
|
||||||
$accountGateway->gateway_id = $gatewayId;
|
$accountGateway->gateway_id = $gatewayId;
|
||||||
|
|
||||||
if ($gatewayId == GATEWAY_WEPAY && !$this->setupWePay($accountGateway, $wepayResponse)) {
|
if ($gatewayId == GATEWAY_WEPAY) {
|
||||||
|
if(!$this->setupWePay($accountGateway, $wepayResponse)) {
|
||||||
return $wepayResponse;
|
return $wepayResponse;
|
||||||
}
|
}
|
||||||
|
$oldConfig = $accountGateway->getConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = new stdClass();
|
$config = new stdClass();
|
||||||
@ -265,7 +269,7 @@ class AccountGatewayController extends BaseController
|
|||||||
$config->$field = $value;
|
$config->$field = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} elseif($oldConfig) {
|
||||||
$config = clone $oldConfig;
|
$config = clone $oldConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
{!! Former::populateField('first_name', $user->first_name) !!}
|
{!! Former::populateField('first_name', $user->first_name) !!}
|
||||||
{!! Former::populateField('last_name', $user->last_name) !!}
|
{!! Former::populateField('last_name', $user->last_name) !!}
|
||||||
{!! Former::populateField('email', $user->email) !!}
|
{!! Former::populateField('email', $user->email) !!}
|
||||||
|
{!! Former::populateField('show_address', 1) !!}
|
||||||
|
{!! Former::populateField('update_address', 1) !!}
|
||||||
|
{!! Former::populateField('token_billing_type_id', $account->token_billing_type_id) !!}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{!! trans('texts.online_payments') !!}</h3>
|
<h3 class="panel-title">{!! trans('texts.online_payments') !!}</h3>
|
||||||
@ -20,6 +23,23 @@
|
|||||||
{!! Former::text('email') !!}
|
{!! Former::text('email') !!}
|
||||||
{!! Former::text('company_name')->help('wepay_company_name_help')->maxlength(255) !!}
|
{!! Former::text('company_name')->help('wepay_company_name_help')->maxlength(255) !!}
|
||||||
{!! Former::text('description')->help('wepay_description_help') !!}
|
{!! Former::text('description')->help('wepay_description_help') !!}
|
||||||
|
{!! Former::select('token_billing_type_id')
|
||||||
|
->options($tokenBillingOptions)
|
||||||
|
->help(trans('texts.token_billing_help')) !!}
|
||||||
|
{!! Former::checkbox('show_address')
|
||||||
|
->label(trans('texts.billing_address'))
|
||||||
|
->text(trans('texts.show_address_help'))
|
||||||
|
->addGroupClass('gateway-option') !!}
|
||||||
|
{!! Former::checkbox('update_address')
|
||||||
|
->label(' ')
|
||||||
|
->text(trans('texts.update_address_help'))
|
||||||
|
->addGroupClass('gateway-option') !!}
|
||||||
|
{!! Former::checkboxes('creditCardTypes[]')
|
||||||
|
->label('Accepted Credit Cards')
|
||||||
|
->checkboxes($creditCardTypes)
|
||||||
|
->class('creditcard-types')
|
||||||
|
->addGroupClass('gateway-option')
|
||||||
|
!!}
|
||||||
{!! Former::checkbox('tos_agree')->label(' ')->text(trans('texts.wepay_tos_agree',
|
{!! Former::checkbox('tos_agree')->label(' ')->text(trans('texts.wepay_tos_agree',
|
||||||
['link'=>'<a href="https://go.wepay.com/terms-of-service-us" target="_blank">'.trans('texts.wepay_tos_link_text').'</a>']
|
['link'=>'<a href="https://go.wepay.com/terms-of-service-us" target="_blank">'.trans('texts.wepay_tos_link_text').'</a>']
|
||||||
))->value('true') !!}
|
))->value('true') !!}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user