Giter VIP home page Giter VIP logo

omnipay-wechatpay's Introduction

Omnipay: WechatPay

WechatPay driver for the Omnipay PHP payment processing library

Build Status Latest Stable Version Total Downloads

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements WechatPay support for Omnipay.

Installation

Omnipay is installed via Composer. To install:

composer require lokielse/omnipay-wechatpay

Basic Usage

The following gateways are provided by this package:

  • WechatPay (Wechat Common Gateway) 微信支付通用网关
  • WechatPay_App (Wechat App Gateway) 微信APP支付网关
  • WechatPay_Native (Wechat Native Gateway) 微信原生扫码支付支付网关
  • WechatPay_Js (Wechat Js API/MP Gateway) 微信网页、公众号、小程序支付网关
  • WechatPay_Pos (Wechat Micro/POS Gateway) 微信刷卡支付网关
  • WechatPay_Mweb (Wechat H5 Gateway) 微信H5支付网关

Usage

Create Order doc

//gateways: WechatPay_App, WechatPay_Native, WechatPay_Js, WechatPay_Pos, WechatPay_Mweb
$gateway    = Omnipay::create('WechatPay_App');
$gateway->setAppId($config['app_id']);
$gateway->setMchId($config['mch_id']);
$gateway->setApiKey($config['api_key']);

$order = [
    'body'              => 'The test order',
    'out_trade_no'      => date('YmdHis').mt_rand(1000, 9999),
    'total_fee'         => 1, //=0.01
    'spbill_create_ip'  => 'ip_address',
    'fee_type'          => 'CNY'
];

/**
 * @var Omnipay\WechatPay\Message\CreateOrderRequest $request
 * @var Omnipay\WechatPay\Message\CreateOrderResponse $response
 */
$request  = $gateway->purchase($order);
$response = $request->send();

//available methods
$response->isSuccessful();
$response->getData(); //For debug
$response->getAppOrderData(); //For WechatPay_App
$response->getJsOrderData(); //For WechatPay_Js
$response->getCodeUrl(); //For Native Trade Type

Notify doc

$gateway    = Omnipay::create('WechatPay');
$gateway->setAppId($config['app_id']);
$gateway->setMchId($config['mch_id']);
$gateway->setApiKey($config['api_key']);

$response = $gateway->completePurchase([
    'request_params' => file_get_contents('php://input')
])->send();

if ($response->isPaid()) {
    //pay success
    var_dump($response->getRequestData());
}else{
    //pay fail
}

Query Order doc

$response = $gateway->query([
    'transaction_id' => '1217752501201407033233368018', //The wechat trade no
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());

Close Order doc

$response = $gateway->close([
    'out_trade_no' => '201602011315231245', //The merchant trade no
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());

Refund doc

$gateway->setCertPath($certPath);
$gateway->setKeyPath($keyPath);

$response = $gateway->refund([
    'transaction_id' => '1217752501201407033233368018', //The wechat trade no
    'out_refund_no' => $outRefundNo,
    'total_fee' => 1, //=0.01
    'refund_fee' => 1, //=0.01
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());

QueryRefund doc

$response = $gateway->queryRefund([
    'refund_id' => '1217752501201407033233368018', //Your site trade no, not union tn.
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());

Shorten URL (for WechatPay_Native) doc

$response = $gateway->shortenUrl([
    'long_url' => $longUrl
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());
var_dump($response->getShortUrl());

Query OpenId (for WechatPay_Pos) doc

$response = $gateway->queryOpenId([
    'auth_code' => $authCode
])->send();

var_dump($response->isSuccessful());
var_dump($response->getData());
var_dump($response->getOpenId());

For general usage instructions, please see the main Omnipay repository.

Related

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

omnipay-wechatpay's People

Contributors

kanghuli avatar laraveler avatar lokielse avatar maxsky avatar php-cpm avatar sunanzhi avatar videni avatar zacksleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnipay-wechatpay's Issues

getJsOrderData返回数据到小程序后出错了。

小程序调用getJsOrderData返回的数据 :

例如:
wx.requestPayment({
'timeStamp': '1523333222',
'nonceStr': 'f451b1286827c667c666668df727444',
'package': 'prepay_id=wx12226666666370dd3f971eaa1134666743',
'signType': 'MD5',
'paySign': '9CA1CDF5B24B882C6DFE93F782EF7BFD',
})

微信发起了支付,但是显示无法验证签名的错误:
{err_code: 2, err_desc: "Unable to verify signature", errMsg: "requestPayment:fail"}

不知道小程序的支付签名方式是不是又有什么坑了?
谢谢。

ios下报timestamp错误

src\Message\CreateOrderResponse.php中42号中的time改为字符串

修改后代码:
$time = time();
$data = array (
'appId' => $this->request->getAppId(),
'package' => 'prepay_id=' . $this->getPrepayId(),
'nonceStr' => md5(uniqid()),
'timeStamp' => "$time",
'signType' => 'MD5',
);

微信支付回调疑问

hi, lokielse, 我这边现在用您的框架写微信支付,发起支付和APP里付款都是没有问题的,但是唯一的问题是我无法获取到回调内容的指定参数,也不知道是不是我使用上的问题,
`public function wechatpay_notify(Request $request){

    $all_input = file_get_contents('php://input');

// $content = $request->getContent();

    // 检查XML内容完整
    Log::DEBUG('微支付回调all_input:' . htmlspecialchars($all_input));

// Log::DEBUG('微支付回调Input::all():' . Input::all());
// Log::DEBUG('微支付回调$content:' . $content);

    $response = $this->wechatpay_gateway->completePurchase([
        'request_params' => $all_input
    ])->send();

    if ($response->isPaid()) {
        //pay success
        $data = $response->getData();
        Log::DEBUG('微支付回调[attach]:' . $data['attach']);
        Log::DEBUG('微支付回调[out_trade_no]:' . $data['out_trade_no']);
        Log::DEBUG('微支付回调[result_code]:' . $data['result_code']);

// Log::DEBUG('微支付回调getData:' . implode('##', $response->getData()));
// Log::DEBUG('微支付回调:' . implode('##', $response->getData()));

    }else{
        //pay fail
    }

}`

return_code 此字段是通信标识,非交易标识,交易是否成功需要查看result_code来判断

    public function isSuccessful()
    {
        $data = $this->getData();
        return isset($data['return_code']) && $data['return_code'] == 'SUCCESS';
    }

https://github.com/shinvdu/omnipay-wechatpay/blob/master/src/Message/BaseAbstractResponse.php#L23

没有做result_code判断。

建议改为

return (isset($data['return_code']) && $data['return_code'] == 'SUCCESS' && isset($data['result_code']) && $data['result_code'] == 'SUCCESS');

有获取openid的方法吗?

用的WechatPay_Js 公众号支付,而公众号支付,需要用户OPENID,找许久,源码里没有关于获取OPENID的代码,不知楼主是否有做相关功能?或者说是否有公众号支付的相关案例。以下是提示错误:
The open_id parameter is required

我的代码是:
`
$gateway = Omnipay::create('WechatPay_Js');
$gateway->setAppId(config('pay.wechatpay.appid'));
$gateway->setMchId(config('pay.wechatpay.mchid'));
$gateway->setApiKey(config('pay.wechatpay.key'));
$gateway->setNotifyUrl('http://example.com/notify');
$gateway->setTradeType('JSAPI');

    $order = [
        'body'              => 'The test order',
        'out_trade_no'      => date('YmdHis').mt_rand(1000, 9999),
        'total_fee'         => 1, //=0.01
        'spbill_create_ip'  => 'ip_address',
        'fee_type'          => 'CNY'
    ];

`

WechatPay_Native 微信支付问题

$gateway = Omnipay::create('WechatPay_Native');
$gateway->setAppId('wx0b2cb4687763f2c5');
$gateway->setMchId('1303570701');
$gateway->setApiKey('qK2Szcejbv19r9hI6VbaqodqpH3x5mXd');
$order = [
'body' => 'The test order',
'out_trade_no' => date('YmdHis').mt_rand(1000, 9999),
'total_fee' => 0.01, //=0.01
'spbill_create_ip' => 'ip_address',
'fee_type' => 'CNY'
];

    $request  = $gateway->purchase($order);
    $response = $request->send();

    $response->isSuccessful();
    $response->getData(); //For debug
    $response->getAppOrderData(); //For WechatPay_App
    $response->getJsOrderData(); //For WechatPay_Js
    $response->getCodeUrl(); //For Native Trade Type

Omnipay \ Common \ Exception \ InvalidRequestException
The notify_url parameter is required

最新版 Laravel 安装问题

问题描述

执行composer** require lokielse/omnipay-wechatpay时出现版本冲突问题,类似如下

Your requirements could not be resolved to an installable set of package

  Problem 1
    - Conclusion: don't install lokielse/omnipay-wechatpay v1.0.17
    - Conclusion: don't install lokielse/omnipay-wechatpay v1.0.16
    - Conclusion: don't install lokielse/omnipay-wechatpay v1.0.15
    - Conclusion: remove symfony/event-dispatcher v3.1.4
    - Conclusion: don't install symfony/event-dispatcher v3.1.4
    - omnipay/common 2.4.0 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle/
    - omnipay/common v2.3.4 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle
    - omnipay/common v2.4.1 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle
    - omnipay/common v2.5.0 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle
    - omnipay/common v2.5.1 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle
    - guzzle/guzzle v3.9.0 requires symfony/event-dispatcher ~2.1 -> satisfiable
v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4
v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24,
37, v2.3.38, v2.3.39, v2.3.4, v2.3.40, v2.3.41, v2.3.42, v2.3.5, v2.3.6, v2.3.7,
 v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5
2.6.9, v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.
 v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.
    - guzzle/guzzle v3.9.1 requires symfony/event-dispatcher ~2.1 -> satisfiable
v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4
v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24,
37, v2.3.38, v2.3.39, v2.3.4, v2.3.40, v2.3.41, v2.3.42, v2.3.5, v2.3.6, v2.3.7,
 v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5
2.6.9, v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.
 v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.
    - guzzle/guzzle v3.9.2 requires symfony/event-dispatcher ~2.1 -> satisfiable
v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4
v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24,
37, v2.3.38, v2.3.39, v2.3.4, v2.3.40, v2.3.41, v2.3.42, v2.3.5, v2.3.6, v2.3.7,
 v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5
2.6.9, v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.
 v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.

CURLOPT_SSL_VERIFYHOST no longer accepts the value2...

curl_setopt_array CURLOPT_SSL_VERIFYHOST no longer accepts the value2, value 2 will be used

//RefundOrderRequest
 public function sendData($data)
    {
        $options = array (
            CURLOPT_SSL_VERIFYPEER => true,
            CURLOPT_SSL_VERIFYHOST => 2,
            CURLOPT_SSLCERTTYPE    => 'PEM',
            CURLOPT_SSLKEYTYPE     => 'PEM',
            CURLOPT_SSLCERT        => $this->getCertPath(),
            CURLOPT_SSLKEY         => $this->getKeyPath(),
        );

        $body         = Helper::array2xml($data);
        $request      = $this->httpClient->post($this->endpoint, null, $data)->setBody($body);
        $request->getCurlOptions()->merge($options); //change to overwriteWith 

        $response     = $request->send()->getBody();
        $responseData = Helper::xml2array($response);

        return $this->response = new CloseOrderResponse($this, $responseData);
    }

I don't why this happens, but changing merge to overwriteWith can resolve this problem.

帅哥,queryRefund 是不是参数检查哪里有点问题?

$response = $gateway->queryRefund([
    'refund_id' => '1217752501201407033233368018', //Your site trade no, not union tn.
])->send();

The 'transaction_id' or 'out_trade_no' parameter is required

貌似和查询订单没有区分开. 多谢.

商户号该产品权限未开通

{
"return_code": "FAIL",
"return_msg": "商户号该产品权限未开通,请前往商户平台>产品中心检查后重试"
}

APP微信支付时,返回这个错误。这是什么问题,开放平台已经绑定该公众号了。后台填的是公众号app_id,商户号mch_id,支付密钥api_key。我在网页中测试微信扫码支付时正常,可以支付。

很诡异的退款证书问题

感谢开发了很实用的类库。在实际使用中,退款这块偶尔报错,要说如果证书有问题,会无法退款,但是大部分时候没问题,偶尔报错,很是诡异,具体堆栈:
服务器环境是 PHP 7.0.6

2016-08-27 16:56:57
[171.83.121.13][9778][5r160sfns012mcr9j0r1i4m844][error][Guzzle\Http\Exception\CurlException]
Guzzle\Http\Exception\CurlException: [curl] 58: unable to use client
certificate (no key found or wrong pass phrase?) [url]
https://api.mch.weixin.qq.com/secapi/pay/refund in
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php:359
Stack trace:
#0
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(292):
Guzzle\Http\Curl\CurlMulti->isCurlException(Object(Guzzle\Http\Message\EntityEnclosingRequest),
Object(Guzzle\Http\Curl\CurlHandle), Array)
#1
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(257):
Guzzle\Http\Curl\CurlMulti->processResponse(Object(Guzzle\Http\Message\EntityEnclosingRequest),
Object(Guzzle\Http\Curl\CurlHandle), Array)
#2
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(240):
Guzzle\Http\Curl\CurlMulti->processMessages()
#3
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(224):
Guzzle\Http\Curl\CurlMulti->executeHandles()
#4
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(111):
Guzzle\Http\Curl\CurlMulti->perform()
#5
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php(94):
Guzzle\Http\Curl\CurlMulti->send()
#6
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php(284):
Guzzle\Http\Curl\CurlMultiProxy->send()
#7
/data/wwwroot/site.shenghuotianxia.com/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(198):
Guzzle\Http\Client->send(Object(Guzzle\Http\Message\EntityEnclosingRequest))
#8
/data/wwwroot/site.shenghuotianxia.com/vendor/lokielse/omnipay-wechatpay/src/Message/RefundOrderRequest.php(252):
Guzzle\Http\Message\Request->send()
#9
/data/wwwroot/site.shenghuotianxia.com/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php(675):
Omnipay\WechatPay\Message\RefundOrderRequest->sendData(Array)
#10
/data/wwwroot/site.shenghuotianxia.com/wechat/models/DepositOrder.php(261):
Omnipay\Common\Message\AbstractRequest->send()

Can't find the certificate

路径 /Users/Breeze/yeli_network/youbao_php/private/wechat/pay/apiclient_cert.pem 是从微信开放平台下载api证书并且内容正确

异常捕获的错误
SSL: Can't find the certificate "/Users/Breeze/yeli_network/youbao_php/private/wechat/pay/apiclient_cert.pem" and its private key in the Keychain.

路径文件是存在的
Breeze-MacBook-Pro:~ Breeze$ cat /Users/Breeze/yeli_network/youbao_php/private/wechat/pay/apiclient_cert.pem
-----BEGIN CERTIFICATE-----
MIIEaDCCA9GgAwIBAgIDZCtgMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJD
TjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UE
ChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENBMR8w
HQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50MB4XDTE2MTEyMjA0MDEwMloX....

以下是配置

/**
* @var $gateway Gateway
*/
$gateway = Omnipay::create('WechatPay');
$gateway->setAppId(Config::get('payment.wechat.appId'));
$gateway->setMchId(Config::get('payment.wechat.mchId'));
$gateway->setApiKey(Config::get('payment.wechat.apiKey'));
$gateway->setKeyPath('/Users/Breeze/yeli_network/youbao_php/private/wechat/pay/apiclient_key.pem');
$gateway->setCertPath('/Users/Breeze/yeli_network/youbao_php/private/wechat/pay/apiclient_cert.pem');

始终报签名错误

然后找不到发过去的到底是什么?最后找到了array2xml这个方法,这个方法返回的xml我给放到微信签名校验,是能通过的,但是外面一层setBody我不知道有没有成功,最终请求了微信那边的服务器,但不知道带过去的数据是什么,也不知道有没有把数据带过去。支付宝的成功了,微信的麻烦您再看下?

退款申请请求错误

lokielse/omnipay-wechatpay 1.0.15

Omnipay\WechatPay\Message\RefundOrderRequest.php的sendData方法中
调用$this->httpClient->post时,$options未成功设置,可使用

$this->httpClient->setConfig([Client::CURL_OPTIONS=>$options]);
$responseData = Helper::xml2array(
$this->httpClient->post($this->endpoint, null, $data)->setBody(Helper::array2xml($data))->send(
)->getBody()
);

README spelling err

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements UnionPay support for Omnipay.

there might be WechatPay.

jsSDK提示签名错误

jsSDK提示签名错误,经排查是加密类型没有加入到支付签名中导致。
vendor/lokielse/omnipay-wechatpay/src/Message/CreateOrderResponse.php中的getJSOrderData方法中

在数组$data中添加『'signType' => 'MD5',』
$data = array (
'appId' => $this->request->getAppId(),
'package' => 'prepay_id=' . $this->getPrepayId(),
'nonceStr' => md5(uniqid()),
'timeStamp' => time(),
'signType' => 'MD5',
);

建议把
$data['sign'] = Helper::sign($data, $this->request->getApiKey());

改为
$data['paySign'] = Helper::sign($data, $this->request->getApiKey());

方便在js中直接使用

Wechat timeStamp is string

公众号 iphone 6s plus error "微信支付调用JSAPI缺少参数:timeStamp"

public function getOrderData()
{
    if ($this->isSuccessful()) {
        $timestamp = time();
        $data = array (
            'app_id'    => $this->request->getAppId(),
            'mch_id'    => $this->request->getMchId(),
            'prepay_id' => $this->getPrepayId(),
            'package'   => 'Sign=WXPay',
            'nonce'     => md5(uniqid()),
            'timestamp' => "$timestamp",
        );

        $data['sign'] = Helper::sign($data, $this->request->getApiKey());
    } else {
        $data = null;
    }

    return $data;
}

很迷芒 虽然这是官方的写法 但按照你以前写的 , 安卓 iphone5s 并没有报错,唯独在 6s plus 下面报这个错

支付通知怎么才能获取微信官方返回的信息

谢谢大神开发出这么好用的库,使用的时候遇到个问题:

if ( $response->isPaid() ) {
    $data = $response->getData();
}

这里返回的 $data 只有 sign_match 和 paid 两个参数,怎么才能获取微信官方返回的信息。

作者你好,我想同时使用微信、银联、支付宝支付、但是他们之间好像有冲突

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install lokielse/omnipay-wechatpay v3.0.8
    - Conclusion: don't install omnipay/common 2.5.2
    - Conclusion: don't install lokielse/omnipay-wechatpay v3.0.7
    - Installation request for ignited/laravel-omnipay ^2.3 -> satisfiable by ignited/laravel-omnipay[2.3.0].
    - lokielse/omnipay-wechatpay v3.0.3 requires omnipay/common ^3.0 -> satisfiable by omnipay/common[v3.0.0, v3.0.1, v3.0.2].
    - lokielse/omnipay-wechatpay v3.0.4 requires omnipay/common ^3.0 -> satisfiable by omnipay/common[v3.0.0, v3.0.1, v3.0.2].
    - lokielse/omnipay-wechatpay v3.0.5 requires omnipay/common ^3.0 -> satisfiable by omnipay/common[v3.0.0, v3.0.1, v3.0.2].
    - lokielse/omnipay-wechatpay v3.0.6 requires omnipay/common ^3.0 -> satisfiable by omnipay/common[v3.0.0, v3.0.1, v3.0.2].
    - Can only install one of: omnipay/common[v3.0.0, v2.5.0].
    - Can only install one of: omnipay/common[v3.0.1, v2.5.0].
    - Can only install one of: omnipay/common[v3.0.2, v2.5.0].
    - ignited/laravel-omnipay 2.3.0 requires omnipay/common 2.5.* -> satisfiable by omnipay/common[2.5.2, v2.5.0, v2.5.1].
    - Conclusion: don't install omnipay/common v2.5.1
    - Installation request for lokielse/omnipay-wechatpay ^3.0 -> satisfiable by lokielse/omnipay-wechatpay[v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8].

composer.json

  "require": {
    "php": ">=7.0.0",
    "barryvdh/laravel-ide-helper": "^2.4",
    "econea/nusoap": "v0.9.5.4",
    "fideloper/proxy": "~3.3",
    "gzero/eloquent-tree": "^3.1",
    "ignited/laravel-omnipay": "^2.3",
    "laravel/framework": "5.5.*",
    "laravel/tinker": "~1.0",
    "lokielse/omnipay-alipay": "^2.3",
    "lokielse/omnipay-unionpay": "^0.4",
    "lokielse/omnipay-wechatpay": "^3.0",
    "maatwebsite/excel": "2.1.*",
    "mews/captcha": "^2.1",
    "omnipay/paypal": "^2.6",
    "symfony/event-dispatcher": "2.8"
  },

我看见issues有16年的解决方法,不知道是否有其他更好的解决方法、困扰了一早上、这个问题

微信企业付款

@lokielse 嗨!
微信支付工具中的企业付款介绍:

提供企业向用户付款的功能,支持企业通过API接口付款,或通过微信支付商户平台网页功能操作付款。

这里没有实现本接口的功能,我在近期打算实现它。

TODO:

Please update dependency "omnipay/common" to version 3

We use this package with our Symfony 3 project, the package "omnipay/common" is dependent on "symfony/event-dispatcher" 2 version, which will conflict with same package in Symfony3, Please update the dependency to version 3, thanks a lot.

H5支付中

微信H5支付,,生成的签名是对的。。为什么返回的值总是报签名错误。。总是不能生成出h5的支付地址
#data: array:2 [
"return_code" => "FAIL"
"return_msg" => "签名错误"
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.