获取支付凭据

 /// <summary>
/// 获取支付凭据
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[IsLoginAuthorizeAttribute]
public MessagesDataCode<string> GetPaymentCredential([FromBody] AlipayCharge model)
{
MessagesDataCode<string> result = new MessagesDataCode<string>(false, "无效的参数", -);
if (model != null)
{
try
{
Pingpp.Pingpp.SetApiKey("sk_live_v5KiDKS0Wz1Cnv5Oa19ebrTS"); //sk_test_zvHePSeH0SuHLqP4SGaPKWDS
string appId = "app_4WzfvTm9CGi1eLO0";
string ip = HttpContext.Current.Request.UserHostAddress;
logger.Error("支付获取到的Ip地址为:" + ip);
string OrderNum = DateTime.Now.ToString("yyyyMMddHHmmss") + new Random().Next(, ); //唯一订单号
int UserId = ADT.Cache.Cache.CAC.Instance.GetUseridBySession(); //用户id
var chParams = new Dictionary<string, object>
{
// 推荐使用 8-20 位,要求数字或字母,不允许其他字符
{"order_no",OrderNum },
// 订单总金额, 人民币单位:分(如订单总金额为 1 元,此处请填 100)
{"amount",},
// 支付使用的第三方支付渠道取值,请参考: https://www.pingxx.com/api#支付渠道属性值
{"channel", model.channel},
// 3 位 ISO 货币代码,人民币为 cny 。
{"currency", "cny"},
// 商品标题,该参数最长为 32 个 Unicode 字符,银联全渠道( upacp / upacp_wap )限制在 32 个字节。
{"subject", model.subject},
// 商品描述信息,该参数最长为 128 个 Unicode 字符, yeepay_wap 对于该参数长度限制为 100 个 Unicode 字符。
{"body", model.body},
// 发起支付请求客户端的 IP 地址,格式为 IPV4,如: 127.0.0.1
{"client_ip",ip},
{"app", new Dictionary<string, string> {{"id", appId}}},
// 特定渠道发起交易时需要的额外参数,以及部分渠道支付成功返回的额外参数,详细参考 https://www.pingxx.com/api#支付渠道-extra-参数说明
{"extra", new Dictionary<string,object>{
// 可选,开放平台返回的包含账户信息的 token(授权令牌,商户在一定时间内对支付宝某些服务的访问权限)。通过授权登录后获取的 alipay_open_id ,作为该参数的 value ,登录授权账户即会为支付账户,32 位字符串。
//{"extern_token", ""},
// 可选,是否发起实名校验,T 代表发起实名校验;F 代表不发起实名校验。
{"rn_check",'T'}
}},
// 可选:订单失效时间,用 Unix 时间戳表示。时间范围在订单创建后的 1 分钟到 15 天,默认为 1 天,创建时间以 Ping++ 服务器时间为准。 微信对该参数的有效值限制为 2 小时内;银联对该参数的有效值限制为 1 小时内。
{"time_expire", CreateBase64.timeExpire()},
// 可选:订单附加说明,最多 255 个 Unicode 字符。
{"description",model.description}
}; var ch = Charge.Create(chParams);
var test = JsonConvert.SerializeObject(ch);
result.Data = test;
result.Success = true;
result.Code = ;
result.Msg = "成功获取支付凭据"; //在这里生成订单
PayLogBean PayModel = new PayLogBean();
PayModel.PayNo = OrderNum;
PayModel.PayTime = DateTime.Now;
PayModel.Type = model.channel;
PayModel.Valid = false;
PayModel.UserId = UserId;
PayModel.ChangeNum = model.ChangeNum;
PayModel.OrderType = model.OrderType;
if (!new PayLog().Add(PayModel))
{
logger.Error("创建订单失败,该用户Id为" + UserId);
} } catch (Exception ex)
{
logger.Error("创建支付凭据对象发生异常:" + ex);
}
}
return result;
}

验证签名

  public static class RSACryptoServiceProviderExtension
{
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static bool VerifySignedHash(string strDataToVerify, string strSignedData, string strPublicKeyFilePath)
{
byte[] signedData = Convert.FromBase64String(strSignedData); //加密过的签名 UTF8Encoding ByteConverter = new UTF8Encoding(); byte[] dataToVerify = ByteConverter.GetBytes(strDataToVerify);//源数据,使用相同的算法进行消息摘要 ,和解密后的签名比较
try
{
string sPublicKeyPem = File.ReadAllText(strPublicKeyFilePath);
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider { PersistKeyInCsp = false };
rsa.LoadPublicKeyPEM(sPublicKeyPem);
if (rsa.VerifyData(dataToVerify, "SHA256", signedData))
{
return true;
} }
catch (CryptographicException e)
{
logger.Error(e.Message); }
return false; }
#region Methods /// <summary>Extension method which initializes an RSACryptoServiceProvider from a DER public key blob.</summary>
public static void LoadPublicKeyDER(this RSACryptoServiceProvider provider, byte[] DERData)
{
byte[] RSAData = RSACryptoServiceProviderExtension.GetRSAFromDER(DERData);
byte[] publicKeyBlob = RSACryptoServiceProviderExtension.GetPublicKeyBlobFromRSA(RSAData);
provider.ImportCspBlob(publicKeyBlob);
} /// <summary>Extension method which initializes an RSACryptoServiceProvider from a DER private key blob.</summary>
public static void LoadPrivateKeyDER(this RSACryptoServiceProvider provider, byte[] DERData)
{
byte[] privateKeyBlob = RSACryptoServiceProviderExtension.GetPrivateKeyDER(DERData);
provider.ImportCspBlob(privateKeyBlob);
} /// <summary>Extension method which initializes an RSACryptoServiceProvider from a PEM public key string.</summary>
public static void LoadPublicKeyPEM(this RSACryptoServiceProvider provider, string sPEM)
{
byte[] DERData = RSACryptoServiceProviderExtension.GetDERFromPEM(sPEM);
RSACryptoServiceProviderExtension.LoadPublicKeyDER(provider, DERData);
} /// <summary>Extension method which initializes an RSACryptoServiceProvider from a PEM private key string.</summary>
public static void LoadPrivateKeyPEM(this RSACryptoServiceProvider provider, string sPEM)
{
byte[] DERData = RSACryptoServiceProviderExtension.GetDERFromPEM(sPEM);
RSACryptoServiceProviderExtension.LoadPrivateKeyDER(provider, DERData);
} /// <summary>Returns a public key blob from an RSA public key.</summary>
internal static byte[] GetPublicKeyBlobFromRSA(byte[] RSAData)
{
byte[] data = null;
UInt32 dwCertPublicKeyBlobSize = ;
if (RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING,
new IntPtr((int)CRYPT_OUTPUT_TYPES.RSA_CSP_PUBLICKEYBLOB), RSAData, (UInt32)RSAData.Length, CRYPT_DECODE_FLAGS.NONE,
data, ref dwCertPublicKeyBlobSize))
{
data = new byte[dwCertPublicKeyBlobSize];
if (!RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING,
new IntPtr((int)CRYPT_OUTPUT_TYPES.RSA_CSP_PUBLICKEYBLOB), RSAData, (UInt32)RSAData.Length, CRYPT_DECODE_FLAGS.NONE,
data, ref dwCertPublicKeyBlobSize))
throw new Win32Exception(Marshal.GetLastWin32Error());
}
else
throw new Win32Exception(Marshal.GetLastWin32Error());
return data;
} /// <summary>Converts DER binary format to a CAPI CRYPT_PRIVATE_KEY_INFO structure.</summary>
internal static byte[] GetPrivateKeyDER(byte[] DERData)
{
byte[] data = null;
UInt32 dwRSAPrivateKeyBlobSize = ;
IntPtr pRSAPrivateKeyBlob = IntPtr.Zero;
if (RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING, new IntPtr((int)CRYPT_OUTPUT_TYPES.PKCS_RSA_PRIVATE_KEY),
DERData, (UInt32)DERData.Length, CRYPT_DECODE_FLAGS.NONE, data, ref dwRSAPrivateKeyBlobSize))
{
data = new byte[dwRSAPrivateKeyBlobSize];
if (!RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING, new IntPtr((int)CRYPT_OUTPUT_TYPES.PKCS_RSA_PRIVATE_KEY),
DERData, (UInt32)DERData.Length, CRYPT_DECODE_FLAGS.NONE, data, ref dwRSAPrivateKeyBlobSize))
throw new Win32Exception(Marshal.GetLastWin32Error());
}
else
throw new Win32Exception(Marshal.GetLastWin32Error());
return data;
} /// <summary>Converts DER binary format to a CAPI CERT_PUBLIC_KEY_INFO structure containing an RSA key.</summary>
internal static byte[] GetRSAFromDER(byte[] DERData)
{
byte[] data = null;
byte[] publicKey = null;
CERT_PUBLIC_KEY_INFO info;
UInt32 dwCertPublicKeyInfoSize = ;
IntPtr pCertPublicKeyInfo = IntPtr.Zero;
if (RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING, new IntPtr((int)CRYPT_OUTPUT_TYPES.X509_PUBLIC_KEY_INFO),
DERData, (UInt32)DERData.Length, CRYPT_DECODE_FLAGS.NONE, data, ref dwCertPublicKeyInfoSize))
{
data = new byte[dwCertPublicKeyInfoSize];
if (RSACryptoServiceProviderExtension.CryptDecodeObject(CRYPT_ENCODING_FLAGS.X509_ASN_ENCODING | CRYPT_ENCODING_FLAGS.PKCS_7_ASN_ENCODING, new IntPtr((int)CRYPT_OUTPUT_TYPES.X509_PUBLIC_KEY_INFO),
DERData, (UInt32)DERData.Length, CRYPT_DECODE_FLAGS.NONE, data, ref dwCertPublicKeyInfoSize))
{
GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
try
{
info = (CERT_PUBLIC_KEY_INFO)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(CERT_PUBLIC_KEY_INFO));
publicKey = new byte[info.PublicKey.cbData];
Marshal.Copy(info.PublicKey.pbData, publicKey, , publicKey.Length);
}
finally
{
handle.Free();
}
}
else
throw new Win32Exception(Marshal.GetLastWin32Error());
}
else
throw new Win32Exception(Marshal.GetLastWin32Error());
return publicKey;
} /// <summary>Extracts the binary data from a PEM file.</summary>
internal static byte[] GetDERFromPEM(string sPEM)
{
UInt32 dwSkip, dwFlags;
UInt32 dwBinarySize = ; if (!RSACryptoServiceProviderExtension.CryptStringToBinary(sPEM, (UInt32)sPEM.Length, CRYPT_STRING_FLAGS.CRYPT_STRING_BASE64HEADER, null, ref dwBinarySize, out dwSkip, out dwFlags))
throw new Win32Exception(Marshal.GetLastWin32Error()); byte[] decodedData = new byte[dwBinarySize];
if (!RSACryptoServiceProviderExtension.CryptStringToBinary(sPEM, (UInt32)sPEM.Length, CRYPT_STRING_FLAGS.CRYPT_STRING_BASE64HEADER, decodedData, ref dwBinarySize, out dwSkip, out dwFlags))
throw new Win32Exception(Marshal.GetLastWin32Error());
return decodedData;
} #endregion Methods #region P/Invoke Constants /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_ACQUIRE_CONTEXT_FLAGS : uint
{
CRYPT_NEWKEYSET = 0x8,
CRYPT_DELETEKEYSET = 0x10,
CRYPT_MACHINE_KEYSET = 0x20,
CRYPT_SILENT = 0x40,
CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x80,
CRYPT_VERIFYCONTEXT = 0xF0000000
} /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_PROVIDER_TYPE : uint
{
PROV_RSA_FULL =
} /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_DECODE_FLAGS : uint
{
NONE = ,
CRYPT_DECODE_ALLOC_FLAG = 0x8000
} /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_ENCODING_FLAGS : uint
{
PKCS_7_ASN_ENCODING = 0x00010000,
X509_ASN_ENCODING = 0x00000001,
} /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_OUTPUT_TYPES : int
{
X509_PUBLIC_KEY_INFO = ,
RSA_CSP_PUBLICKEYBLOB = ,
PKCS_RSA_PRIVATE_KEY = ,
PKCS_PRIVATE_KEY_INFO =
} /// <summary>Enumeration derived from Crypto API.</summary>
internal enum CRYPT_STRING_FLAGS : uint
{
CRYPT_STRING_BASE64HEADER = ,
CRYPT_STRING_BASE64 = ,
CRYPT_STRING_BINARY = ,
CRYPT_STRING_BASE64REQUESTHEADER = ,
CRYPT_STRING_HEX = ,
CRYPT_STRING_HEXASCII = ,
CRYPT_STRING_BASE64_ANY = ,
CRYPT_STRING_ANY = ,
CRYPT_STRING_HEX_ANY = ,
CRYPT_STRING_BASE64X509CRLHEADER = ,
CRYPT_STRING_HEXADDR = ,
CRYPT_STRING_HEXASCIIADDR = ,
CRYPT_STRING_HEXRAW = ,
CRYPT_STRING_NOCRLF = 0x40000000,
CRYPT_STRING_NOCR = 0x80000000
} #endregion P/Invoke Constants #region P/Invoke Structures /// <summary>Structure from Crypto API.</summary>
[StructLayout(LayoutKind.Sequential)]
internal struct CRYPT_OBJID_BLOB
{
internal UInt32 cbData;
internal IntPtr pbData;
} /// <summary>Structure from Crypto API.</summary>
[StructLayout(LayoutKind.Sequential)]
internal struct CRYPT_ALGORITHM_IDENTIFIER
{
internal IntPtr pszObjId;
internal CRYPT_OBJID_BLOB Parameters;
} /// <summary>Structure from Crypto API.</summary>
[StructLayout(LayoutKind.Sequential)]
struct CRYPT_BIT_BLOB
{
internal UInt32 cbData;
internal IntPtr pbData;
internal UInt32 cUnusedBits;
} /// <summary>Structure from Crypto API.</summary>
[StructLayout(LayoutKind.Sequential)]
struct CERT_PUBLIC_KEY_INFO
{
internal CRYPT_ALGORITHM_IDENTIFIER Algorithm;
internal CRYPT_BIT_BLOB PublicKey;
} #endregion P/Invoke Structures #region P/Invoke Functions /// <summary>Function for Crypto API.</summary>
[DllImport("advapi32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptDestroyKey(IntPtr hKey); /// <summary>Function for Crypto API.</summary>
[DllImport("advapi32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptImportKey(IntPtr hProv, byte[] pbKeyData, UInt32 dwDataLen, IntPtr hPubKey, UInt32 dwFlags, ref IntPtr hKey); /// <summary>Function for Crypto API.</summary>
[DllImport("advapi32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptReleaseContext(IntPtr hProv, Int32 dwFlags); /// <summary>Function for Crypto API.</summary>
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptAcquireContext(ref IntPtr hProv, string pszContainer, string pszProvider, CRYPT_PROVIDER_TYPE dwProvType, CRYPT_ACQUIRE_CONTEXT_FLAGS dwFlags); /// <summary>Function from Crypto API.</summary>
[DllImport("crypt32.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptStringToBinary(string sPEM, UInt32 sPEMLength, CRYPT_STRING_FLAGS dwFlags, [Out] byte[] pbBinary, ref UInt32 pcbBinary, out UInt32 pdwSkip, out UInt32 pdwFlags); /// <summary>Function from Crypto API.</summary>
[DllImport("crypt32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptDecodeObjectEx(CRYPT_ENCODING_FLAGS dwCertEncodingType, IntPtr lpszStructType, byte[] pbEncoded, UInt32 cbEncoded, CRYPT_DECODE_FLAGS dwFlags, IntPtr pDecodePara, ref byte[] pvStructInfo, ref UInt32 pcbStructInfo); /// <summary>Function from Crypto API.</summary>
[DllImport("crypt32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CryptDecodeObject(CRYPT_ENCODING_FLAGS dwCertEncodingType, IntPtr lpszStructType, byte[] pbEncoded, UInt32 cbEncoded, CRYPT_DECODE_FLAGS flags, [In, Out] byte[] pvStructInfo, ref UInt32 cbStructInfo); #endregion P/Invoke Functions
}

接受支付结果(异步)

 public HttpResponseMessage Index()
{
MessagesCode result = new MessagesCode(false, "无效的参数", -);
try
{ if (HttpContext.Current.Request.RequestType.ToUpper().Equals("POST"))
{
//获取 post 的 event对象
var inputData = ReadStream(HttpContext.Current.Request.InputStream);
//获取 header 中的签名
var sig = HttpContext.Current.Request.Headers.Get("x-pingplusplus-signature"); //公钥路径(请检查你的公钥 .pem 文件存放路径) var path = HttpContext.Current.Server.MapPath("/Lib/public_key.pem"); //验证签名
if (RSACryptoServiceProviderExtension.VerifySignedHash(inputData, sig, path))
{ var jObject = JObject.Parse(inputData);
var type = jObject.SelectToken("type");
var eventType = jObject.SelectToken("object");
if (eventType.ToString() == "event")//验证接收到的是否为 Event 对象。
{
if (type.ToString() == "charge.succeeded")
{ //在这里做支付成功的逻辑处理 1.订单状态改变 2.支付目的改变 3.这里要限制一下更新的次数,只有当订单是未支付时在进行下面的操作
var data = jObject.SelectToken("data");
var credentialObject = data["object"];//凭据对象
var PayNo = credentialObject["order_no"];//订单号
logger.Error("接受到支付成功的事件");
bool IsOk = false;
PayLogBean model = new PayLog().GetModelById(PayNo.ToString());
if (model != null)
{
if (model.Valid)
{
IsOk = true;
}
else
{
using (TransactionScope ts = new TransactionScope())
{
bool OneTrans = false;
bool TwoTrans = false;
OneTrans = new PayLog().UpdateValid(PayNo.ToString(), true);
UserBean userModel = new User().GetModelById((int)model.UserId);
if (userModel != null)
{
if (model.OrderType ==)
{ if (Convert.IsDBNull(userModel.Ranketime)|| userModel.RankId==)//一定不是会员
{ userModel.Rankbtime = DateTime.Now;
userModel.Ranketime = DateTime.Now.AddMonths((int)model.ChangeNum);
userModel.RankId = ;
}
else
{//代表历史上是有会员的记录的
//判断当前是否为会员
if (userModel.RankId == && userModel.Ranketime >= DateTime.Now)
{
userModel.Ranketime = userModel.Ranketime.AddMonths((int)model.ChangeNum);
}
else
{
userModel.RankId = ;
userModel.Ranketime = DateTime.Now.AddMonths((int)model.ChangeNum);
userModel.Ranketime = DateTime.Now; } }
//更新用户信息
TwoTrans = new User().UpdateMemRoleByRMB(userModel);
}
else
{ userModel.Currency = userModel.Currency + model.ChangeNum;
TwoTrans = new User().UpdateCurrency(model.UserId, userModel.Currency);
}
}
if (OneTrans&&TwoTrans)
{ IsOk = true;
ts.Complete(); } }
}
}
if (IsOk)
{
//在这里写日志
if (model.OrderType == ) //购买会员
{
//在这里加一个消费日志
//需要拿这个有效时间去获得人民币的价格是多少
List<ProductBean> productList = new Product().GetAllList().Where(p => p.ValidTime == model.ChangeNum).ToList();
if (productList.Count > )
{
CreateBase64.CreateReclog(, "人民币购买会员", Convert.ToInt64(productList[].ProdutPrice), (int)model.UserId);
} }
else
{//购买虚拟币
CreateBase64.CreateReclog(, "充虚拟币", model.ChangeNum, (int)model.UserId);
}
return Request.CreateResponse(HttpStatusCode.OK, "接受成功");
} }
} } }
} catch (Exception ex)
{
logger.Error("接受ping++的支付订单消息发生异常:" + ex);
}
return Request.CreateResponse(HttpStatusCode.InternalServerError, "接受失败"); }
private static string ReadStream(Stream stream)
{
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
return reader.ReadToEnd();
}
}

根据订单号获取支付状态

 /// <summary>
/// 根据订单号获取支付状态
/// </summary>
/// <param name="order_no"></param>
/// <returns></returns>
[HttpGet]
public MessagesDataCode<bool> GetOrderStatus(string order_no)
{
MessagesDataCode<bool> result = new MessagesDataCode<bool>(false, "无效的参数", -);
try
{
PayLogBean model = new PayLog().GetModelById(order_no);
if (model != null)
{
result.Data = model.Valid;
result.Code = ;
result.Msg = "成功获取到订单状态";
result.Success = true;
}
}
catch (Exception ex)
{
logger.Error("获取订单状态发生异常:"+ex);
}
return result;
}

使用 ping++做支付的流程的更多相关文章

  1. 在Web应用中接入微信支付的流程之极简清晰版

    在Web应用中接入微信支付的流程之极简清晰版 背景: 在Web应用中接入微信支付,我以为只是调用几个API稍作调试即可. 没想到微信的API和官方文档里隐坑无数,致我抱着怀疑人生的心情悲愤踩遍了丫们布 ...

  2. 在Web应用中接入微信支付的流程之极简清晰版 (转)

    在Web应用中接入微信支付的流程之极简清晰版 背景: 在Web应用中接入微信支付,我以为只是调用几个API稍作调试即可. 没想到微信的API和官方文档里隐坑无数,致我抱着怀疑人生的心情悲愤踩遍了丫们布 ...

  3. 【SSH网上商城项目实战21】从Demo中看易宝支付的流程

         转自: https://blog.csdn.net/eson_15/article/details/51447492 这一节我们先写一个简单点的Demo来测试易宝支付的流程,熟悉这个流程后, ...

  4. 干货 | 高耦合场景下,Trip.com如何做支付设计与落地

    干货 | 高耦合场景下,Trip.com如何做支付设计与落地 https://mp.weixin.qq.com/s/VR9NTR3RpKVfmUPcwgMABg 原创 Ryann Liu 携程技术 2 ...

  5. java开发支付宝支付详细流程_demo的运行

    首先我要吐槽一下支付宝的开放平台简直就是一个迷宫,赞同的顶一下,下面我把要下载的地址给贴出来要不真不好找: 一.准备工作 1.签名工具下载 https://docs.open.alipay.com/2 ...

  6. 微信APP支付整体流程记录备忘

      支付整体流程见文档:https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=8_3   商户系统和微信支付系统主要交互说明:     步骤1: ...

  7. 微信支付-H5网页支付开通流程

    简介  H5 支付是指商户在微信客户端外的移动端网页展示商品或服务,用户在前述页面确认使用微信支付时,商户发起本服务呼起微信客户端进行支付.主要用于触屏版的手机浏览器请求微信支付的场景.可以方便的从外 ...

  8. PHP支付宝支付开发流程

    支付宝开发流程   1.首先我们先谈谈第三方支付 所谓第三方支付就是和一些各大银行签约,并具备一定实力和信誉保障的第三方独立机构提供的交易平台 目前市面上常见的有支付宝,财付通,网银,易宝支付等,网站 ...

  9. 微信支付开发+{ping++}微信支付托管

    ------------------------微信支付接口------------------------------- 微信支付开发并没有想象中的那么难,主要是微信提供了sdk. 微信公众号必须是 ...

随机推荐

  1. DataGridView设置行高

    .Net中DataGridView控件如何设置行高 在DataGridView控件中,默认的行高很大,而标题头的行高却很小,感觉很不匀称. 标题头的行高比较好设置需要修改两个属性1修改ColumnHe ...

  2. 一个python小白的学习之路

    本人是个网管,在佛山工作,现在已经学习了一段时间python了,还是学开基础,但近段时间有一点的突破出来了,找到了一个很好的自学视频,等自己有能力了就想找一个特训班试试.已经看了视频两个星期了,有小小 ...

  3. java程序初体验

    示例代码 class Demo { public static void main(String[] args) { System.out.print("hello world") ...

  4. 1. ReactJS基础(开发环境搭建)

    本文主要介绍通过React官方提供的create-react-app脚手架进行开发环境的搭建. 1.安装node环境(安装过程这里不做介绍,可参考其他博文) 在cmd中输入node -v 如果可以看到 ...

  5. c++学习中的疑问

    1.关于iostream头文件中的cout对象没有包含对string的<<操作符重载函数 测试代码: #include<iostream> using namespace st ...

  6. jmeter中提取json串

    https://blog.csdn.net/zha6476003/article/details/80295068

  7. http协议常见状态码含义

    状态码有三位数字组成,第一个数字定义了响应的类别,且有五种可能取值: 2xx:成功--表示请求已被成功接收.理解.接受 200(成功)  服务器已成功处理了请求.通常,这表示服务器提供了请求的网页. ...

  8. centos7设置定时任务

    第一种方式修改/etc/crontab文件,这种方式是系统的周期任务,只能root用户才可以执行 SHELL=/bin/bashPATH=/sbin:/bin:/usr/sbin:/usr/binMA ...

  9. 二.Flask 学习模板

    Flask 为你配置 Jinja2 模板引擎.使用 render_template() 方法可以渲染模板,只需提供模板名称和需要作为参数传递给模板的变量就可简单执行. 至于模板渲染? 简单来说,就是将 ...

  10. 巡风配置安装 –centOS6.5

    巡风是一款适用于企业内网的漏洞快速应急.巡航扫描系统,通过搜索功能可清晰的了解内部网络资产分布情况,并且可指定漏洞插件对搜索结果进行快速漏洞检测并输出结果报表. 其主体分为两部分:网络资产识别引擎,漏 ...