php:online payment

Jul 30, 2016 pm 01:31 PM
data gt input lt quot

<html> <head> <meta http-equiv="content_type" c/span>"text/html;charset=gb2312" /> head> <form action="payconfirm.php" method="post"> <table> <tr> <td colspan="4"> 订单号:<input type="text" name="p2_Order"/> 支付金额:<input type="text" name="p3_Amt"/> td> tr> <tr><td colspan="4">请选择银行:td>tr> <tr> <td><input type="radio" name="pd_FrpId" value="CCB-NET"/>建设银行td> <td><input type="radio" name="pd_FrpId" value="ABC-NET"/>农业银行td> <td><input type="radio" name="pd_FrpId" value="CMBCHINA-NET"/>招商银行td> <td><input type="radio" name="pd_FrpId" value="ICBC-NET"/>工商银行td> tr> <tr><td colspan="4"><input type="submit" value="支付">td>tr> table> form> html><html> <head> <meta http-equiv="content-type" c/span>"text/html;charset=gb2312" /> head> include_once 'common.php'; //获取支付请求信息 $p0_Cmd="Buy"; $p1_MerId="10012006921";//商户编号(测试帐号) $p2_Order=$_POST['p2_Order']; $p3_Amt=$_POST['p3_Amt'];//支付金额,请务必注意金额; $p4_Cur="CNY"; $p5_Pid=""; $p6_Pcat=""; $p7_Pdesc=""; $p8_Url="http://localhost:80/Hanshunping/PAY/res.php"; $p9_SAF="0"; $pa_MP=""; $pd_FrpId=$_POST['pd_FrpId']; $pr_NeedResponse="1"; /* hmac是一种对称密钥验证算法。 通过请求参数拼接的字符串和贵公司在易宝支付的密钥生成。作用是防止恶意篡改请求数据。*/ $data=""; $data=$data.$p0_Cmd; $data=$data.$p1_MerId; $data=$data.$p2_Order; $data=$data.$p3_Amt; $data=$data.$p4_Cur; $data=$data.$p5_Pid; $data=$data.$p6_Pcat; $data=$data.$p7_Pdesc; $data=$data.$p8_Url; $data=$data.$p9_SAF; $data=$data.$pa_MP; $data=$data.$pd_FrpId; $data=$data.$pr_NeedResponse; $Merchantkey="qV490l4XHJ6Dc32Zu7x90V43gVP4C5061938W01t47S1AY734Dcr27011546"; $hmac=HmacMd5($data,$Merchantkey); ?> 您的订单号为: $p2_Order; ?> 支付金额为:$p3_Amt;?> <form action="https://www.yeepay.com/app-merchant-proxy/node" method="post"> <input type="hidden" name="p0_Cmd" value="$p0_Cmd;?>"/> <input type="hidden" name="p1_MerId" value="$p1_MerId;?>"/> <input type="hidden" name="p2_Order" value="$p2_Order;?>"/> <input type="hidden" name="p3_Amt" value="$p3_Amt;?>"/> <input type="hidden" name="p4_Cur" value="$p4_Cur;?>"/> <input type="hidden" name="p5_Pid" value="$p5_Pid;?>"/> <input type="hidden" name="p6_Pcat" value="$p6_Pcat;?>"/> <input type="hidden" name="p7_Pdesc" value="$p7_Pdesc;?>"/> <input type="hidden" name="p8_Url" value="$p8_Url;?>"/> <input type="hidden" name="p9_SAF" value="$p9_SAF;?>"/> <input type="hidden" name="pa_MP" value="$pa_MP;?>"/> <input type="hidden" name="pd_FrpId" value="$pd_FrpId;?>"/> <input type="hidden" name="pr_NeedResponse" value="$pr_NeedResponse;?>"/> <input type="hidden" name="hmac" value="$hmac;?>"/> <input type="submit" value="确认支付"/> form> html>
function HmacMd5($data,$key) { // RFC 2104 HMAC implementation for php. // Creates an md5 HMAC. // Eliminates the need to install mhash to compute a HMAC // Hacked by Lance Rushing(NOTE: Hacked means written) //需要配置环境支持iconv,否则中文参数不能正常处理
$key = iconv("GB2312","UTF-8",$key); $data = iconv("GB2312","UTF-8",$data); $b = 64; // byte length for md5 if (strlen($key) > $b) { $key = pack("H*",md5($key)); } $key = str_pad($key, $b, chr(0x00)); $ipad = str_pad('', $b, chr(0x36)); $opad = str_pad('', $b, chr(0x5c)); $k_ipad = $key ^ $ipad ; $k_opad = $key ^ $opad; return md5($k_opad . pack("H*",md5($k_ipad . $data))); } ?>------------------------------------------------ ----------echo "支付成功!"; ?>

The above has introduced php: online payment, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

How to encapsulate input components and unified form data in vue3 How to encapsulate input components and unified form data in vue3 May 12, 2023 pm 03:58 PM

Preparation Use vuecreateexample to create a project. The parameters are roughly as follows: use native input. Native input is mainly value and change. The data needs to be synchronized when changing. App.tsx is as follows: import{ref}from'vue';exportdefault{setup(){//username is the data constusername=ref('Zhang San');//When the input box changes, synchronize the data constonInput=;return( )=>({

How to implement laravel input hidden field How to implement laravel input hidden field Dec 12, 2022 am 10:07 AM

How to implement the laravel input hidden field: 1. Find and open the Blade template file; 2. Use the method_field method in the Blade template to create a hidden field. The creation syntax is "{{ method_field('DELETE') }}".

What to do if there is no cursor when clicking on the input box What to do if there is no cursor when clicking on the input box Nov 24, 2023 am 09:44 AM

Solutions for clicking the input box without a cursor: 1. Confirm the focus of the input box; 2. Clear the browser cache; 3. Update the browser; 4. Use JavaScript; 5. Check the hardware device; 6. Check the input box properties; 7. Debug JavaScript code; 8. Check other elements of the page; 9. Consider browser compatibility.

How to Fix Can't Connect to App Store Error on iPhone How to Fix Can't Connect to App Store Error on iPhone Jul 29, 2023 am 08:22 AM

Part 1: Initial Troubleshooting Steps Checking Apple’s System Status: Before delving into complex solutions, let’s start with the basics. The problem may not lie with your device; Apple's servers may be down. Visit Apple's System Status page to see if the AppStore is working properly. If there's a problem, all you can do is wait for Apple to fix it. Check your internet connection: Make sure you have a stable internet connection as the "Unable to connect to AppStore" issue can sometimes be attributed to a poor connection. Try switching between Wi-Fi and mobile data or resetting network settings (General > Reset > Reset Network Settings > Settings). Update your iOS version:

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

How to use the input box carriage return event and verification function in the Vue document How to use the input box carriage return event and verification function in the Vue document Jun 20, 2023 am 09:13 AM

Vue is a popular JavaScript front-end framework with a responsive data binding and component system at its core. In Vue applications, the input box is one of the most commonly used UI elements. When the user enters text, we hope to listen for the carriage return event and validate the input before submitting. This article will introduce the input box enter event and verification function usage in the Vue document. 1. The carriage return event of the input box in Vue. Monitoring the carriage return event of the input box in Vue is very simple.

See all articles