Home > php教程 > PHP源码 > WeChat fool-proof scan code payment and JSAPI WeChat payment

WeChat fool-proof scan code payment and JSAPI WeChat payment

WBOY
Release: 2016-07-06 13:28:30
Original
1661 people have browsed it
Jump to [1] [Full screen preview]
支付宝和微信在线支付教程:http://www.sucaihuo.com/php/875.html
一、支付宝忽略
二、微信支付修改配制文件如下: 
 
1、找到源码文件中/pay_demo/Wxpay/lib/WxPay.Config.php 
2、做如下修改即可 
 
//=======【基本信息设置】===================================== 
    // 
    /** 
     * TODO: 修改这里配置为您自己申请的商户信息 
     * 微信公众号信息配置 
     *  
     * APPID:绑定支付的APPID(必须配置,开户邮件中可查看) 
     *  
     * MCHID:商户号(必须配置,开户邮件中可查看) 
     *  
     * KEY:商户支付密钥,参考开户邮件设置(必须配置,登录商户平台自行设置) 
     * 设置地址:https://pay.weixin.qq.com/index.php/account/api_cert 
     *  
     * APPSECRET:公众帐号secert(仅JSAPI支付的时候需要配置, 登录公众平台,进入开发者中心可设置), 
     * 获取地址:https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev&token=2005451881&lang=zh_CN 
     * @var string 
     */ 
    const APPID = 'wx42212aaaaaabssfc'; 
    const MCHID = '1349832901'; 
    const KEY = 'fca93a0087d0f66f0624343jibd7244e7'; 
    const APPSECRET = '45843e705995a1210sfkdksk26f716dc'; 
     
    //=======【证书路径设置】===================================== 
    /** 
     * TODO:设置商户证书路径 
     * 证书路径,注意应该填写绝对路径(仅退款、撤销订单时需要,可登录商户平台下载, 
     * API证书下载地址:https://pay.weixin.qq.com/index.php/account/api_cert,下载之前需要安装商户操作证书) 
     * @var path 
     */ 
    const SSLCERT_PATH = '../cert/apiclient_cert.pem'; 
    const SSLKEY_PATH = '../cert/apiclient_key.pem';
Copy after login
source:php.cn
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template