mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fixes for WePay
This commit is contained in:
parent
f8672e3feb
commit
1e568dc408
@ -87,7 +87,7 @@ class AccountGatewayController extends BaseController
|
||||
$accountGatewaysIds = $account->gatewayIds();
|
||||
$otherProviders = Input::get('other_providers');
|
||||
|
||||
if ( ! Utils::isNinja() || Gateway::hasStandardGateway($accountGatewaysIds)) {
|
||||
if ( ! Utils::isNinja() || ! env('WEPAY_CLIENT_ID') || Gateway::hasStandardGateway($accountGatewaysIds)) {
|
||||
$otherProviders = true;
|
||||
}
|
||||
|
||||
@ -346,7 +346,6 @@ class AccountGatewayController extends BaseController
|
||||
|
||||
$rules = [
|
||||
'company_name' => 'required',
|
||||
'description' => 'required',
|
||||
'tos_agree' => 'required',
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
@ -390,7 +389,7 @@ class AccountGatewayController extends BaseController
|
||||
|
||||
$accountDetails = [
|
||||
'name' => Input::get('company_name'),
|
||||
'description' => Input::get('description'),
|
||||
'description' => trans('texts.wepay_account_description'),
|
||||
'theme_object' => json_decode(WEPAY_THEME),
|
||||
'callback_uri' => $accountGateway->getWebhookUrl(),
|
||||
];
|
||||
|
@ -59,14 +59,6 @@ class AccountGatewayDatatable extends EntityDatatable
|
||||
function($model) {
|
||||
return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->resendConfirmationUrl);
|
||||
}
|
||||
], [
|
||||
uctrans('texts.finish_setup'),
|
||||
function ($model) {
|
||||
return $model->setupUrl;
|
||||
},
|
||||
function($model) {
|
||||
return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->setupUrl);
|
||||
}
|
||||
] , [
|
||||
uctrans('texts.edit_gateway'),
|
||||
function ($model) {
|
||||
@ -76,7 +68,15 @@ class AccountGatewayDatatable extends EntityDatatable
|
||||
return !$model->deleted_at;
|
||||
}
|
||||
], [
|
||||
uctrans('texts.manage_wepay_account'),
|
||||
uctrans('texts.finish_setup'),
|
||||
function ($model) {
|
||||
return $model->setupUrl;
|
||||
},
|
||||
function($model) {
|
||||
return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->setupUrl);
|
||||
}
|
||||
], [
|
||||
uctrans('texts.manage_account'),
|
||||
function ($model) {
|
||||
$accountGateway = AccountGateway::find($model->id);
|
||||
$endpoint = WEPAY_ENVIRONMENT == WEPAY_STAGE ? 'https://stage.wepay.com/' : 'https://www.wepay.com/';
|
||||
|
@ -1296,7 +1296,7 @@ $LANG = array(
|
||||
'wepay_tos_agree' => 'I agree to the :link.',
|
||||
'wepay_tos_link_text' => 'WePay Terms of Service',
|
||||
'resend_confirmation_email' => 'Resend Confirmation Email',
|
||||
'manage_wepay_account' => 'Manage WePay Account',
|
||||
'manage_account' => 'Manage Account',
|
||||
'action_required' => 'Action Required',
|
||||
'finish_setup' => 'Finish Setup',
|
||||
'created_wepay_confirmation_required' => 'Please check your email and confirm your email address with WePay.',
|
||||
@ -2039,6 +2039,8 @@ $LANG = array(
|
||||
'buy_now_buttons_disabled' => 'This feature requires that a product is created and a payment gateway is configured.',
|
||||
'enable_buy_now_buttons_help' => 'Enable support for buy now buttons',
|
||||
'changes_take_effect_immediately' => 'Note: changes take effect immediately',
|
||||
'wepay_account_description' => 'Payment gateway for Invoice Ninja',
|
||||
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
@ -9,7 +9,6 @@
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'email' => 'required',
|
||||
'description' => 'required',
|
||||
'company_name' => 'required',
|
||||
'tos_agree' => 'required',
|
||||
'country' => 'required',
|
||||
@ -40,7 +39,6 @@
|
||||
{!! Former::text('last_name') !!}
|
||||
{!! Former::text('email') !!}
|
||||
{!! Former::text('company_name')->help('wepay_company_name_help')->maxlength(255) !!}
|
||||
{!! Former::text('description')->help('wepay_description_help') !!}
|
||||
|
||||
@if (WEPAY_ENABLE_CANADA)
|
||||
<div id="wepay-country">
|
||||
|
Loading…
Reference in New Issue
Block a user