payment cancellation

This commit is contained in:
2023-08-03 16:44:23 +02:00
parent 8784f79014
commit 935c8e32da
3 changed files with 25 additions and 3 deletions

View File

@@ -6,3 +6,13 @@
* *
* *
*/ */
const path = require( 'path' );
// const ph = require( './paymentHandler.js' );
// const paymentHandler = new ph();
module.exports = ( app, settings ) => {
app.get( '/payments/canceled', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../../ui/en/payments/canceled.html' ) );
} );
};

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Payment Canceled</title>
</head>
<body>
<h1>Payment Canceled</h1>
<p>You have canceled your payment!</p>
<p>This was a mistake? Head back to the payment page!</p>
<button onclick="history.back()">Back to payment</button>
</body>
</html>

View File

@@ -48,8 +48,6 @@ router.beforeEach( ( to, from ) => {
return { name: 'login' }; return { name: 'login' };
} else if ( isUserAuthenticated && to.name === 'login' ) { } else if ( isUserAuthenticated && to.name === 'login' ) {
return { name: 'account' }; return { name: 'account' };
} else if ( !isUserAuthenticated && to.name === 'pay' ) {
return { name: 'purchase' };
} else if ( to.name === '2fa' && !userStore.getUserTwoFACompliant ) { } else if ( to.name === '2fa' && !userStore.getUserTwoFACompliant ) {
return { name: 'login' }; return { name: 'login' };
} else if ( to.name === 'Admin2fa' && !userStore.getAdminTwoFACompliant ) { } else if ( to.name === 'Admin2fa' && !userStore.getAdminTwoFACompliant ) {