-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.x Upgrade Guide #127
Comments
相关问题尽量在此反馈。 |
ok,已经使用最新版本的master了 |
可以可以,点个赞,就是omnipay/common v3 需要php 7.1以上版本坑了,我只能继续用v3.0-alpha.1的omnipay/common 了 |
如果需要固定库的版本,可以将 |
需要修改成 $response = $this->httpClient->request('GET', $url, [])->getBody(); |
@farmercode 感谢反馈,已修复! |
php7.1.17 composer 安装出现如下报错 laravel5.6 Problem 1 |
pc 网站支付 回调 $response = $request->send(); 出错 |
@xiaokus 有没有安装guzzle/guzzle包 |
安装了 支付成功了 就回调到这里就报错 |
@xiaokus 报错内容贴一下 |
发邮件给你了,瞧一瞧呀...PR 麻烦看看呢。 |
Upgrade apps from 2.x to 3.x
redirect()
method no callsexit()
after sending the content. This is up to the developer now.Upgrade Gateways from 2.x to 3.x
The primary difference is the HTTP Client. We are now using HTTPlug (http://httplug.io/) but rely on our own interface.
Breaking
Omnipay\Common\Http\ClientInterface
$client->get('..')
/$client->post('..')
etc are removed, you can call$client->request('GET', '')
.$request->send()
, requests are sent directly.$client->createRequest(..)
you can create+send the request directly with$client->request(..)
.json_encode()
and set the correct Content-Type.$response->getBody()->getContents()
to get the body as string.$response->json()
and$response->xml()
are gone, but you can implement the logic directly.omnipay/common
, butomnipay/omnipay
will add Guzzle.Gateways should not rely on Guzzle or other clients directly.
$body
should be a string (eg.http_build_query($data)
orjson_encode($data)
instead of just$data
).$headers
parameters should be anarray
(notnull
, but can be empty)Note: Prior to stable release, the goal is to migrate to PSR-18, once completed.
This will not change the gateway implementations.
总结:
omnipay/common v3
需要php 7.1
以上版本The text was updated successfully, but these errors were encountered: