diff --git a/composer.lock b/composer.lock index ad2e901..dcb8026 100644 --- a/composer.lock +++ b/composer.lock @@ -5908,16 +5908,16 @@ }, { "name": "xuanchen/coupon", - "version": "1.0.2", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/xuanchen120/coupon.git", - "reference": "5c25fda61c156353e748f27b891c7d4c3654cc88" + "reference": "df39cde6667291bd9f2e22245fe3f964593c8ac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xuanchen120/coupon/zipball/5c25fda61c156353e748f27b891c7d4c3654cc88", - "reference": "5c25fda61c156353e748f27b891c7d4c3654cc88", + "url": "https://api.github.com/repos/xuanchen120/coupon/zipball/df39cde6667291bd9f2e22245fe3f964593c8ac5", + "reference": "df39cde6667291bd9f2e22245fe3f964593c8ac5", "shasum": "", "mirrors": [ { @@ -5955,20 +5955,20 @@ ], "description": "卡券核销相关", "homepage": "https://github.com/xuanchen120/coupon.git", - "time": "2020-11-27T05:31:51+00:00" + "time": "2021-01-14T02:23:33+00:00" }, { "name": "xuanchen/unionpay", - "version": "2.2", + "version": "2.4", "source": { "type": "git", "url": "https://github.com/xuanchen120/unionpay.git", - "reference": "8f714a9b312893aca914a43d58ad190b6b2f1e88" + "reference": "906c9c7f45d7d3c1b095de5deb24127692c28c7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/8f714a9b312893aca914a43d58ad190b6b2f1e88", - "reference": "8f714a9b312893aca914a43d58ad190b6b2f1e88", + "url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/906c9c7f45d7d3c1b095de5deb24127692c28c7d", + "reference": "906c9c7f45d7d3c1b095de5deb24127692c28c7d", "shasum": "", "mirrors": [ { @@ -6005,7 +6005,7 @@ } ], "description": "第三方银联对接", - "time": "2020-12-21T07:04:17+00:00" + "time": "2021-01-14T02:13:55+00:00" } ], "packages-dev": [ diff --git a/config/unionpay.php b/config/unionpay.php index 6fa4f45..441a133 100644 --- a/config/unionpay.php +++ b/config/unionpay.php @@ -1,10 +1,18 @@ 'test', //添加日志 'log' => true, + //获取微信侧的优惠券 'unionpay_url' => [ - 'code' => 'http://dev.spserv.yxlm.chinaums.com:25941/spapigateway/v2/markting/sp/coupon/order/get', + 'test' => [ + 'code' => 'http://dev.spserv.yxlm.chinaums.com:25941/spapigateway/v2/markting/sp/coupon/order/get', + ], + 'dev' => [ + 'code' => 'https://mktos.chinaums.com/spapigateway/v2/markting/sp/coupon/order/get', + ], ], //不进行sign校验 'nosign' => [ @@ -32,17 +40,25 @@ return [ //佣金 'commission' => 0, //证书 - 'check' => [ - 'self' => [ - 'private' => storage_path('cert/unionpay/self/private_rsa.pem'), - 'public' => storage_path('cert/unionpay/self/public_rsa.pem'), + 'certificate' => [ + 'dev' => [ + 'ysd' => [ + 'private' => storage_path('cert/unionpay/dev/ysd/private_rsa.pem'), + 'public' => storage_path('cert/unionpay/dev/ysd/public_rsa.pem'), + ], + 'union' => [ + 'public' => storage_path('cert/unionpay/dev/union/public_rsa.pem'), + ], ], - 'dev' => [ - 'private' => storage_path('cert/unionpay/dev/private_rsa.pem'), - 'public' => storage_path('cert/unionpay/dev/public_rsa.pem'), - ], - 'unionpay' => [ - 'public' => storage_path('cert/unionpay/public_rsa.pem'), + + 'test' => [ + 'ysd' => [ + 'private' => storage_path('cert/unionpay/test/ysd/private_rsa.pem'), + 'public' => storage_path('cert/unionpay/test/ysd/public_rsa.pem'), + ], + 'union' => [ + 'public' => storage_path('cert/unionpay/test/union/public_rsa.pem'), + ], ], ], //接口类型 diff --git a/storage/cert/unionpay/dev/union/public_rsa.pem b/storage/cert/unionpay/dev/union/public_rsa.pem new file mode 100644 index 0000000..0394515 --- /dev/null +++ b/storage/cert/unionpay/dev/union/public_rsa.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGBzj/rgW4kCZhzIxy29qp3mqY +9pV18hGK6v132RmJ9DYxGdzIwhCdlPvcSIczBcZ+OnQuqYeVVatXO7lc1MUgDPaA +FGgSQFwTTz+JwoPrn+x1ATs1jDgYucEFVzfNJagR44unFLIhZ1IP5Nn289wp3u6p +9ZtYOlmtQmwI4dHcPwIDAQAB +-----END PUBLIC KEY----- diff --git a/storage/cert/unionpay/dev/private_rsa.pem b/storage/cert/unionpay/dev/ysd/private_rsa.pem similarity index 100% rename from storage/cert/unionpay/dev/private_rsa.pem rename to storage/cert/unionpay/dev/ysd/private_rsa.pem diff --git a/storage/cert/unionpay/dev/public_rsa.pem b/storage/cert/unionpay/dev/ysd/public_rsa.pem similarity index 100% rename from storage/cert/unionpay/dev/public_rsa.pem rename to storage/cert/unionpay/dev/ysd/public_rsa.pem diff --git a/storage/cert/unionpay/self/old/private_rsa.pem b/storage/cert/unionpay/self/old/private_rsa.pem deleted file mode 100644 index afb59e4..0000000 --- a/storage/cert/unionpay/self/old/private_rsa.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC/1n0w5iwWPB4XuS+QX820prkO7iEFmXDh4OPTCT43HKV63Tk0 -j1oEY7rzJizvQcGQRrxHrv7syeEjrzh6b/5flqRk2XYDOO4CNO1LNuhUsVn17sMH -4GQzrnZQDAnU1Jxlk9ttamNpkGyind071+B2azT8TdLwjGXe2e4x7M0AOwIDAQAB -AoGAaDCMKeS5CRJ5nZTcemMuC/GJDMzUboAZyPQliFa6zZ/nWEWSbjN1RnEL9kdD -nGZwRHXGiIBIwD4c4w6ldAojcsJB76pfdeok6gDlswk3McF2uMPUvn6Yc37nnkbz -crXI6wDy0aPX/MfcHq2UoX5GdDYVEnOBnictxWPBMZ6S4fECQQDkH8vfaO4wGKQ2 -K1uiUHEIRv0qOUvGY/BKJtBcyE4wpHpMtlY8o2vGssvpTueBWXWp8XRShOLoo+J+ -PXrBLvTVAkEA10eUTLIvTag2nKS1B3dCJaszYWAL2otf5F4EwEKmfkFNhk7qkVm+ -Ain9h/RsKqBb9n3MeeqSqUvbSq8FzCTozwJBAM/OdzVIrNF7YPtHe+3cQVs875nr -H6/Vkiq6OMyMW03MRuxinSQX6jHS5hXeHt2h1KG+piwViW5K/CPrdUtNrxECQA3s -rFP1poegXL/vC2KLPTUQiMdAniOppi8wQaBp7zj1Yl1Ql22FX3vmWWbE0YZETw53 -fpVYLdpTdMC052wX6xMCQEZHbKjv9odbN6vZAcz15RC0j21brEQQ3goXSxLtjkmQ -LkcLdiDZgqGiVjNXTnh81fVkoIh9CfTSZH0a7Zc/RvM= ------END RSA PRIVATE KEY----- diff --git a/storage/cert/unionpay/self/old/public_rsa.pem b/storage/cert/unionpay/self/old/public_rsa.pem deleted file mode 100644 index 0f40cc7..0000000 --- a/storage/cert/unionpay/self/old/public_rsa.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/1n0w5iwWPB4XuS+QX820prkO -7iEFmXDh4OPTCT43HKV63Tk0j1oEY7rzJizvQcGQRrxHrv7syeEjrzh6b/5flqRk -2XYDOO4CNO1LNuhUsVn17sMH4GQzrnZQDAnU1Jxlk9ttamNpkGyind071+B2azT8 -TdLwjGXe2e4x7M0AOwIDAQAB ------END PUBLIC KEY----- diff --git a/storage/cert/unionpay/public_rsa.pem b/storage/cert/unionpay/test/union/public_rsa.pem similarity index 100% rename from storage/cert/unionpay/public_rsa.pem rename to storage/cert/unionpay/test/union/public_rsa.pem diff --git a/storage/cert/unionpay/self/private_rsa.pem b/storage/cert/unionpay/test/ysd/private_rsa.pem similarity index 100% rename from storage/cert/unionpay/self/private_rsa.pem rename to storage/cert/unionpay/test/ysd/private_rsa.pem diff --git a/storage/cert/unionpay/self/public_rsa.pem b/storage/cert/unionpay/test/ysd/public_rsa.pem similarity index 100% rename from storage/cert/unionpay/self/public_rsa.pem rename to storage/cert/unionpay/test/ysd/public_rsa.pem