Updated Luminate's templates and backed up to sandbox.
This commit is contained in:
@ -5,19 +5,21 @@
|
||||
<div class="np-homepage-headline">
|
||||
{{ homepage.featured_courses_headline }}
|
||||
</div>
|
||||
{%- comment -%}
|
||||
<div id="dvsnappay_hppform">
|
||||
<!-- HTML is dynamically placed here -->
|
||||
</div>
|
||||
<input id="snappayhppform_response" name="snappayhppform_response" />
|
||||
|
||||
|
||||
<button type="button" value="Submit" onclick="myclick()" class="button" style="border:none; background:transparent;">
|
||||
Purchase access to a course!
|
||||
<div id='mylink'></div>
|
||||
</button>
|
||||
|
||||
|
||||
<div id="dvsnappay_hppform">
|
||||
</div>
|
||||
<input src="https://stage.snappayglobal.com/Interop/HostedPaymentPage" id="snappayhppform_response" type="hidden" name="snappayhppform_response" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function myclick() {
|
||||
var mylink = document.getElementById('mylink');
|
||||
@ -31,41 +33,40 @@
|
||||
t.setAttribute("data-merchantid", "822200009000");
|
||||
t.setAttribute("data-customerid", "100");
|
||||
t.setAttribute("data-paymentmode", "CC");
|
||||
t.setAttribute("data-transactionamount", '{{ course.properties.cost }}');
|
||||
t.setAttribute("data-transactionamount", "100");
|
||||
t.setAttribute("data-currencycode", "USD");
|
||||
t.setAttribute("data-firstname", "No one");
|
||||
t.setAttribute("data-lastname", "Noooo One");
|
||||
t.setAttribute("data-email", "Noone@none.com");
|
||||
t.setAttribute("data-redirectionurl", "https://luminatesandbox.northpass.com/app"); //url they are currently on
|
||||
t.setAttribute("data-redirectionurl", "https://luminatesandbox.northpass.com/app");
|
||||
t.setAttribute("data-snappayurl", "https://stage.snappayglobal.com/Interop/HostedPaymentPage");
|
||||
document.getElementsByTagName("head")[0].appendChild(t);
|
||||
return false;
|
||||
}
|
||||
document.getElementById('mylink').click();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var response = document.getElementById('snappayhppform_response');
|
||||
function submit_external_ecommerce() {
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function submit_external_ecommerce() {
|
||||
var result = $("#snappayhppform_response").val();
|
||||
sessionStorage.setItem("snappayhpp_response", result);
|
||||
sessionStorage.setItem("caller", "js");
|
||||
|
||||
var obj = JSON.parse(result);
|
||||
var response = obj['response']
|
||||
// var pgreturncode = response['pgreturncode']
|
||||
// sessionStorage.setItem("returncode", pgreturncode)
|
||||
var inside = JSON.parse(obj['response'])
|
||||
console.log(inside)
|
||||
sessionStorage.setItem("insidevals", inside)
|
||||
var stringside = JSON.stringify(inside)
|
||||
sessionStorage.setItem("stringside", stringside)
|
||||
|
||||
}
|
||||
|
||||
var obj = JSON.parse(result);
|
||||
var response = obj['response']
|
||||
// var pgreturncode = response['pgreturncode']
|
||||
// sessionStorage.setItem("returncode", pgreturncode)
|
||||
var inside = JSON.parse(obj['response'])
|
||||
sessionStorage.setItem("insidevals", inside)
|
||||
var stringside = JSON.stringify(inside)
|
||||
sessionStorage.setItem("stringside", stringside)
|
||||
console.log(inside)
|
||||
|
||||
// Set course prop as whole number, if 0, don't do anything
|
||||
// If user is not enrolled in course, run functions - check error message
|
||||
// With redirect they will land back on page, with error message from sessionstorage
|
||||
// If no error, auto-redirect/click to enrollment link. window.replace(/c/aklwjdalkjd)
|
||||
</script>
|
||||
{%- endcomment -%}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user