RE: How to implement GTPay in laravel 5.1 ?

How to implement GTPay in laravel 5.1 ?

ahaladh Default Asked on February 26, 2019 in PHP.
Add Comment
2 Answers

It is mandatory to include the hash tag on all mandatory parameters sent to GTPay gateway so as to guard against middle man attack. These parameters include;

–       GTPAY Transaction ID
–       Transaction Amount
–       Transaction Notification URL
–       Transaction Currency

Kindly carry out transaction re-query and verify that the transaction details (including currency) are accurate for every transaction.

You are required to perform a sha512 hash of [gtpay_mert_id,gtpay_tranx_id,gtpay_tranx_amt,gtpay_tranx_curr,gtpay_cust_id,gtpay_tranx_noti_url,gtpay hash]

There is a site that you can use to generate a hash  parameter and compare with what your site is generating.

The url is http://www.fileformat.info/tool/hash.htm

 

<?php

$the_key = trim('4329'.'65124534569'.'9900'.'566'.'4244327'.'avianceschool.com'.'xxxxxxxxxxxxxxx');

$HASH = hash('sha512',$the_key,false);

?>

<html>
<body>
<form name="submit2gtpay_form" action="https://ibank.gtbank.com/GTPay/Tranx.aspx" target="_self" method="post">

<input type="hidden" name="gtpay_mert_id" value="4329" >
<input type="hidden" name="gtpay_tranx_id" value="65124534569" >
<input type="hidden" name="gtpay_tranx_amt" value="9900" >
<input type="hidden" name="gtpay_tranx_curr" value="566">
<input type="hidden" name="gtpay_cust_id" value="4244327">
<input type="hidden" name="gtpay_cust_name" value="Aviance" >
<input type="hidden" name="gtpay_tranx_memo" value="purchase">
<input type="hidden" name="gtpay_echo_data" value="Payment">
<input type="hidden" name="gtpay_gway_name" value="">
<input type="hidden" name="gtpay_hash" value="<?php echo $HASH; ?>">
<input type="hidden" name="gtpay_tranx_noti_url" value="avianceschool.com">
<input type="submit" value="Pay Via GTPay" name="btnSubmit">
<input type="hidden" name="gtpay_echo_data" value="">
</form>
</body>
</html>
Team Leader Answered on February 26, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.