当前位置:网站首页>Example: use C # Net to teach you how to develop wechat official account (19) -- use wechat payment to transfer to wechat fans' change accounts
Example: use C # Net to teach you how to develop wechat official account (19) -- use wechat payment to transfer to wechat fans' change accounts
2022-06-09 21:06:00 【Chaos scar】
There are many ways for official account to pay for wechat users , The most common ones are sending red envelopes and transferring money to change accounts , The last article explained in detail the process of using red packets , From the configuration in the official account , Configuration of wechat payment , And then to the concrete class implementation .
This chapter mainly explains how to transfer money to change , The specific classes have been given in the last article , So just the demo code .
One 、 Results,

Two 、 Demo source code
Front end source code :
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="AccountTest.aspx.cs" Inherits="Jjlm.AccountTest" %>
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<head id="Head1" runat="server">
<title> Wechat payment transfer to change test </title>
</head>
<body style="background:#fff;">
<center>
<div style="width:95%;">
<form id="form1" runat="server">
</br>
openid*:<asp:TextBox runat="server" id="tbxOpenid" Width="60%" Visible="true"></asp:TextBox></br></br>
Transfer amount *:<asp:TextBox runat="server" id="tbxNum" Width="60%"></asp:TextBox></br></br>
Transfer remarks *:<asp:TextBox runat="server" id="tbxRemark" Width="60%"></asp:TextBox></br></br>
Merchant name :<asp:TextBox runat="server" id="tbxShanghu" Width="60%"></asp:TextBox></br></br>
Transfer description :<asp:TextBox runat="server" id="tbxZhufu" Width="60%"></asp:TextBox></br></br>
Reason for transfer :<asp:TextBox runat="server" id="tbxReason" Width="60%"></asp:TextBox></br></br>
<div style="margin-top: 10px;text-align: center;">
<asp:Button ID="btnSendCommission" Runat="server" OnClick="Send" width="15%" Text=" Wechat payment is transferred to change "></asp:Button>
</div>
<asp:Label runat="server" id="lbresult" Visible="true"/>
</form>
</div>
</center>
</body>
</html>
Back end source code :
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Data.SqlClient;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Xml;
using System.Text;
using System.Net;
using System.Drawing;
using System.Drawing.Imaging;
using QinMing.Config;
using QinMing.WeixinPayPayment;
namespace Jjlm
{
public partial class AccountTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void Send(object sender, EventArgs e)
{
Random r = new Random();
string ran1 = r.Next(1000, 9999).ToString();
string out_trade_no = QinMingConfig.Weixin_MchId + DateTime.Now.ToString("yyyyMMddHHmmss") + ran1;
QinMingWeixinPayPayment.TransferAccountOne(tbxShanghu.Text, tbxZhufu.Text, tbxOpenid.Text, tbxNum.Text, tbxReason.Text, tbxRemark.Text, out_trade_no);
lbresult.Text = " Wechat payment has been transferred , Please remember to check ";
}
}
}
The demo code is simple , So no explanation .
边栏推荐
- Idea:new no class
- Gbase8s database select Clause 6
- In the first quarter, the global semiconductor equipment shipment reached US $24.7 billion, a year-on-year increase of 5%
- BI 如何让SaaS产品具有 “安全感”和“敏锐感”(上)
- Can abstract classes inherit entity classes?
- Latex mathematical symbols Encyclopedia
- Soflu software robot: an automatic tool to assist enterprises in landing Devops
- 二叉树的层序遍历
- ASP.NET手机终端进销存系统,源码分享
- 分享 16 个有用的 TypeScript 和 JS 技巧
猜你喜欢

go安装图文教程

CVPR2022 Oral | 用于实时地图视图语义分割的跨视图Transformer

『踩坑记录』IDEA导航栏工具栏添加“后退”功能按钮

排序-快速排序

The browser cannot open Baidu, and others can be opened normally

idea:new没有class

(I) apple has open source, but so what?

mmdetection训练自己的COCO数据集及常见问题

二叉树的层序遍历

Cvpr2022 oral | cross view transformer for semantic segmentation of real-time map views
随机推荐
完美数(算数借位问题)
Le navigateur ne peut pas ouvrir Baidu, d'autres peuvent être ouverts normalement
Just learning embedded, I want to ask what is interrupt and what is the concept of interrupt
GBase8s数据库select子句4
minikube config set driver kvm2
GBase8s数据库select子句1
Go 1.18 new features - workspace
LeetCode 526. A graceful arrangement***
03 Wireshark TCP
Gbase8s database select Clause 1
Logistic regression summary
Set up ngrok server, realize intranet penetration service, and realize online access from external network to internal network
Gbase8s database select clause 5
Sort - quick sort
Who says redis can't save big keys
Mysql异常:The server time zone value‘XXX'解决
In the first quarter, the global semiconductor equipment shipment reached US $24.7 billion, a year-on-year increase of 5%
Gbase8s database select Clause 3
Usage of memberwiseclone in C #
分享 16 个有用的 TypeScript 和 JS 技巧