Download the PHP package yuxiaoyang/appwxpay without Composer

On this page you can find all versions of the php package yuxiaoyang/appwxpay. 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 appwxpay

Laravel 5.1 微信APP支付 扩展使用教程

wechat-pay-app

微信APP支付-服务器端PHP SDK 
精简的SDK代码,方便程序扩展使用
官方文档说明: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_1
微信APP支付流程: 服务器端下单 -> 生成预支付参数 -> APP通过预支付调起客户端支付

使用示例

生成APP支付参数示例代码

或者在你的 composer.json 的 require 部分中添加:

下载完毕之后,直接配置 config/app.phpproviders:

控制器中使用 AppwxpayController.php :



<?php

use \Yuxiaoyang\Appwxpay\Appwxpay;

class AppwxpayController extends Controller
{

    public $appwxpay;

    //获取支付报文json数据
    public function appwxpay()
    {

        //初始化配置参数
        $options = array(
            'appid'=>'******************',//填写微信分配的公众账号ID
            'mch_id'=>'**********',//填写微信支付分配的商户号
            'notify_url'=>'http://www.******.com/appwx/notify',//填写微信支付结果回调地址
            'key'=>'***********'//填写微信商户支付密钥
        );

        //创建示例对象
        $this->appwxpay = new Appwxpay($options);

        //设置下单参数
        $params['body'] = '商品描述';//商品描述
        $params['out_trade_no'] = rand(1000000000000000,9999999999999999);  //自定义的订单号
        $params['total_fee'] = '100';   //订单金额 只能为整数 单位为分
        $params['trade_type'] = 'APP';  //交易类型 APP

        //请求微信【统一下单】接口,成功会返回 预支付交易会话标识 prepay_id
        $result = $this->appwxpay->unifiedOrder($params);
        //dd($result);
        if(isset($result['prepay_id'])){
            //生成APP端调起支付所需的参数
            $data = $this->appwxpay->getAppPayParams($result['prepay_id']);
            return $data;
        }else{
            return $result;
        }

    }

}

All versions of appwxpay with dependencies

PHP Build Version
Package Version
No informations.
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 yuxiaoyang/appwxpay contains the following files

Loading the files please wait ....