国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

微信小程序調(diào)用微信支付

這篇具有很好參考價(jià)值的文章主要介紹了微信小程序調(diào)用微信支付。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

最近開(kāi)發(fā)到小程序調(diào)用微信支付功能,看了下微信支付商戶官網(wǎng)API文檔再結(jié)合項(xiàng)目本身情況因是本人第一次接觸走了很多彎路所以記錄下開(kāi)發(fā)的過(guò)程。

本次微信支付用的是老版本XML格式的,所有的支付功能直接復(fù)制就可以用了。無(wú)需大量改動(dòng)把相應(yīng)的商戶appid 和商戶支付秘鑰修改

直接上代碼。

框架是springboot maven

在pom.xml中添加依賴

        <!--微信支付-->
        <dependency>
            <groupId>com.github.binarywang</groupId>
            <artifactId>weixin-java-pay</artifactId>
            <version>3.5.0</version>
        </dependency>

yml配置文件


# 小程序
#appid: wxdc441d07e8130fa9
  #  secret: 4bcd53d721cd6f133d2471aa0fd33ee1
miniporgram:
  appid: wx17f07c0f59e3d719e                  #需要換成自己的
  secret: 51806f5515ea9619604daff93eb02bb3b   #需要換成自己的
  login-url: https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
  getUnlimited-url: https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=%s
  access-token-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s

wx:
  pay:
    appId: wx17f07c0f59e3d719e #微信公眾號(hào)或者小程序等的appid    #需要換成自己的
    secret: 51806f5515ea9619604daff93eb02bb3b                   #需要換成自己的
    mchId: 1150801291151 #微信支付商戶號(hào)                          #需要換成自己的
    mchKey: fa2182b3cee6ac930f493af9b6a8abd7f #微信支付商戶密鑰
    #    subAppId: #服務(wù)商模式下的子商戶公眾賬號(hào)ID
    #    subMchId: #服務(wù)商模式下的子商戶號(hào)
    keyPath: classpath:/cert/apiclient_cert.p12 # p12證書(shū)的位置,可以指定絕對(duì)路徑,也可以指定類路徑(以classpath:開(kāi)頭)
    notifyUrl: https://1579lw7417.goho.co/wx/wxPay/payNotify #微信支付結(jié)果通知,微信支付回調(diào)地

微信公眾號(hào)商戶添加支付回調(diào)地址,支付成功后就會(huì)把信息推過(guò)來(lái)

微信小程序調(diào)用微信支付

?配置已經(jīng)完了現(xiàn)在看小程序支付頁(yè)面源碼:

添加一個(gè)支付按鈕

<button class="weui-btn btn-radius" bindtap="confirm">支付</button>

js

//支付
 confirm:function(){
  console.log('支付') 
  wx.login({
    success: res => {
      request.creatOrdel({ code:res.code,money:'1'}).then(r => { 
        console.log(r)
        wx.requestPayment({   
          timeStamp: r.data.timeStamp, 
          nonceStr: r.data.nonceStr,
          package: r.data.package,
          signType: r.data.signType,
          paySign: r.data.paySign,
          success (res) { },
          fail (res) { }
        })
      })
    }
  })
 } 

支付的時(shí)候把code傳到后臺(tái),還有金額,生成預(yù)支付流水成功后前端 wx.requestPayment 就喚起了微信支付界面,在小程序開(kāi)發(fā)這個(gè)工具中可能看到的是二維碼不過(guò)不要緊,在手機(jī)端就是這個(gè)正常界面

?

微信小程序調(diào)用微信支付

后端代碼:

controller

package cn.umidata.nucleic.api.controller;


import cn.hutool.json.JSONObject;
import cn.umidata.nucleic.api.utils.Httprequests;
import cn.umidata.nucleic.wechat.domain.WechatPaymentRecord;
import cn.umidata.nucleic.wechat.domain.WxOrderParams;
import cn.umidata.nucleic.wechat.service.WxPlayService;
import com.ijpay.core.kit.HttpKit;
import com.ijpay.core.kit.WxPayKit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import cn.umidata.nucleic.common.core.domain.AjaxResult;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 * @BelongsProject: nucleic
 * @BelongsPackage: cn.umidata.nucleic.api.controller
 * @Author: zhanghui
 * @CreateTime: 2022-09-13  19:05
 * @Description: 訂單支付
 * @Version: 1.0
 */
@Api(tags = "訂單支付")
@RestController
@RequestMapping(value = "wxPay")
public class wxOrderController {
    @Value("${miniporgram.appid}")
    private String appid;
    @Value("${miniporgram.secret}")
    private String secret;
    @Value("${wx.pay.mchId}")
    private String mchid;

    @Value("${wx.pay.notifyUrl}")
    private String notifyUrl;
    @Value("${wx.pay.mchKey}")
    private String mchKey;

    @Autowired
    private WxPlayService wxPlayService;
    private final Logger log = LoggerFactory.getLogger(this.getClass());
    /**
     * 微信小程序支付
     *oderBathNum 訂單批號(hào),在申領(lǐng)果樹(shù)中/wx/ReceiveFruiter/getBathNum接口中獲取
     */
    @ApiOperation(value = "微信小程序支付",notes = "微信小程序支付")
    @PostMapping("/placeOrder")
    public AjaxResult miniAppPay(String openid,String money,String oderBathNum) {
      /*  String param = "appid=" + appid + "&secret=" + secret + "&js_code=" + code + "&grant_type=authorization_code";
        String sendGet = Httprequests.sendGet("https://api.weixin.qq.com/sns/jscode2session", param); //發(fā)起請(qǐng)求拿到key和openid
        JSONObject json = new JSONObject(sendGet);
        String openid=json.get("openid").toString(); //用戶唯一標(biāo)識(shí)*/
        WxOrderParams params = new WxOrderParams();
        params.setAttach("預(yù)約");
        params.setBody("預(yù)約單支付");
        params.setDetail("");
        params.setOpenid(openid);
        params.setOrderType("1");
        params.setOutTradeNo("FSA"+String.valueOf(System.currentTimeMillis()));
        params.setTotalFee(new BigDecimal(money));
        params.setAppid(appid);
        params.setMchid(mchid);
        params.setNotifyUrl(notifyUrl);
        params.setMchKey(mchKey);
        params.setOderBathNum(oderBathNum);
        Map<String, String> stringStringMap = wxPlayService.placeOrder(params);
        return AjaxResult.success(stringStringMap);
    }
    /**
     * 支付回調(diào)異步通知
     */
    @ApiOperation(value = "支付回調(diào)異步通知",notes = "支付回調(diào)異步通知")
    @RequestMapping(value = "/payNotify")
    public String payNotify(HttpServletRequest request) {
        execPayNotify(request);
        Map<String, String> xml = new HashMap<String, String>(2);
        xml.put("return_code", "SUCCESS");
        xml.put("return_msg", "OK");
        return WxPayKit.toXml(xml);
    }

    /**
     * 支付回調(diào)異步通知
     */
    public synchronized  void execPayNotify(HttpServletRequest request) {
        String xmlMsg = HttpKit.readData(request);
        log.info("支付通知:"+xmlMsg);
        Map<String, String> params = WxPayKit.xmlToMap(xmlMsg);
        WechatPaymentRecord record = wxPlayService.payNotify(params,mchKey);
        System.out.println("微信支付通知:"+record);

    }
}
WxPlayService:
package cn.umidata.nucleic.wechat.service;

import cn.umidata.nucleic.wechat.domain.RefundParams;
import cn.umidata.nucleic.wechat.domain.WechatPaymentRecord;
import cn.umidata.nucleic.wechat.domain.WxOrderParams;

import java.util.Map;

public interface WxPlayService {

    /**
     * 下單:
     * @param params
     * @return 微信調(diào)用微信支付的所需要的參數(shù)
     */
    public Map<String, String> placeOrder(WxOrderParams params);


    /**
     * 微信支付通知
     * @param params 微信通知xml轉(zhuǎn)map的參數(shù)
     */
    public WechatPaymentRecord payNotify(Map<String, String> params,String mchKey );



    /**
     * 退款
     * @param refundParams
     */
    public String refund(RefundParams refundParams);


    /**
     * 退款通知
     * @param params 微信通知xml轉(zhuǎn)map的參數(shù)
     */
    public void refundNotify(Map<String, String> params);
}
WxPlayServiceImpl:
package cn.umidata.nucleic.wechat.service.impl;

import cn.umidata.nucleic.common.utils.DateUtils;
import cn.umidata.nucleic.common.utils.ip.IpUtils;
import cn.umidata.nucleic.wechat.domain.RefundParams;
import cn.umidata.nucleic.wechat.domain.WechatPaymentRecord;
import cn.umidata.nucleic.wechat.domain.WxOrderParams;
import cn.umidata.nucleic.wechat.enums.WxPlayStatus;
import cn.umidata.nucleic.wechat.service.IWechatPaymentRecordService;
import cn.umidata.nucleic.wechat.service.WxPlayService;
import com.ijpay.core.enums.SignType;
import com.ijpay.core.enums.TradeType;
import com.ijpay.core.kit.WxPayKit;
import com.ijpay.wxpay.WxPayApi;
import com.ijpay.wxpay.WxPayApiConfigKit;
import com.ijpay.wxpay.enums.WxDomain;
import com.ijpay.wxpay.model.UnifiedOrderModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ijpay.wxpay.WxPayApiConfig;

import java.util.Date;
import java.util.Map;

/**
 * @BelongsProject: nucleic
 * @BelongsPackage: cn.umidata.nucleic.wechat.service.impl
 * @Author: zhanghui
 * @CreateTime: 2022-09-15  15:59
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class WxPlayServiceImpl implements WxPlayService {
    private final Logger log = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private IWechatPaymentRecordService recordService;
    /*
     * @description:下單:
     * @author: zhanghui
     * @date: 2022/9/15 0015 下午 4:00
     * @param params
     * @return 微信調(diào)用微信支付的所需要的參數(shù)
     **/
    @Override
    public Map<String, String> placeOrder(WxOrderParams params) {
        // 獲取openId一般情況下用戶登錄的時(shí)候openId是和用戶關(guān)聯(lián)的 所以openId可以通過(guò)當(dāng)前的userId去查詢openId
        String ip = IpUtils.getHostIp();
        Map<String, String> wxparams = UnifiedOrderModel.builder().appid(params.getAppid())
                .mch_id(params.getMchid()).nonce_str(WxPayKit.generateStr()).body(params.getBody()).attach(params.getAttach())
                .out_trade_no(params.getOutTradeNo())
                .mch_id(params.getMchid()).fee_type(params.getFeeType())
                // 注意 微信單位是分 我的數(shù)據(jù)庫(kù)存的是元 需要轉(zhuǎn)換
                .total_fee(String.valueOf(params.getTotalFee().intValue())).spbill_create_ip(ip)
                .notify_url(params.getNotifyUrl()).trade_type(TradeType.JSAPI.getTradeType()).openid(params.getOpenid()).build()
                .createSign(params.getMchKey(), SignType.MD5);
        String xmlResult = WxPayApi.pushOrder(false, WxDomain.CHINA, wxparams);
        Map<String, String> result = WxPayKit.xmlToMap(xmlResult);
        String returnCode = result.get("return_code");
        String returnMsg = result.get("return_msg");
        if (!WxPayKit.codeIsOk(returnCode)) {
            throw new SecurityException(returnMsg);
        }
        String resultCode = result.get("result_code");
        if (!WxPayKit.codeIsOk(resultCode)) {
            throw new SecurityException(returnMsg);
        }
        //實(shí)例化
        installRecord(params);
        // 以下字段在 return_code 和 result_code 都為 SUCCESS 的時(shí)候有返回
        String prepayId = result.get("prepay_id");
        Map<String, String> packageParams = WxPayKit.miniAppPrepayIdCreateSign(params.getAppid(), prepayId,
                params.getMchKey(), SignType.MD5);
        log.info("小程序支付統(tǒng)一下單返回參數(shù):" + packageParams.toString());
        return packageParams;

    }

    /*
     * @description:微信支付記錄流水
     * @author: zhanghui
     * @date: 2022/9/16 0016 下午 4:32
     **/
    private void  installRecord(WxOrderParams params){
        System.out.println("入庫(kù)");
        WechatPaymentRecord record1 = recordService.selectByOutTradeNo(params.getOutTradeNo());
        if(null==record1){
            WechatPaymentRecord record = new WechatPaymentRecord();
            record.setId(WxPayKit.generateStr());
            record.setAttach(params.getAttach());
            record.setBody(params.getBody());
            record.setDetail(params.getDetail());
            record.setFeeType(params.getFeeType());
            record.setNickname(params.getNickname());
            record.setOpenid(params.getOpenid());
            record.setOrderType(params.getOrderType());
            record.setOutTradeNo(params.getOutTradeNo());
            record.setSpbillCreateIp(IpUtils.getHostIp());
            record.setStatus(WxPlayStatus.PLACED.getCode());
            record.setTradeType(TradeType.JSAPI.getTradeType());
            record.setCreateBy(params.getOpenid());
            record.setTotalFee(params.getTotalFee());
            record.setOderBathNum(params.getOderBathNum());
            record.setCreateTime(new Date());
            recordService.insertWechatPaymentRecord(record);
        }
    }

//    public WxPayApiConfig getApiConfig() {
//        WxPayApiConfig apiConfig;
//
//        try {
//            apiConfig = WxPayApiConfigKit.getApiConfig();
//        } catch (Exception e) {
//            apiConfig = WxPayApiConfig.builder().appId(systemParamsConfig.getSpappid()).mchId(systemParamsConfig.getMchid())
//                    .partnerKey(systemParamsConfig.getPartnerKey()).certPath(systemParamsConfig.getCertPath())
//                    .domain(systemParamsConfig.getDomain()).build();
//        }
//        notifyUrl = apiConfig.getDomain().concat("/wxPay/payNotify");
//        refundNotifyUrl = apiConfig.getDomain().concat("/wxPay/refundNotify");
//        return apiConfig;
//    }

    /*
     * @description:微信支付通知
     * @author: zhanghui
     * @date: 2022/9/15 0015 下午 4:00
     *
     * @param params 微信通知xml轉(zhuǎn)map的參數(shù)
     **/
    @Override
    public WechatPaymentRecord payNotify(Map<String, String> params,String mchKey) {
        // 支付回調(diào)的code
        String returnCode = params.get("return_code");
        WechatPaymentRecord record= null;
        if (WxPayKit.verifyNotify(params, mchKey, SignType.MD5)) {
            if (WxPayKit.codeIsOk(returnCode)) {
                String resultCode = params.get("result_code");
                if (WxPayKit.codeIsOk(resultCode)) {
                    String outTradeNo = params.get("out_trade_no");
                    String transactionId = params.get("transaction_id");

                    String bankType = params.get("bank_type");
                    // 支付時(shí)間
                    String payTime = params.get("time_end");
                    String isSubscribe = params.get("is_subscribe");
                    record = recordService.selectByOutTradeNo(outTradeNo);
                    if(record!=null && record.getStatus()==WxPlayStatus.PLACED.getCode()){//訂單不為空并且訂單狀態(tài)為已下單
                        record.setTransactionId(transactionId);
                        record.setBankType(bankType);
                        record.setTimeEnd(DateUtils.dateTime("yyyyMMddHHmmss",payTime));
                        record.setIsSubscribe(isSubscribe);
                        record.setStatus(WxPlayStatus.PAID.getCode());
                        record.setUpdateBy(record.getCreateBy());
                        recordService.updateWechatPaymentRecord(record);
                    }
                }

            }
        }
        return record;
    }

    /*
     * @description:退款
     * @author: zhanghui
     * @date: 2022/9/15 0015 下午 4:01
     **/
    @Override
    public String refund(RefundParams refundParams) {
        return null;
    }

    /*
     * @description:退款通知
     * @author: zhanghui
     * @date: 2022/9/15 0015 下午 4:01
     **/
    @Override
    public void refundNotify(Map<String, String> params) {

    }
}

數(shù)據(jù)庫(kù)表:

CREATE TABLE `wechat_payment_record` (
  `id` varchar(32) NOT NULL,
  `transaction_id` varchar(50) DEFAULT NULL COMMENT '微信支付訂單號(hào)',
  `body` varchar(100) DEFAULT NULL COMMENT '商品描述',
  `detail` varchar(100) DEFAULT NULL COMMENT '商品詳情',
  `attach` varchar(50) DEFAULT NULL COMMENT '附加數(shù)據(jù)',
  `out_trade_no` varchar(20) DEFAULT NULL COMMENT '商戶訂單號(hào)',
  `fee_type` varchar(10) DEFAULT NULL COMMENT '標(biāo)價(jià)幣種',
  `total_fee` double DEFAULT NULL COMMENT '標(biāo)價(jià)金額',
  `spbill_create_ip` varchar(32) DEFAULT NULL COMMENT '終端IP',
  `trade_type` varchar(10) DEFAULT NULL COMMENT '交易類型',
  `openid` varchar(50) DEFAULT NULL COMMENT '用戶標(biāo)識(shí)',
  `nickname` varchar(30) DEFAULT NULL COMMENT '微信昵稱',
  `is_subscribe` varchar(32) DEFAULT NULL COMMENT '是否關(guān)注公眾賬號(hào)',
  `bank_type` varchar(32) DEFAULT NULL COMMENT '付款銀行',
  `time_end` datetime DEFAULT NULL COMMENT '支付時(shí)間',
  `status` bigint(20) DEFAULT NULL COMMENT '1:已下單2:已關(guān)閉 3:已支付 4:退款中  5:已退款',
  `order_type` varchar(20) DEFAULT NULL COMMENT '訂單類型',
  `refund_total_amount` varchar(20) DEFAULT NULL COMMENT '退款總金額',
  `create_by` varchar(50) DEFAULT NULL COMMENT '創(chuàng)建者',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(50) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `receive_fruiter_batch_num` bigint(32) DEFAULT NULL COMMENT '申領(lǐng)果樹(shù)批次',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信支付記錄流水對(duì)象';

就這些后面有時(shí)間了再更新文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-505759.html

到了這里,關(guān)于微信小程序調(diào)用微信支付的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【uniapp調(diào)用微信支付】uniapp開(kāi)發(fā)小程序-調(diào)用微信支付

    【uniapp調(diào)用微信支付】uniapp開(kāi)發(fā)小程序-調(diào)用微信支付

    使用uniapp開(kāi)發(fā)小程序時(shí),調(diào)用微信支付的步驟如下: 1.在manifest.json - App模塊權(quán)限選擇 中勾選 payment(支付) 2.在 manifest.json - App SDK配置 中,勾選需要的支付平臺(tái),目前有微信支付、支付寶支付、蘋(píng)果應(yīng)用內(nèi)支付(IAP),其中微信支付需要填寫(xiě)從微信開(kāi)放平臺(tái)獲取的 1.微信小程序支

    2024年02月12日
    瀏覽(20)
  • 【微信小程序支付功能】uniapp實(shí)現(xiàn)微信小程序支付功能

    【微信小程序支付功能】uniapp實(shí)現(xiàn)微信小程序支付功能

    場(chǎng)景 :要實(shí)現(xiàn)公司微信小程序的電商模塊微信支付功能 一.實(shí)現(xiàn)步驟和思路 在登錄狀態(tài),登錄的時(shí)候獲取到code,利用code獲取到 openid: https://blog.csdn.net/weixin_45308405/article/details/128868377?spm=1001.2014.3001.5501 在manifest.json文件“App模塊配置”項(xiàng)的“Payment(支付)”下,勾選“微信支付

    2024年02月11日
    瀏覽(104)
  • 【微信支付】java-微信小程序支付-V3接口

    【微信支付】java-微信小程序支付-V3接口

    最開(kāi)始需要在微信支付的官網(wǎng)注冊(cè)一個(gè)商戶; 在管理頁(yè)面中申請(qǐng)關(guān)聯(lián)小程序,通過(guò)小程序的 appid 進(jìn)行關(guān)聯(lián);商戶號(hào)和appid之間是多對(duì)多的關(guān)系 進(jìn)入微信公眾平臺(tái),功能-微信支付中確認(rèn)關(guān)聯(lián) 具體流程請(qǐng)瀏覽官方文檔:接入前準(zhǔn)備-小程序支付 | 微信支付商戶平臺(tái)文檔中心 流程走

    2024年02月06日
    瀏覽(33)
  • 微信小程序——支付

    小程序支付是專門(mén)被定義使用在小程序中的支付產(chǎn)品。目前在小程序中能且只能使用小程序支付的方式來(lái)喚起微信支付。 先判斷協(xié)議字段返回,再判斷業(yè)務(wù)返回,最后判斷交易狀態(tài) 除被掃支付場(chǎng)景以外,商戶系統(tǒng)先調(diào)用統(tǒng)一下單接口在微信支付服務(wù)后臺(tái)生成預(yù)支付交易單,

    2024年02月07日
    瀏覽(25)
  • 微信小程序支付流程

    微信小程序支付流程

    申請(qǐng)微信支付,配置小程序秘鑰,設(shè)置秘鑰和下載證書(shū),配置HTTPS服務(wù)器即可。 具體步驟 1、申請(qǐng)微信支付。小程序認(rèn)證以后,可以在小程序后臺(tái),微信支付菜單欄,申請(qǐng)微信支付。填寫(xiě)企業(yè)信息和對(duì)公賬戶,微信支付會(huì)打一筆隨機(jī)金額到對(duì)公賬戶,輸入金額完成驗(yàn)證后,在

    2024年02月13日
    瀏覽(25)
  • app第三方支付,微信小程序支付

    最近公司開(kāi)發(fā)一個(gè)app,需要從app跳轉(zhuǎn)到小程序去微信支付,當(dāng)時(shí)在網(wǎng)上看了好長(zhǎng)時(shí)間沒(méi)有看到適合自己的,在這里記錄一下,也方便自己以后可以再?gòu)?fù)習(xí)一下,畢竟本人腦子不太好使,只能記下來(lái)。 app跳轉(zhuǎn)頁(yè)面攜帶參數(shù)到小程序 小程序接收參數(shù),拉起微信支付

    2024年02月16日
    瀏覽(98)
  • 微信小程序接入微信支付

    微信小程序接入微信支付

    微信支付前提是:注冊(cè)了微信平臺(tái)后,必須開(kāi)通企業(yè)商戶號(hào),需要把工商登記證明,企業(yè)銀行賬戶開(kāi)戶證明,組織機(jī)構(gòu)代碼等提交上去進(jìn)行審核https://pay.weixin.qq.com/index.php/apply/applyment_home/guide_normal 開(kāi)通商戶號(hào)之后,我們需要得到密鑰,和證書(shū)等相關(guān)信息,根據(jù)如下文檔生成:

    2024年02月14日
    瀏覽(21)
  • 微信小程序(云開(kāi)發(fā))----微信支付

    微信小程序(云開(kāi)發(fā))----微信支付

    開(kāi)通微信支付云調(diào)用,首先需要小程序已經(jīng)開(kāi)通了微信支付,而微信支付是不支持個(gè)人小程序的,需要企業(yè)賬戶才行,其次需要小程序已經(jīng)綁定了商戶號(hào) 微信公眾平臺(tái)官網(wǎng) 郵箱不能在微信平臺(tái)注冊(cè)過(guò)。。。。有注冊(cè)過(guò)公眾號(hào)、訂閱號(hào)的都不行。。。。需要重新注冊(cè)個(gè)QQ 選擇

    2024年02月10日
    瀏覽(27)
  • 微信小程序的支付流程

    微信小程序的支付流程

    微信小程序?yàn)殡娚填愋〕绦?,提供了非常完善、?yōu)秀、安全的支付功能 在小程序內(nèi)可調(diào)用微信的 API 完成支付功能,方便、快捷 場(chǎng)景如下圖所示: 用戶通過(guò)分享或掃描二維碼進(jìn)入商戶小程序,用戶選擇購(gòu)買,完成選購(gòu)流程 調(diào)起微信支付控件,用戶開(kāi)始輸入支付密碼 密碼驗(yàn)證

    2024年02月02日
    瀏覽(23)
  • 微信小程序 實(shí)現(xiàn)支付流程

    微信小程序 實(shí)現(xiàn)支付流程

    開(kāi)發(fā)微信小程序時(shí),涉及到微信支付的開(kāi)發(fā)環(huán)節(jié),特此記錄一下 官方注冊(cè)地址????:接入微信支付 - 微信商戶平臺(tái) 備注:此商戶號(hào)為超級(jí)管理員,一般由更上級(jí)領(lǐng)導(dǎo)進(jìn)行注冊(cè)( ? ? 非前端人員注冊(cè)? ? ),會(huì)成為公司收款賬戶,主要填寫(xiě)超管信息并上傳企業(yè)資料(如:營(yíng)業(yè)執(zhí)

    2024年04月14日
    瀏覽(31)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包