tango-app-api-payment-subscription 3.1.19 → 3.1.21-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -178,9 +178,7 @@ export async function invoiceDownload( req, res ) {
|
|
|
178
178
|
} );
|
|
179
179
|
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
tax.taxAmount = Math.round( tax.taxAmount ).toLocaleString( 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2 } );
|
|
183
|
-
}
|
|
181
|
+
|
|
184
182
|
let invoiceDate = dayjs( invoiceInfo.createdAt ).format( 'DD/MM/YYYY' );
|
|
185
183
|
let days = clientDetails?.paymentInvoice?.extendPaymentPeriodDays || 10;
|
|
186
184
|
let dueDate = invoiceInfo?.dueDate ? dayjs( invoiceInfo?.dueDate ).format( 'DD/MM/YYYY' ) : dayjs().add( days, 'days' ).format( 'DD/MM/YYYY' );
|
|
@@ -7,25 +7,25 @@ import { getInvoiceSchema, getVirtualAccountSchema, valletPayValid, verifyPaymen
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
paymentRouter.get( '/get-virtual-account', isAllowedSessionHandler, authorize( {
|
|
10
|
-
userType: [ 'tango' ], access: [
|
|
10
|
+
userType: [ 'tango', 'client' ], access: [
|
|
11
11
|
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
12
12
|
],
|
|
13
13
|
} ), validate( getVirtualAccountSchema ), getVirtualAccount );
|
|
14
14
|
|
|
15
15
|
paymentRouter.get( '/wallet-pay/:invoice', isAllowedSessionHandler, authorize( {
|
|
16
|
-
userType: [ 'tango' ], access: [
|
|
16
|
+
userType: [ 'tango', 'client' ], access: [
|
|
17
17
|
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
18
18
|
],
|
|
19
19
|
} ), validate( valletPayValid ), payUsingVallet );
|
|
20
20
|
|
|
21
21
|
paymentRouter.get( '/generate-order/:invoice', isAllowedSessionHandler, authorize( {
|
|
22
|
-
userType: [ 'tango' ], access: [
|
|
22
|
+
userType: [ 'tango', 'client' ], access: [
|
|
23
23
|
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
24
24
|
],
|
|
25
25
|
} ), validate( valletPayValid ), generateOrder );
|
|
26
26
|
|
|
27
27
|
paymentRouter.post( '/verify-payment/:invoice', isAllowedSessionHandler, authorize( {
|
|
28
|
-
userType: [ 'tango' ], access: [
|
|
28
|
+
userType: [ 'tango', 'client' ], access: [
|
|
29
29
|
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
30
30
|
],
|
|
31
31
|
} ), validate( verifyPaymentValid ), verifyPayment );
|