@extends('layouts.admin.layout') @section('content') @php $postdata = $_REQUEST; $msg = ''; if (isset($postdata['key'])) { $key = $postdata['key']; $salt = 'kbwgdh7TaL'; $txnid = $postdata['txnid']; $amount = $postdata['amount']; $productInfo = $postdata['productinfo']; $firstname = $postdata['firstname']; $email = $postdata['email']; $udf5 = $postdata['udf5']; $udf1 = $postdata['udf1']; $mihpayid = $postdata['mihpayid']; $status = $postdata['status']; $resphash = $postdata['hash']; //Calculate response hash to verify $keyString = $key . '|' . $txnid . '|' . $amount . '|' . $productInfo . '|' . $firstname . '|' . $email . '|' . $udf1 . '||||' . $udf5 . '|||||'; $keyArray = explode('|', $keyString); $reverseKeyArray = array_reverse($keyArray); $reverseKeyString = implode('|', $reverseKeyArray); $CalcHashString = strtolower(hash('sha512', $salt . '|' . $status . '|' . $reverseKeyString)); if ($status == 'success' && $resphash == $CalcHashString) { $msg = 'Transaction Successful and Hash Verified...'; //Do success order processing here... } else { //tampered or failed $msg = 'Payment failed for Hash not verified...'; } } else { exit(0); } @endphp
{{ $txnid }}
{{ $amount }}
{{ $productInfo }}
{{ $udf1 }}
{{ $firstname }}
{{ $email }}
{{ $status }}
{{ $msg }}
@endsection @push('scripts') @endpush