refund front 1
This commit is contained in:
		@ -15,12 +15,20 @@
 | 
			
		||||
</div>
 | 
			
		||||
<hr>
 | 
			
		||||
<a href='{{index .StringMap "cancel"}}' class="btn btn-info">Cancel</a>
 | 
			
		||||
<a href="#!" class="btn btn-warning">Refund Order</a>
 | 
			
		||||
<a id="refund-btn" href="#!" class="btn btn-warning">Refund Order</a>
 | 
			
		||||
<input type="hidden" id="pi" value="">
 | 
			
		||||
<input type="hidden" id="charge-amount" value="">
 | 
			
		||||
<input type="hidden" id="currency" value="">
 | 
			
		||||
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
{{define "js"}}
 | 
			
		||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
			
		||||
<script type="module">
 | 
			
		||||
    import {showInfo} from "/static/js/sale.js"
 | 
			
		||||
    import {showInfo, refund} from "/static/js/sale.js"
 | 
			
		||||
    showInfo({{.API}});
 | 
			
		||||
    document.getElementById("refund-btn").addEventListener("click", function(event) {
 | 
			
		||||
        refund({{.API}});
 | 
			
		||||
    });
 | 
			
		||||
</script>
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user