This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<title>Card payment</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" | |
crossorigin="anonymous"> > | |
<meta name="viewport" , content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Handle card payment using Flutterwave API | |
* | |
*/ | |
'use strict'; | |
const express = require('express'); | |
const router = express.Router(); | |
const request = require('request'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Process mobile money payments using Mazzuma API | |
* | |
*/ | |
'use strict'; | |
const request = require('request'); | |
const sendTextMessage = require('../actions/sendTextMsg'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Handle postbacks received by bot server | |
* | |
*/ | |
'use strict'; | |
// Assume you have these functions defined and exported in your project folder | |
const sendTextMessage = require('../actions/sendTextMsg'); | |
const processMobilemoney = require('./process-mobilemoney-gh'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Handle messages received by bot server | |
* | |
*/ | |
'use strict'; | |
// Assume you have these functions defined and exported in your project folder | |
const sendTextMessage = require('../actions/sendTextMsg'); | |
const sendButtonMsg = require('../actions/sendButtonMsg'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quickReplies.push({ | |
"content_type": "text", | |
"title": "Next", | |
"payload": "nextslice_5_10" | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const productQuickreplies = (products, sliceSet, beginSlice, endSlice) => { | |
// slice the elements of the array to the desired set size | |
let slicedProducts = products.slice(beginSlice, endSlice); | |
// form an array of quick replies with title and payload | |
let quickReplies = slicedProducts.map(product => { | |
return { | |
"content_type": "text", | |
"title": product.title, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
_id: '59ed1ed9be3ee700123e4e4a', | |
title: 'shoes', | |
status: 'Active', | |
__v: 0, | |
}, | |
{ | |
_id: '59ed1ee7be3ee700123e4e4b', | |
title: 'casual', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
text-align: center; | |
padding: 1.5em 0; | |
} | |
img { | |
width: 40%; | |
height: auto; | |
} |