简单封装了微信和支付宝的扫码支付功能,两个支付继承同一套接口,上传的类库已经把接口剥离了,调用简单,如下:
private void Form1_Load(object sender, EventArgs e)
{
PayParament p = new PayParament() //商品属性
{
Body = "sss",
GoodsTag = "ddd",
OrderId = "365216541",
ProductId = "206542154",
TotalFee = 0.01
};
/*微信:配置WxPayCOnfig.cs相关内容*/
APIFunction weixin = new APIFunction();
weixin.DoSuccessProcess += DoSuccessProcess;
weixin.IGetPayQRCode(p);
/*阿里:配置AliConfig.cs相关内容,替换秘钥文件*/
AlipayF2F ali = new AlipayF2F();
ali.DoSuccessProcess += DoSuccessProcess;
ali.IGetPayQRCode(p);
}
// 支付成功事件
private void DoSuccessProcess(QueryPayState obj)
{
}
2020-02-24 03:04:00
2.56MB
支付宝
微信
1