completed velocity integration
This commit is contained in:
@@ -34,6 +34,19 @@
|
||||
<title>Velocity</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<script type="text/javascript">
|
||||
// If there's a pending transaction ID stored before redirecting to the
|
||||
// payment gateway, forward to /poll/:id so Flutter can start polling
|
||||
// for the result immediately.
|
||||
(function() {
|
||||
var txId = localStorage.getItem('pendingTransactionId');
|
||||
if (txId) {
|
||||
// The gateway redirected back to us. Clear the pending ID and
|
||||
// navigate to /poll/:id using the path-based URL strategy.
|
||||
localStorage.removeItem('pendingTransactionId');
|
||||
window.location.replace('/poll/' + encodeURIComponent(txId));
|
||||
}
|
||||
})();
|
||||
|
||||
function configure(sessionID) {
|
||||
if (typeof Checkout === 'undefined') {
|
||||
throw new Error('Checkout SDK not loaded.');
|
||||
@@ -59,4 +72,4 @@
|
||||
<body>
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user