Download the PHP package mjy191/laravel-wx-pay-v3 without Composer

On this page you can find all versions of the php package mjy191/laravel-wx-pay-v3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-wx-pay-v3

1.基本介绍

1.1 项目介绍

基于laravel框架 微信小程序支付v3版本,支付请求、支付回调、退款请求、退款回调

1.2 配置

在laravel的配置config/app.php中的provide添加 return [ // 小程序的appid 'appAPPID'=>'xxxxxx', // 商户号 'payMCHID'=>'xxxxxx', // v2的key 'sk'=>'xxxxxx', // v3的key 'skv3'=>'xxxxxx', // 证书序列号 'xlid'=>'xxxxxx', // 支付证书存放在app/Common/wxCert目录下 'certPath'=>'/app/Common/wxCert/', // 支付回调地址 'payNotifyUrl'=>'/api/wx/paynotify/', // 退款回调地址 'refundsNotifyUrl'=>'/api/wx/refundsnotify/', ];

Route::post('wx/paynotify/{payNum}',[\App\Http\Controllers\Api\WxController::class,'paynotify']); Route::post('wx/refundsnotify/{payNum}',[\App\Http\Controllers\Api\WxController::class,'refundsnotify']);

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller; use Mjy191\LaravelWxPayV3\WxPayV3;

class WxController extends Controller {

/**
 * 微信支付回调
 */
public function paynotify(WxPayV3 $wxPayV3)
{
    return $wxPayV3->notify(function($res){
        // 解密后的消息$res,可以参考下面
        //处理订单业务逻辑
    });
}

/**

namespace App\Exceptions;

use Mjy191\Tools\Tools; use Exception;

class ApiException extends Exception { /**

composer require mjy191/laravel-wx-pay-v3

方法说明 jsApi 下单,返回小程序支付信息 orderDetal 统一下单的详情查询 payNotify 支付回调 refunds 退款申请 refundsResult 退款结果查询 refundsNotify 退款回调 withDraw 提现

use Mjy191\Tools\Tools; use App\Http\Controllers\Controller; use Mjy191\LaravelWxPayV3\WxPayV3;

class TestController extends Controller {

/**
 * 用户列表
 */
public function index(){
    $param['openid'] = 'xxxxx'; // 用小程序openid
    $param['out_trade_no'] = 'xxxxx'; // 我方交易订单号
    $param['description'] = 'xxxxx'; //描述
    $param['amount'] = 100;  //交易金额分
    $res = (new WxPayV3())->jsApi($param);
    // 数据返回给小程序前端
    return Tools::returnData($res);
}

} $xslt grep aaaaaa 2082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] curl[url[https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi] method[post] params[{"appid":"xxx","mchid":"xxx","description":"xxxx","out_trade_no":"testxxx","notify_url":"https:\/\/xxx.xxx.com\/api\/wx\/paynotify\/111111","amount":{"total":9000},"payer":{"openid":"xxxxx"}}] header[["Content-Type:application\/json; charset=UTF-8","Accept:application\/json","User-Agent:\/*","Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"xxxx\",serial_no=\"xxxxx\",nonce_str=\"xxxx\",timestamp=\"xxxx\",signature=\"xxxxx\""]]] 2022082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] curl response[{"prepay_id":"xxxxxxxxx"}] 2022082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] response[{"code":1,"msg":"success","data":{"appId":"xxxx","timeStamp":"xxxx","nonceStr":"xxxxxx","package":"prepay_id=xxxxx","signType":"RSA","paySign":"xxxx"},"timestamp":xxxx}]


All versions of laravel-wx-pay-v3 with dependencies

PHP Build Version
Package Version
Requires mjy191/enum Version 1.*.*
mjy191/my-curl Version 1.*.*
mjy191/tools Version 1.*.*
mjy191/my-logs Version 1.*.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mjy191/laravel-wx-pay-v3 contains the following files

Loading the files please wait ....