Customization On Payment Page

Example Java script code for payment page 

1. In CMS add a data source called 'buy_now.js'

2. Example code to create a message block to add a 'Payment condition and Return Policy' and accept user agreement. If agreement not accepted payment can't be completed. 

 

var link = document.getElementById('left-panel');
link.style.display = '';

function Campaign_entry(){         
           campaignExitNeeded = true;
           $("#purchasePromotion1").html("<div id='promo' class='blue_panel' style='background-color:#E1E4E6; width:635px'<b>&nbsp;Payment condition and Return Policy</b<br/>&nbsp; Before completing payment <href='https://nmtest.edubrite.com/oltpublish/theme-lms/cms.do?view=return_policy' target='_blank'>

<b>Click here </b></ato Read the terms of agrrement.<br/> <br/> &nbsp;<input id='accept' value='true' validate='not_empty' type='checkbox' style='width:18px;height:18px;'

I HAVE READ THE AGREEMENT* <br/><br/> </div<div>&nbsp;</div>")

}

function Campaign_Exit(){
     if(campaignExitDone){
      return;
     }
     c = document.getElementById('accept');
     if(c.checked) {
        campaignExitDone = true;
        submitToPayProvider();
      } else { 
        alert("Please Accept Agreement");  
     }
     
}
 

 

 


Rating: