From 6e504f1af13b812b4e855970d08472872bc4a92e Mon Sep 17 00:00:00 2001
From: yansongda
Date: Tue, 26 Dec 2017 18:01:57 +0800
Subject: [PATCH 1/9] fix #43
---
src/Gateways/Wechat/Wechat.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Gateways/Wechat/Wechat.php b/src/Gateways/Wechat/Wechat.php
index f63bb740..9b1d04ab 100644
--- a/src/Gateways/Wechat/Wechat.php
+++ b/src/Gateways/Wechat/Wechat.php
@@ -92,8 +92,12 @@ abstract class Wechat implements GatewayInterface
*/
public function refund($config_biz = [])
{
+ if (isset($config_biz['miniapp'])) {
+ $this->config['appid'] = $this->user_config->get('miniapp_id');
+ unset($config_biz['miniapp']);
+ }
+
$this->config = array_merge($this->config, $config_biz);
- $this->config['op_user_id'] = isset($this->config['op_user_id']) ?: $this->user_config->get('mch_id', '');
$this->unsetTradeTypeAndNotifyUrl();
--
Gitee
From 6ef3debcfa00a990636b4e81791960cef6f9d367 Mon Sep 17 00:00:00 2001
From: yansongda
Date: Tue, 26 Dec 2017 20:43:03 +0800
Subject: [PATCH 2/9] UPDATE README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index eab2ad6c..9c7dac65 100644
--- a/README.md
+++ b/README.md
@@ -117,7 +117,7 @@ SDK 中对应的 driver 和 gateway 如下表所示:
## 安装
```shell
-composer require yansongda/pay
+composer require "yansongda/pay:^1.0"
```
## 使用说明
--
Gitee
From bb4abeb7eb8cfb3fce753377d2f3ead32ff32add Mon Sep 17 00:00:00 2001
From: yansongda
Date: Tue, 5 Jun 2018 22:07:29 +0800
Subject: [PATCH 3/9] fix #119
---
src/Gateways/Alipay/Alipay.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/Gateways/Alipay/Alipay.php b/src/Gateways/Alipay/Alipay.php
index 6d829fda..7b349e97 100644
--- a/src/Gateways/Alipay/Alipay.php
+++ b/src/Gateways/Alipay/Alipay.php
@@ -220,6 +220,10 @@ abstract class Alipay implements GatewayInterface
$this->config['method'] = $method;
$this->config['sign'] = $this->getSign();
+ $this->config = array_filter($this->config, function ($value) {
+ return ($value == '' || is_null($value)) ? false : true;
+ });
+
$method = str_replace('.', '_', $method).'_response';
$data = json_decode($this->post($this->gateway, $this->config), true);
--
Gitee
From 158205ca2826db314c1bb689790c3e00ebc1ee86 Mon Sep 17 00:00:00 2001
From: yansongda
Date: Wed, 13 Jun 2018 11:14:13 +0800
Subject: [PATCH 4/9] fix some bugs
---
src/Gateways/Alipay/Alipay.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Gateways/Alipay/Alipay.php b/src/Gateways/Alipay/Alipay.php
index 7b349e97..970aa255 100644
--- a/src/Gateways/Alipay/Alipay.php
+++ b/src/Gateways/Alipay/Alipay.php
@@ -15,7 +15,7 @@ abstract class Alipay implements GatewayInterface
/**
* @var string
*/
- protected $gateway = 'https://openapi.alipay.com/gateway.do'.'?charset=utf-8';
+ protected $gateway = 'https://openapi.alipay.com/gateway.do?charset=UTF-8';
/**
* alipay global config params.
--
Gitee
From 4968c39c96e8370476c2024000d5b816be32507c Mon Sep 17 00:00:00 2001
From: yansongda
Date: Wed, 13 Jun 2018 11:25:16 +0800
Subject: [PATCH 5/9] update README
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9c7dac65..be1cd123 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,15 @@
+**!注意:v1.x 版本将不做新功能开发,只进行 bug 维护!请大家尽快迁移到 v2 版本!**
+
开发了多次支付宝与微信支付后,很自然产生一种反感,惰性又来了,想在网上找相关的轮子,可是一直没有找到一款自己觉得逞心如意的,要么使用起来太难理解,要么文件结构太杂乱,只有自己撸起袖子干了。
**说明,请先熟悉支付宝说明文档!!**
欢迎 Star,欢迎 PR!
-laravel 扩展包请 [传送至这里](https://github.com/yansongda/laravel-pay)
+laravel 扩展包请 [https://github.com/yansongda/laravel-pay](https://github.com/yansongda/laravel-pay)
## 特点
- 命名不那么乱七八糟
--
Gitee
From 5afc39b13a65979cb27470509d06bf2661ae58a7 Mon Sep 17 00:00:00 2001
From: yansongda
Date: Fri, 20 Jul 2018 21:23:44 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/Gateways/Alipay/Alipay.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Gateways/Alipay/Alipay.php b/src/Gateways/Alipay/Alipay.php
index 970aa255..f45bd059 100644
--- a/src/Gateways/Alipay/Alipay.php
+++ b/src/Gateways/Alipay/Alipay.php
@@ -221,7 +221,7 @@ abstract class Alipay implements GatewayInterface
$this->config['sign'] = $this->getSign();
$this->config = array_filter($this->config, function ($value) {
- return ($value == '' || is_null($value)) ? false : true;
+ return $value !== '' && !is_null($value);
});
$method = str_replace('.', '_', $method).'_response';
--
Gitee
From f732b1a32cf0e1a17464a705fc8685c2ff296cd3 Mon Sep 17 00:00:00 2001
From: yansongda
Date: Sat, 25 Aug 2018 15:22:30 +0800
Subject: [PATCH 7/9] fix #147
---
src/Gateways/Alipay/Alipay.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Gateways/Alipay/Alipay.php b/src/Gateways/Alipay/Alipay.php
index f45bd059..548046fc 100644
--- a/src/Gateways/Alipay/Alipay.php
+++ b/src/Gateways/Alipay/Alipay.php
@@ -50,7 +50,7 @@ abstract class Alipay implements GatewayInterface
'app_id' => $this->user_config->get('app_id'),
'method' => '',
'format' => 'JSON',
- 'charset' => 'utf-8',
+ 'charset' => 'UTF-8',
'sign_type' => 'RSA2',
'version' => '1.0',
'return_url' => $this->user_config->get('return_url', ''),
--
Gitee
From 3af05fd113b8d0c0de1411aa8d12b5710c0808d8 Mon Sep 17 00:00:00 2001
From: yansongda
Date: Thu, 29 Nov 2018 21:20:11 +0800
Subject: [PATCH 8/9] fix #197
---
src/Gateways/Alipay/Alipay.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Gateways/Alipay/Alipay.php b/src/Gateways/Alipay/Alipay.php
index 548046fc..2761e4ea 100644
--- a/src/Gateways/Alipay/Alipay.php
+++ b/src/Gateways/Alipay/Alipay.php
@@ -194,11 +194,11 @@ abstract class Alipay implements GatewayInterface
protected function buildPayHtml()
{
$sHtml = "";
+ $sHtml .= "";
$sHtml .= "";
return $sHtml;
--
Gitee
From edc0173914fd8c5ee0dc7c71eaa7ba67e1c4b6ac Mon Sep 17 00:00:00 2001
From: kingofzihua
Date: Sat, 24 Oct 2020 10:45:20 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9DAPP=E6=94=AF?=
=?UTF-8?q?=E4=BB=98=E6=8A=A5=E9=94=99=20alin10146?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
支付宝支付报错 alin10146,原因支付宝不允许传空值,如return_url或notify_url有时为空,造成签名错误 https://github.com/yansongda/pay/issues/119#ref-commit-bb4abeb 中修复了一遍了但是 APP 支付没有,可能漏了?
---
src/Gateways/Alipay/AppGateway.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/Gateways/Alipay/AppGateway.php b/src/Gateways/Alipay/AppGateway.php
index b1861bef..1e2940b7 100644
--- a/src/Gateways/Alipay/AppGateway.php
+++ b/src/Gateways/Alipay/AppGateway.php
@@ -41,6 +41,16 @@ class AppGateway extends Alipay
{
parent::pay($config_biz);
+
+ /**
+ * 支付宝支付报错 alin10146,原因支付宝不允许传空值,如return_url或notify_url有时为空,造成签名错误
+ * @author kingofzihua
+ * @link https://github.com/yansongda/pay/issues/119#ref-commit-bb4abeb
+ */
+ $this->config = array_filter($this->config, function ($value) {
+ return $value !== '' && !is_null($value);
+ });
+
return http_build_query($this->config);
}
}
--
Gitee