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
| import ReactNative from 'react-native'; | |
| import I18n from 'react-native-i18n'; | |
| import moment from 'moment'; | |
| // Import all locales | |
| import en from './en.json'; | |
| import he from './he.json'; | |
| // Should the app fallback to English if user locale doesn't exists | |
| I18n.fallbacks = true; |
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
| import express from 'express'; | |
| import bodyParser from 'body-parser'; | |
| import routes from './server/routes'; | |
| const app = express(); | |
| // ... | |
| // Parse application/x-www-form-urlencoded |
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
| import IPNController from './controllers/ipn.ctrl'; | |
| function routes(app) { | |
| // ... | |
| // PayPal IPN endpoint | |
| app.post('/ipn', IPNController.index); | |
| // ... | |
| } |
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
| class IPNController { | |
| static index(req, res) { | |
| console.log('It works! 😀'); | |
| res.status(200).send('OK'); | |
| res.end(); | |
| } | |
| } |
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
| import request from 'request'; | |
| import querystring from 'querystring'; | |
| import Promise from 'bluebird'; | |
| class PayPalService { | |
| static validate(body = {}) { | |
| return new Promise((resolve, reject) => { | |
| // Prepend 'cmd=_notify-validate' flag to the post string | |
| let postreq = 'cmd=_notify-validate'; |
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
| class IPNController { | |
| static async index(req, res) { | |
| // Send 200 status back to PayPal | |
| res.status(200).send('OK'); | |
| res.end(); | |
| const body = req.body || {}; | |
| // Validate IPN message with PayPal |
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
| class IPNController { | |
| static async index(req, res) { | |
| // Send 200 status back to PayPal | |
| res.status(200).send('OK'); | |
| res.end(); | |
| const body = req.body || {}; | |
| // Validate IPN message with PayPal |
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
| <div class="modal"> | |
| <div class="overlay"></div> | |
| <div class="modal_content"> | |
| <!-- Dynamic Section --> | |
| <h2>Hey Awesome Modal!</h2> | |
| <p style="text-align: center;"> | |
| Cupcake ipsum dolor sit amet pie brownie. Carrot cake wafer I love pie bear claw. Sweet cake cheesecake candy canes carrot cake marshmallow. Sweet roll I love sweet fruitcake donut chupa. | |
| </p> | |
| <!-- End of Dynamic Section --> | |
| <button title="Close" class="close_modal"> |
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
| .modal { | |
| position: fixed; | |
| left: 0; | |
| top: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: 990; | |
| } | |
| .modal .overlay { |
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
| <div class="modal" style="display: none"> | |
| <div class="overlay"></div> | |
| <div class="modal_content"> | |
| <!-- Dynamic Section --> | |
| <h2>Told Ya!</h2> | |
| <iframe src="https://giphy.com/embed/l52CGyJ4LZPa0" width="480" height="273" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/sandler-sentences-sounding-l52CGyJ4LZPa0">via GIPHY</a></p> | |
| <!-- End of Dynamic Section --> | |
| <button title="Close" class="close_modal"> | |
| <i class="fas fa-times"></i> | |
| </button> |