微信小程序支付C#后端源码

时间:2021-05-19

本文实例为大家分享了微信小程序支付C#后端源码,供大家参考,具体内容如下

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;using System.Web.Mvc;using System.IO;using System.Security.Cryptography;using System.Text;using System.Xml;using Newtonsoft.Json;using Newtonsoft.Json.Linq;namespace Mvc_vue.Controllers{ public class wxController : Controller { // // GET: /wx/ public ActionResult Index() { return View(); } //所需值 public static string _appid = "wxd930ea5d5a258f4f"; public static string _mch_id = "10000100"; public static string _key = "192006250b4c09247ec02edce69f6a2d"; //模拟wx统一下单 openid(前台获取) public string getda(string openid) { return Getprepay_id(_appid, "shanghaifendian", "monixiaofei", _mch_id, GetRandomString(30), "http://puteHash(messageBytes); return Convert.ToBase64String(hashmessage); } } /// <summary> /// wx统一下单请求数据 /// </summary> /// <param name="URL">请求地址</param> /// <param name="urlArgs">参数</param> /// <returns></returns> private static string sendPost(string URL, string urlArgs) { //context.Request["args"] System.Net.WebClient wCient = new System.Net.WebClient(); wCient.Headers.Add("Content-Type", "application/x- Framework4

微信小程序支付前端源码

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章