mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
Payment setting frontend part 3 - added paypal
This commit is contained in:
@@ -177,6 +177,20 @@ return [
|
||||
'name' => 'app_color',
|
||||
'value' => '#00BC7E',
|
||||
],
|
||||
|
||||
// Subscription
|
||||
[
|
||||
'name' => 'paypal_payment_description',
|
||||
'value' => 'Available PayPal Credit, Debit or Credit Card.',
|
||||
],
|
||||
[
|
||||
'name' => 'paystack_payment_description',
|
||||
'value' => 'Available Bank Account, USSD, Mobile Money, Apple Pay',
|
||||
],
|
||||
[
|
||||
'name' => 'stripe_payment_description',
|
||||
'value' => 'Available credit card or Apple Pay',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~8729b0a3.js": "/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~8729b0a3.js?id=50f7067283a882b798bd",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/page-edit~chunks/pages~chunks/plan-creat~d6690165.js": "/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/page-edit~chunks/pages~chunks/plan-creat~d6690165.js?id=2f03fbbe27b922063d16",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=c1e42f111fd531672466",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=c80a8540cddefca47fdc",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=89d41188daef178a94b0",
|
||||
"/chunks/app-payments~chunks/settings.js": "/chunks/app-payments~chunks/settings.js?id=ec4c3e5b27d7ee2e2cd1",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=5968eed91e41e99efd4c",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=c3a013b11ae7bde6f39d",
|
||||
@@ -169,5 +169,18 @@
|
||||
"/chunks/app-payments.aeec43cdbbeaa4ad7dec.hot-update.js": "/chunks/app-payments.aeec43cdbbeaa4ad7dec.hot-update.js",
|
||||
"/chunks/app-payments.32e4b86a736bb5e1a9a4.hot-update.js": "/chunks/app-payments.32e4b86a736bb5e1a9a4.hot-update.js",
|
||||
"/chunks/settings.cb10530f167c29f4c3a7.hot-update.js": "/chunks/settings.cb10530f167c29f4c3a7.hot-update.js",
|
||||
"/chunks/settings.6891f54dfd161e22dd43.hot-update.js": "/chunks/settings.6891f54dfd161e22dd43.hot-update.js"
|
||||
"/chunks/settings.6891f54dfd161e22dd43.hot-update.js": "/chunks/settings.6891f54dfd161e22dd43.hot-update.js",
|
||||
"/chunks/app-payments.844503b4ec8cf9b17d31.hot-update.js": "/chunks/app-payments.844503b4ec8cf9b17d31.hot-update.js",
|
||||
"/chunks/app-payments.4b05525f36db1bfb33e8.hot-update.js": "/chunks/app-payments.4b05525f36db1bfb33e8.hot-update.js",
|
||||
"/chunks/app-payments.f09cab90ffb5dcae0c93.hot-update.js": "/chunks/app-payments.f09cab90ffb5dcae0c93.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.8780e277510f49a894d1.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.8780e277510f49a894d1.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.1e2bb3b282293c048668.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.1e2bb3b282293c048668.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.1299c350afabed75285c.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.1299c350afabed75285c.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.6b7004d63dd153d40239.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.6b7004d63dd153d40239.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.c875fb119f496efb663d.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.c875fb119f496efb663d.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.0d77fcead7b02d62828e.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.0d77fcead7b02d62828e.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.3c23d5015727c88ad982.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.3c23d5015727c88ad982.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.4f8cae58dbe64014a0b2.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.4f8cae58dbe64014a0b2.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.7dc07358ab58b00c9140.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.7dc07358ab58b00c9140.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.b0ed5f0ca43eb55bb28f.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.b0ed5f0ca43eb55bb28f.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -128,6 +128,63 @@
|
||||
</ValidationObserver>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--PayPal method configuration-->
|
||||
<div v-if="allowedPayments" class="card shadow-card">
|
||||
<FormLabel icon="credit-card">
|
||||
{{ $t('PayPal') }}
|
||||
</FormLabel>
|
||||
|
||||
<AppInputSwitch :title="$t('Allow PayPal Service')" :description="$t('Allow your users pay by their credit card')" :is-last="! paypal.allowedService">
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'allowed_paypal', paypal.allowedService)" v-model="paypal.allowedService" :state="paypal.allowedService" />
|
||||
</AppInputSwitch>
|
||||
|
||||
<!--Stripe credentials are set up-->
|
||||
<div v-if="paypal.allowedService">
|
||||
<div v-if="paypal.isConfigured">
|
||||
<AppInputText @input="$updateText('/admin/settings', 'paypal_payment_description', paypal.paymentDescription)" :title="$t('Payment Description')" :description="$t('The description showed below user payment method selection.')">
|
||||
<textarea rows="2" @input="$updateText('/admin/settings', 'paypal_payment_description', paypal.paymentDescription, true)" v-model="paypal.paymentDescription" :placeholder="$t('Describe in short which methods user can pay with this payment method...')" type="text" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
|
||||
<AppInputText :title="$t('Your Webhook URL')" :description="$t('Please copy your url and paste it to the service webhook setup.')">
|
||||
<CopyInput size="small" :str="getWebhookEndpoint('paypal')" />
|
||||
</AppInputText>
|
||||
|
||||
<div @click="paypal.isVisibleCredentialsForm = !paypal.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': paypal.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="14" class="vue-feather text-theme mr-2.5" />
|
||||
<b class="text-sm">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Set up Paypal credentials-->
|
||||
<ValidationObserver
|
||||
v-if="! paypal.isConfigured || paypal.isVisibleCredentialsForm"
|
||||
@submit.prevent="storeCredentials('paypal')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 border rounded-xl"
|
||||
>
|
||||
<FormLabel icon="shield">
|
||||
{{ $t('Configure Your Credentials') }}
|
||||
</FormLabel>
|
||||
<ValidationProvider tag="div" mode="passive" name="Publishable Key" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('admin_settings.payments.stripe_pub_key')" :error="errors[0]">
|
||||
<input v-model="paypal.credentials.key" :placeholder="$t('admin_settings.payments.stripe_pub_key_plac')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
<ValidationProvider tag="div" mode="passive" name="Secret Key" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('admin_settings.payments.stripe_sec_key')" :error="errors[0]">
|
||||
<input v-model="paypal.credentials.secret" :placeholder="$t('admin_settings.payments.stripe_sec_key_plac')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
</div>
|
||||
</div>
|
||||
</PageTab>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
app_logo_horizontal: '{{ $settings->app_logo_horizontal ?? null }}',
|
||||
app_description: '{{ $settings->app_description ?? __t('app_description') }}',
|
||||
|
||||
|
||||
allowHomepage: {{ $settings->allow_homepage ?? 1 }},
|
||||
userRegistration: {{ $settings->registration ?? 1 }},
|
||||
userVerification: {{ $settings->user_verification ?? 0 }},
|
||||
|
||||
@@ -17,17 +17,6 @@ class StorePaymentServiceCredentialsController
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
// Try to get stripe account details
|
||||
/*try {
|
||||
if (!app()->runningUnitTests()) {
|
||||
Stripe::make($request->input('secret'), '2020-03-02')
|
||||
->account()
|
||||
->details();
|
||||
}
|
||||
} catch (UnauthorizedException $e) {
|
||||
throw new HttpException(401, $e->getMessage());
|
||||
}*/
|
||||
|
||||
$options = [
|
||||
'stripe' => [
|
||||
'name' => 'allowed_stripe',
|
||||
|
||||
Reference in New Issue
Block a user