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
f8672e3feb
commit
1e568dc408
@ -87,7 +87,7 @@ class AccountGatewayController extends BaseController
|
|||||||
$accountGatewaysIds = $account->gatewayIds();
|
$accountGatewaysIds = $account->gatewayIds();
|
||||||
$otherProviders = Input::get('other_providers');
|
$otherProviders = Input::get('other_providers');
|
||||||
|
|
||||||
if ( ! Utils::isNinja() || Gateway::hasStandardGateway($accountGatewaysIds)) {
|
if ( ! Utils::isNinja() || ! env('WEPAY_CLIENT_ID') || Gateway::hasStandardGateway($accountGatewaysIds)) {
|
||||||
$otherProviders = true;
|
$otherProviders = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +346,6 @@ class AccountGatewayController extends BaseController
|
|||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
'company_name' => 'required',
|
'company_name' => 'required',
|
||||||
'description' => 'required',
|
|
||||||
'tos_agree' => 'required',
|
'tos_agree' => 'required',
|
||||||
'first_name' => 'required',
|
'first_name' => 'required',
|
||||||
'last_name' => 'required',
|
'last_name' => 'required',
|
||||||
@ -390,7 +389,7 @@ class AccountGatewayController extends BaseController
|
|||||||
|
|
||||||
$accountDetails = [
|
$accountDetails = [
|
||||||
'name' => Input::get('company_name'),
|
'name' => Input::get('company_name'),
|
||||||
'description' => Input::get('description'),
|
'description' => trans('texts.wepay_account_description'),
|
||||||
'theme_object' => json_decode(WEPAY_THEME),
|
'theme_object' => json_decode(WEPAY_THEME),
|
||||||
'callback_uri' => $accountGateway->getWebhookUrl(),
|
'callback_uri' => $accountGateway->getWebhookUrl(),
|
||||||
];
|
];
|
||||||
|
@ -59,14 +59,6 @@ class AccountGatewayDatatable extends EntityDatatable
|
|||||||
function($model) {
|
function($model) {
|
||||||
return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->resendConfirmationUrl);
|
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'),
|
uctrans('texts.edit_gateway'),
|
||||||
function ($model) {
|
function ($model) {
|
||||||
@ -76,7 +68,15 @@ class AccountGatewayDatatable extends EntityDatatable
|
|||||||
return !$model->deleted_at;
|
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) {
|
function ($model) {
|
||||||
$accountGateway = AccountGateway::find($model->id);
|
$accountGateway = AccountGateway::find($model->id);
|
||||||
$endpoint = WEPAY_ENVIRONMENT == WEPAY_STAGE ? 'https://stage.wepay.com/' : 'https://www.wepay.com/';
|
$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_agree' => 'I agree to the :link.',
|
||||||
'wepay_tos_link_text' => 'WePay Terms of Service',
|
'wepay_tos_link_text' => 'WePay Terms of Service',
|
||||||
'resend_confirmation_email' => 'Resend Confirmation Email',
|
'resend_confirmation_email' => 'Resend Confirmation Email',
|
||||||
'manage_wepay_account' => 'Manage WePay Account',
|
'manage_account' => 'Manage Account',
|
||||||
'action_required' => 'Action Required',
|
'action_required' => 'Action Required',
|
||||||
'finish_setup' => 'Finish Setup',
|
'finish_setup' => 'Finish Setup',
|
||||||
'created_wepay_confirmation_required' => 'Please check your email and confirm your email address with WePay.',
|
'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.',
|
'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',
|
'enable_buy_now_buttons_help' => 'Enable support for buy now buttons',
|
||||||
'changes_take_effect_immediately' => 'Note: changes take effect immediately',
|
'changes_take_effect_immediately' => 'Note: changes take effect immediately',
|
||||||
|
'wepay_account_description' => 'Payment gateway for Invoice Ninja',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
'first_name' => 'required',
|
'first_name' => 'required',
|
||||||
'last_name' => 'required',
|
'last_name' => 'required',
|
||||||
'email' => 'required',
|
'email' => 'required',
|
||||||
'description' => 'required',
|
|
||||||
'company_name' => 'required',
|
'company_name' => 'required',
|
||||||
'tos_agree' => 'required',
|
'tos_agree' => 'required',
|
||||||
'country' => 'required',
|
'country' => 'required',
|
||||||
@ -40,7 +39,6 @@
|
|||||||
{!! Former::text('last_name') !!}
|
{!! Former::text('last_name') !!}
|
||||||
{!! 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') !!}
|
|
||||||
|
|
||||||
@if (WEPAY_ENABLE_CANADA)
|
@if (WEPAY_ENABLE_CANADA)
|
||||||
<div id="wepay-country">
|
<div id="wepay-country">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user