diff --git a/auth-web/.eslintrc.js b/auth-web/.eslintrc.js
index e9e266381a..bdf58c9675 100644
--- a/auth-web/.eslintrc.js
+++ b/auth-web/.eslintrc.js
@@ -47,7 +47,7 @@ module.exports = {
'@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': true, 'variables': true }],
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true }],
- 'vue/multi-word-component-names': ['error', { 'ignores': ['Transactions'] }],
+ 'vue/multi-word-component-names': ['error', { 'ignores': ['Transactions', 'Product'] }],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
// Not ideal but shallowOnly option isn't working for this, so leaving it off for now.
// https://eslint.vuejs.org/rules/no-mutating-props.html
diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json
index b638d680cb..2f05aa20f5 100644
--- a/auth-web/package-lock.json
+++ b/auth-web/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "auth-web",
- "version": "2.6.128",
+ "version": "2.7.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "auth-web",
- "version": "2.6.128",
+ "version": "2.7.0",
"dependencies": {
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/bread-crumb": "1.0.8",
diff --git a/auth-web/package.json b/auth-web/package.json
index 055cbdc517..7fb6a9b0f4 100644
--- a/auth-web/package.json
+++ b/auth-web/package.json
@@ -1,6 +1,6 @@
{
"name": "auth-web",
- "version": "2.6.128",
+ "version": "2.7.0",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
diff --git a/auth-web/src/components/auth/common/Product.vue b/auth-web/src/components/auth/common/Product.vue
index fb9ddb4183..4784e20450 100644
--- a/auth-web/src/components/auth/common/Product.vue
+++ b/auth-web/src/components/auth/common/Product.vue
@@ -142,7 +142,6 @@
>mdi-chevron-down
-
@@ -182,6 +181,20 @@
@save:saveProductFee="saveProductFee"
/>
+
+
+ Supported payment method:
+
+
+ {{ paymentTypeIcon[method] }}{{ paymentTypeLabel[method] }}
+
+
@@ -193,193 +206,202 @@
diff --git a/auth-web/src/resources/display-mappers/payment-type-display.ts b/auth-web/src/resources/display-mappers/payment-type-display.ts
index 52dcec782a..2d355e5931 100644
--- a/auth-web/src/resources/display-mappers/payment-type-display.ts
+++ b/auth-web/src/resources/display-mappers/payment-type-display.ts
@@ -14,3 +14,33 @@ export const paymentTypeDisplay = {
[PaymentTypes.PAD]: 'Pre-Authorized Debit',
[PaymentTypes.CREDIT]: 'Account Credit'
}
+
+export const paymentTypeLabel = {
+ [PaymentTypes.BCOL]: 'BC ONLINE',
+ [PaymentTypes.CASH]: 'CASH',
+ [PaymentTypes.CHEQUE]: 'CHEQUE',
+ [PaymentTypes.CREDIT_CARD]: 'CREDIT CARD',
+ [PaymentTypes.DIRECT_PAY]: 'DIRECT PAY',
+ [PaymentTypes.EFT]: 'ELECTRONIC FUNDS TRANSFER',
+ [PaymentTypes.EJV]: 'ELECTRONIC JOURNAL VOUCHER',
+ [PaymentTypes.INTERNAL]: 'ROUTING SLIP',
+ [PaymentTypes.NO_FEE]: 'NO FEE',
+ [PaymentTypes.ONLINE_BANKING]: 'ONLINE BANKING',
+ [PaymentTypes.PAD]: 'PRE-AUTHORIZED DEBIT',
+ [PaymentTypes.CREDIT]: 'ACCOUNT CREDIT'
+}
+
+export const paymentTypeIcon = {
+ [PaymentTypes.BCOL]: 'mdi-link-variant',
+ [PaymentTypes.CASH]: '',
+ [PaymentTypes.CHEQUE]: '',
+ [PaymentTypes.CREDIT_CARD]: 'mdi-credit-card-outline',
+ [PaymentTypes.DIRECT_PAY]: '',
+ [PaymentTypes.EFT]: 'mdi-arrow-right-circle-outline',
+ [PaymentTypes.EJV]: '',
+ [PaymentTypes.INTERNAL]: '',
+ [PaymentTypes.NO_FEE]: '',
+ [PaymentTypes.ONLINE_BANKING]: 'mdi-bank-outline',
+ [PaymentTypes.PAD]: 'mdi-bank-outline',
+ [PaymentTypes.CREDIT]: 'ACCOUNT CREDIT'
+}
diff --git a/auth-web/src/services/codes.service.ts b/auth-web/src/services/codes.service.ts
index 95acd2a428..8a85e7f54d 100644
--- a/auth-web/src/services/codes.service.ts
+++ b/auth-web/src/services/codes.service.ts
@@ -7,4 +7,11 @@ export default class CodesService {
public static async getCodes (codeType: string): Promise> {
return axios.get(`${ConfigHelper.getAuthAPIUrl()}/codes/${codeType}`)
}
+
+ public static async getPaymentMethods (productCode?: string): Promise> {
+ const url = productCode
+ ? `${ConfigHelper.getPayAPIURL()}/codes/valid_payment_methods/${productCode}`
+ : `${ConfigHelper.getPayAPIURL()}/codes/valid_payment_methods`
+ return axios.get(url)
+ }
}
diff --git a/auth-web/src/stores/org.ts b/auth-web/src/stores/org.ts
index e0f2ec87d7..a75fcbd845 100644
--- a/auth-web/src/stores/org.ts
+++ b/auth-web/src/stores/org.ts
@@ -45,6 +45,7 @@ import { AccountSettings } from '@/models/account-settings'
import { Address } from '@/models/address'
import { AutoCompleteResponse } from '@/models/AutoComplete'
import BcolService from '@/services/bcol.services'
+import CodesService from '@/services/codes.service'
import CommonUtils from '@/util/common-util'
import ConfigHelper from '@/util/config-helper'
import { EmptyResponse } from '@/models/global'
@@ -87,6 +88,7 @@ export const useOrgStore = defineStore('org', () => {
memberLoginOption: '' as string,
currentOrgGLInfo: undefined as GLInfo,
productList: [] as OrgProduct[], // list of all products
+ productPaymentMethods: {} as {[key: string]: string[]},
currentSelectedProducts: [] as any, // selected product list code in array
currentStatementNotificationSettings: {} as StatementNotificationSettings,
statementSettings: {} as StatementSettings,
@@ -889,6 +891,17 @@ export const useOrgStore = defineStore('org', () => {
return []
}
+ async function getProductPaymentMethods (productCode?: string | undefined): Promise {
+ const response: any = await CodesService.getPaymentMethods(productCode || undefined)
+ if (response?.data && response.status === 200) {
+ const result = response.data
+ state.productPaymentMethods = result
+ return result
+ }
+ state.productPaymentMethods = {}
+ return {}
+ }
+
async function addToCurrentSelectedProducts ({ productCode, forceRemove = false }): Promise {
const currentSelectedProducts = state.currentSelectedProducts
const isAlreadySelected = currentSelectedProducts.includes(productCode)
@@ -1145,6 +1158,7 @@ export const useOrgStore = defineStore('org', () => {
getOrgProducts,
addOrgProducts,
getProductList,
+ getProductPaymentMethods,
addToCurrentSelectedProducts,
resetoCurrentSelectedProducts,
refundInvoice,
diff --git a/auth-web/src/views/auth/create-account/AccountSetupView.vue b/auth-web/src/views/auth/create-account/AccountSetupView.vue
index 7356437783..0d30b762c3 100644
--- a/auth-web/src/views/auth/create-account/AccountSetupView.vue
+++ b/auth-web/src/views/auth/create-account/AccountSetupView.vue
@@ -156,8 +156,8 @@ export default class AccountSetupView extends Vue {
private stepperConfig: Array =
[
{
- title: 'Select Product and Services',
- stepName: 'Products and Services',
+ title: 'Select Products and Services',
+ stepName: 'Products and Payment',
component: SelectProductService,
componentProps: {
isStepperView: true,
diff --git a/auth-web/src/views/auth/create-account/non-bcsc/NonBcscAccountSetupView.vue b/auth-web/src/views/auth/create-account/non-bcsc/NonBcscAccountSetupView.vue
index e039fd016b..8f8d5dbab1 100644
--- a/auth-web/src/views/auth/create-account/non-bcsc/NonBcscAccountSetupView.vue
+++ b/auth-web/src/views/auth/create-account/non-bcsc/NonBcscAccountSetupView.vue
@@ -150,8 +150,8 @@ export default class NonBcscAccountSetupView extends Vue {
private accountStepperConfig: Array =
[
{
- title: 'Select Product and Services',
- stepName: 'Products and Services',
+ title: 'Select Products and Services',
+ stepName: 'Products and Payment',
component: SelectProductService,
componentProps: {
isStepperView: true,