daidai118/pay 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

daidai118/pay

Composer 安装命令:

composer require daidai118/pay

包简介

Pay solution for Yii2, support Wxpay and Alipay

README 文档

README

Yii2 pay component, support Alipay and Wxpay.

Install

Composer:

composer require 'tlanyan/yii2-pay:*'

or add the following line to the require section of your composer.json:

"tlanyan/yii2-pay": "*"

Channels

Alipay

The official SDK files is included in the repo, so you don't need to download the files from the Alipay website.

Usage

Append the following codes to the components array in the config file:

'components' => [
    // other components,
    'alipay' => [
        'class' => 'tlanyan\Alipay',
            'appid' => 'your appid',
            'merchantRsaPrivateKeyFile' => 'file path to your private key',
            'alipayRsaPublicKey' => 'the alipay public rsa key',
            'notifyUrl' => 'alipay call back url',
            'logCategory' => 'log category',
    ],
],

Options

Alipay component accept these parameters:

  • appid: required, the assigned appid by Alipay.
  • alipayRsaPublicKey: required, the rsa public key from Alipay.
  • merchantRsaPrivateKeyFile: prefferd, the merchant rsa private key file path.
  • merchantRsaPrivateKey: the merchant rsa private key. If merchantRsaPrivateKeyFile is provided, the content is read from the file. If you want to set private key manually, remember to remove the header,footer and break line symbols.
  • format: optional, Alipay response format. Valid values are: 'json'.
  • notifyUrl: optional, Alipay call back URL.
  • signType: optional, valid values are: 'RSA', 'RSA2'. Default value is 'RSA2'.
  • logCategory: optional, log category. Default value is 'alipay'.

Wxpay

Usage

Append the following codes to the components array in the config file:

'components' => [
    // other components,
    'wxpay' => [
        'class' => 'tlanyan\Wxpay',
            'appid' => 'your appid',
            'appkey' => 'app secret',
            'mchid' => 'merchant id',
            'notifyUrl' => 'Wxpay call back url',
            'logCategory' => 'log category',
    ],
],

Options

Wxpay component accept these parameters:

  • appid: required, the assigned appid by Wxpay.
  • appsecret: required, the app secret set in the merchant center.
  • mchid: required, the merchant id.
  • notifyUrl: required, Wxpay call back URL.
  • signType: optional, valid values are: 'MD5', 'HMAC-SHA256'. Default value is 'HMAC-SHA256'.
  • logCategory: optional, log category. Default value is 'wxpay'.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固