From 7e4148aaba3054d189f5d3bb54cc9f5ecf54ed2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 30 Dec 2019 18:35:23 +0300 Subject: [PATCH] close #1055 Added: Portal Invoice payment hosted credit card style --- .../js/components/CreditCard/CardForm.vue | 688 ++++++++++++------ resources/assets/js/views/portal/invoices.js | 53 +- resources/lang/en-GB/general.php | 10 + .../payment_method/hosted/show.blade.php | 17 +- .../payment_method/hosted/signed.blade.php | 17 +- 5 files changed, 543 insertions(+), 242 deletions(-) diff --git a/resources/assets/js/components/CreditCard/CardForm.vue b/resources/assets/js/components/CreditCard/CardForm.vue index 5d97ad9ca..367d0ae93 100644 --- a/resources/assets/js/components/CreditCard/CardForm.vue +++ b/resources/assets/js/components/CreditCard/CardForm.vue @@ -1,10 +1,10 @@ diff --git a/resources/assets/js/views/portal/invoices.js b/resources/assets/js/views/portal/invoices.js index f3f2d9865..30111e68a 100644 --- a/resources/assets/js/views/portal/invoices.js +++ b/resources/assets/js/views/portal/invoices.js @@ -60,7 +60,23 @@ const app = new Vue({ if (response.data.html) { this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) { resolve({ - template: response.data.html, + template: '
' + response.data.html + '
', + + components: { + CardForm + }, + + data: function () { + return { + formData: { + cardName: '', + cardNumber: '', + cardMonth: '', + cardYear: '', + cardCvv: '' + } + } + }, methods: { onRedirectConfirm() { @@ -97,8 +113,6 @@ const app = new Vue({ }, onChangePaymentMethodSigned(event) { - let method = event.split('.'); - this.form.payment_action = event; let payment_action = payment_action_path[event]; @@ -114,7 +128,23 @@ const app = new Vue({ if (response.data.html) { this.method_show_html = Vue.component('payment-method-confirm', function (resolve, reject) { resolve({ - template: response.data.html, + template: '
' + response.data.html + '
', + + components: { + CardForm + }, + + data: function () { + return { + formData: { + cardName: '', + cardNumber: '', + cardMonth: '', + cardYear: '', + cardCvv: '' + } + } + }, methods: { onRedirectConfirm() { @@ -131,20 +161,5 @@ const app = new Vue({ this.method_show_html = error.message; }); }, - - updateCardNumber (val) { - }, - - updateCardName (val) { - }, - - updateCardMonth (val) { - }, - - updateCardYear (val) { - }, - - updateCardCvv (val) { - } } }); diff --git a/resources/lang/en-GB/general.php b/resources/lang/en-GB/general.php index 1ce10d2c3..ac549024e 100644 --- a/resources/lang/en-GB/general.php +++ b/resources/lang/en-GB/general.php @@ -141,6 +141,16 @@ return [ 'group_by' => 'Group By', 'accounting' => 'Accounting', + 'month' => 'Month', + 'year' => 'Year', + + 'card' => [ + 'name' => 'Name on Card', + 'number' => 'Card Number', + 'expiration_date' => 'Expiration Date', + 'cvv' => 'Card CVV', + ], + 'title' => [ 'new' => 'New :type', 'edit' => 'Edit :type', diff --git a/resources/views/partials/portal/payment_method/hosted/show.blade.php b/resources/views/partials/portal/payment_method/hosted/show.blade.php index 159a7cb11..73b1079a3 100644 --- a/resources/views/partials/portal/payment_method/hosted/show.blade.php +++ b/resources/views/partials/portal/payment_method/hosted/show.blade.php @@ -1,8 +1,15 @@ diff --git a/resources/views/partials/portal/payment_method/hosted/signed.blade.php b/resources/views/partials/portal/payment_method/hosted/signed.blade.php index 159a7cb11..73b1079a3 100644 --- a/resources/views/partials/portal/payment_method/hosted/signed.blade.php +++ b/resources/views/partials/portal/payment_method/hosted/signed.blade.php @@ -1,8 +1,15 @@