Commit c83d5a2e authored by Aral Balkan's avatar Aral Balkan

Move cancel route under fund-us route; add pause patronage section

parent bfd77343
Pipeline #875 canceled with stages
......@@ -76,7 +76,7 @@ module.exports = async (request, response) => {
<h2>Update your patronage</h2>
<p>This will update your patronage amount.</p>
<p>This will update your patronage amount effective immediately.</p>
<form action='/patronage?action=update&id=${subscriptionId}'>
<label for='amount'>Amount (€/month):<label>
......@@ -84,6 +84,14 @@ module.exports = async (request, response) => {
<input type='submit' value='Update my patronage' />
</form>
<h2>Pause your patronage</h2>
<p>This will pause your patronage effective immediately. You can resume it again at any point.</p>
<form action='/patronage?action=pause&id=${subscriptionId}'>
<input type='submit' value='Pause my patronage' />
</form>
<h2>Cancel your patronage</h2>
<p>This will stop your monthly patronage effective immediately.</p>
......
......@@ -26,7 +26,7 @@
{plan: 'plan_FSsO2vwva5oEOP', quantity: 100}
],
successUrl: 'https://aral.hypha.dev/patronage/?id={CHECKOUT_SESSION_ID}',
cancelUrl: 'https://aral.hypha.dev/patronage/?status=failed',
cancelUrl: 'https://aral.hypha.dev/fund-us/cancel',
}).then(function (result) {
// If `redirectToCheckout` fails due to a browser or network
// error, display the localized error message to your customer
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Success</title>
<style>
html {
color: black;
background-color: white;
}
</style>
</head>
<body>
<h1>Success!</h1>
<p id='message'></p>
<script>
const urlParams = new URLSearchParams(window.location.search)
const sessionId = urlParams.get('session_id')
const adminPageUrl = `https://aral.hypha.dev/fund-us/?session_id=${sessionId}`
document.querySelector('#message').innerHTML = `
Please bookmark this address: <a href='${adminPageUrl}'>Your patronage page</a>.
It is the page from which you can make changes to your patronage.
`
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment