uniapp对接支付

2020-12-20 11:29:44

  1. https://github.com/dcloudio/H5P.Server/tree/master/payment 使用sdk
  2. 对接代码
    require_once "../payment/wxpayv3/WxPay.Api.php";
    require_once "../payment/wxpayv3/WxPay.Data.php";
    
    $unifiedOrder = new WxPayUnifiedOrder();
    $unifiedOrder->SetBody($subject);//商品或支付单简要描述
    $unifiedOrder->SetOut_trade_no($out_trade_no);
    $unifiedOrder->SetTotal_fee($total);
    $unifiedOrder->SetTrade_type("APP");
    $result = WxPayApi::unifiedOrder($unifiedOrder);

致知网络科技© 2020-2025 鲁ICP备20031360号-2