芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/ProZigzagbus Web Admin 1.2/result.php
query("SELECT * FROM `tbl_payment_list` where id=10")->fetch_assoc(); $kk = explode(',',$kb['attributes']); /** * This is a sample code for manual integration with senangPay * It is so simple that you can do it in a single file * Make sure that in senangPay Dashboard you have key in the return URL referring to this file for example http://myserver.com/senangpay_sample.php */ # please fill in the required info as below // live creditinals $merchant_id = $kk[0]; $secretkey = $kk[1]; # this part is to process data from the form that user key in, make sure that all of the info is passed so that we can process the payment if(isset($_GET['detail']) && isset($_GET['amount']) && isset($_GET['order_id']) && isset($_GET['name']) && isset($_GET['email']) && isset($_GET['phone'])) { # assuming all of the data passed is correct and no validation required. Preferably you will need to validate the data passed $hashed_string = hash_hmac('sha256', $secretkey.urldecode($_GET['detail']).urldecode($_GET['amount']).urldecode($_GET['order_id']), $secretkey); # now we send the data to senangPay by using post method # https://app.senangpay.my/payment/ --> live url # https://sandbox.senangpay.my/payment/ --> test url ?>
senangPay Sample Code
$_GET['transaction_id'],"ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>urldecode($_GET['msg'])); echo json_encode($returnArr); } else { $returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>urldecode($_GET['msg'])); echo json_encode($returnArr); } } else echo 'Hashed value is not correct'; } # this part is to show the form where customer can key in their information else { # by right the detail, amount and order ID must be populated by the system, in this example you can key in the value yourself ?>