Skip to content

Instantly share code, notes, and snippets.

@caherrerapa
Created September 3, 2014 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caherrerapa/dc0e62d67953436f95f2 to your computer and use it in GitHub Desktop.
Save caherrerapa/dc0e62d67953436f95f2 to your computer and use it in GitHub Desktop.
function openPaymentDialog(transactionId){
console.log(transactionId);
var airtime_form_div = document.createElement('div');
airtime_form_div.setAttribute('id', 'airtime_form');
var mdn_input_url = 'https://sandbox.codapayments.com/airtime/begin?host_url=' + encodeURIComponent(window.location) + '&txn_id=' + transactionId + '&client_type=1&client_time=' + new Date().getTime();
//var mdn_input_url = 'https://sandbox.codapayments.com/airtime/begin?host_url=https://www.zeemi.tv&txn_id=' + transactionId + '&client_type=1&client_time=' + new Date().getTime();
airtime_form_div.innerHTML = '<div><iframe id=\"airtime_iframe\" src=\"' + mdn_input_url + '\" scrolling=\"no\"></iframe></div>';
var body_el = document.getElementsByTagName("body")[0];
body_el.appendChild(airtime_form_div);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment