|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/kamariallee.com/public_html/application/views/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<div class="container">
<div class="row">
<div class="col-sm-12" style="text-align:center;">
<br><br>
<!-- <pre><div id="result-json">JSON result will appear here after payment:<br></div></pre> -->
<p><img src="<?= base_url('assets/frontend/img/midtrans-logo.jpg'); ?>"><br>
<img src="<?= base_url('assets/frontend/img/creditcard.jpg'); ?>"> <img src="<?= base_url('assets/frontend/img/virtualaccount.jpg'); ?>"></p>
<h3>Please click on PROCESS PAYMENT to finalize your payment</h3>
<br>
<button class="btn btn-primary" id="pay-button">PROCESS PAYMENT</button>
<!-- TODO: Remove ".sandbox" from script src URL app.sandbox.midtrans.com for production environment. Also input your client key in "data-client-key" -->
<script src="https://app.midtrans.com/snap/snap.js" data-client-key="<?= $client_key; ?>"></script>
<script type="text/javascript">
document.getElementById('pay-button').onclick = function(){
// SnapToken acquired from previous step
snap.pay('<?= $snapToken; ?>', {
// Optional
onSuccess: function(result){
/* You may add your own js here, this is just example */ document.getElementById('result-json').innerHTML += JSON.stringify(result, null, 2);
},
// Optional
onPending: function(result){
/* You may add your own js here, this is just example */ document.getElementById('result-json').innerHTML += JSON.stringify(result, null, 2);
},
// Optional
onError: function(result){
/* You may add your own js here, this is just example */ document.getElementById('result-json').innerHTML += JSON.stringify(result, null, 2);
}
});
};
</script>
<br><br><br>
</div><!-- end col-sm-12-->
</div><!-- end row-->
</div><!-- end container -->
<div id="footer" >