Skip to content

Instantly share code, notes, and snippets.

@bhaktaraz
Created July 26, 2018 05:24
Show Gist options
  • Save bhaktaraz/78cb2180e4b3f4a41a4fa4e692d56ffc to your computer and use it in GitHub Desktop.
Save bhaktaraz/78cb2180e4b3f4a41a4fa4e692d56ffc to your computer and use it in GitHub Desktop.
eSewa Integration Example
<h1>Redirecting...</h1>
<div style="display: none;">
<form action="{{ esewa_payment_url }}" method="POST" target="_parent" name="esewa">
<input value="{{ tAmt }}" name="tAmt" type="hidden">
<input value="{{ tAmt }}" name="amt" type="hidden">
<input value="0" name="txAmt" type="hidden">
<input value="0" name="psc" type="hidden">
<input value="0" name="pdc" type="hidden">
<input value="{{ esewa_service_code }}" name="scd" type="hidden">
<input value="{{ pid }}" name="pid" type="hidden">
<input value="{{ esewa_success_url }}" type="hidden" name="su">
<input value="{{ esewa_failure_url }}" type="hidden"
name="fu">
<input value="Continue to Payment" type="submit" style="border-radius:8px; background:#3C0; font-size:20px; color:#fff; font-weight:bold; padding:6px; width:60%;">
</form>
</div>
<script>
window.onload = function () {
document.forms['esewa'].submit()
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment