begin stripe plugin

This commit is contained in:
2023-07-25 15:23:49 +02:00
parent ff277a41ae
commit 782a245c17
10 changed files with 122 additions and 10 deletions

View File

@@ -7,9 +7,22 @@ You will also need to add documentation for the user to set up the payment gatew
In the routes.js file you should have at least the following code:
```
module.exports = ( app ) => {
module.exports = ( app, settings ) => {
app.post( '/payments/prepare', ( req, res ) => {
}
} );
app.get( '/payments/status', ( request, response ) => {
response.writeHead( 200, {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
} );
response.status( 200 );
response.flushHeaders();
response.write( 'data: connected\n\n' );
} );
}
```
Take some inspiration of the stripe or adyen setup as these are officially supported by the system and have been developed by the original creator.