PHP instant account payment example without signing a contract
Release: 2016-07-25 08:48:07
Original
1356 people have browsed it
http://www.jcb6.com specializes in Alipay, Tenpay and instant payment. Website recharge is worry-free Supports any language system and instant payment.
- include_once ('../global.php');
- include_once ('../configs/website.inc.php');
- $syskey=$conf_arr['cfg_portalkey']; //The KEY set in the background is compared with the key value of the interface address on the software
- $out_trade_no=$_GET['name']; //[Username] on the software and [Payment Instructions] in Alipay transactions are equivalent to those on the website Recharge order
- $key=trim($_GET['key']);//The key on the interface is equal to the backend key before logical processing is performed to ensure safety
- $money=$_GET['money'];//Equivalent to Payment amount in transaction
- if($out_trade_no!=''){
- if($key==$syskey){
- $sql="select * from ke_order where out_trade_no='$out_trade_no' limit 1";
- $result =mysql_query($sql);
- $total = mysql_num_rows($result);
- $row=mysql_fetch_assoc($result);
- if($total==0){
- echo '0'; exit(); //Prevent Submitted maliciously
- }else{
- if($row['statu']==0){//Check whether it has been processed first, if not, continue
- $email=$row['email'];$mktime =mktime();
- if($email!==""){
- mysql_query("update `ke_member`set amount=amount+$money where username='$email'"); //Add money to the membership table
- mysql_query( "update `ke_order`set statu=1,money=$money where out_trade_no='$out_trade_no'"); //Change the recharge order information
- }
- echo '1';exit(); //Return 1 after the software receives it Displays that the recharge is successful and returns 0. After the software receives it, it displays that the recharge failed
- }else{
- echo '0';exit(); //If the order has been processed, that is, it has been credited, exit to prevent repeated crediting
- }
- }
- }
- }else{
- echo '0';exit();
- }
- ?>
Copy code
|
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31