diff --git a/AliPay/App.php b/AliPay/App.php index c93a30d..37f10da 100644 --- a/AliPay/App.php +++ b/AliPay/App.php @@ -14,14 +14,14 @@ namespace AliPay; -use AliPay\Contracts\Ali; +use WeChat\Contracts\BasicAliPay; /** * 支付宝App支付网关 * Class App * @package AliPay */ -class App extends Ali +class App extends BasicAliPay { /** diff --git a/AliPay/Bill.php b/AliPay/Bill.php index 46e762d..4717197 100644 --- a/AliPay/Bill.php +++ b/AliPay/Bill.php @@ -14,14 +14,14 @@ namespace AliPay; -use AliPay\Contracts\Ali; +use WeChat\Contracts\BasicAliPay; /** * 支付宝电子面单下载 * Class Bill * @package AliPay */ -class Bill extends Ali +class Bill extends BasicAliPay { /** * Bill constructor. diff --git a/AliPay/Pos.php b/AliPay/Pos.php index 9f040ee..b173082 100644 --- a/AliPay/Pos.php +++ b/AliPay/Pos.php @@ -14,14 +14,14 @@ namespace AliPay; -use AliPay\Contracts\Ali; +use WeChat\Contracts\BasicAliPay; /** * 支付宝刷卡支付 * Class Pos * @package AliPay */ -class Pos extends Ali +class Pos extends BasicAliPay { /** * Pos constructor. diff --git a/AliPay/Scan.php b/AliPay/Scan.php index 27c6b20..d3d0672 100644 --- a/AliPay/Scan.php +++ b/AliPay/Scan.php @@ -14,14 +14,15 @@ namespace AliPay; -use AliPay\Contracts\Ali; + +use WeChat\Contracts\BasicAliPay; /** * 支付宝扫码支付 * Class Scan * @package AliPay */ -class Scan extends Ali +class Scan extends BasicAliPay { /** diff --git a/AliPay/Transfer.php b/AliPay/Transfer.php index 45183d7..3e51f17 100644 --- a/AliPay/Transfer.php +++ b/AliPay/Transfer.php @@ -14,14 +14,15 @@ namespace AliPay; -use AliPay\Contracts\Ali; + +use WeChat\Contracts\BasicAliPay; /** * 支付宝转账到账户 * Class Transfer * @package AliPay */ -class Transfer extends Ali +class Transfer extends BasicAliPay { /** diff --git a/AliPay/Wap.php b/AliPay/Wap.php index 7f7f33e..e1bef83 100644 --- a/AliPay/Wap.php +++ b/AliPay/Wap.php @@ -14,14 +14,14 @@ namespace AliPay; -use AliPay\Contracts\Ali; +use WeChat\Contracts\BasicAliPay; /** * 手机WAP网站支付支持 * Class Wap * @package AliPay */ -class Wap extends Ali +class Wap extends BasicAliPay { /** diff --git a/AliPay/Web.php b/AliPay/Web.php index 6f2a56a..6f58f2d 100644 --- a/AliPay/Web.php +++ b/AliPay/Web.php @@ -14,14 +14,14 @@ namespace AliPay; -use AliPay\Contracts\Ali; +use WeChat\Contracts\BasicAliPay; /** * 支付宝网站支付 * Class Web * @package AliPay */ -class Web extends Ali +class Web extends BasicAliPay { /** diff --git a/We.php b/We.php index 74e2b6b..3845137 100644 --- a/We.php +++ b/We.php @@ -30,7 +30,7 @@ use WeChat\Exceptions\InvalidInstanceException; * @method \WeChat\Media WeChatMedia($options = []) static 微信素材管理 * @method \WeChat\Menu WeChatMenu($options = []) static 微信菜单管理 * @method \WeChat\Oauth WeChatOauth($options = []) static 微信网页授权 - * @method \WeChat\Pay WeChatPay($options = []) static 微信支付商户 + * @method \WeChat\WePay WeChatPay($options = []) static 微信支付商户 * @method \WeChat\Product WeChatProduct($options = []) static 微信商店管理 * @method \WeChat\Qrcode WeChatQrcode($options = []) static 微信二维码管理 * @method \WeChat\Receive WeChatReceive($options = []) static 微信推送管理 diff --git a/AliPay/Contracts/Ali.php b/WeChat/Contracts/BasicAliPay.php similarity index 98% rename from AliPay/Contracts/Ali.php rename to WeChat/Contracts/BasicAliPay.php index 7c0ef7f..c067474 100644 --- a/AliPay/Contracts/Ali.php +++ b/WeChat/Contracts/BasicAliPay.php @@ -12,10 +12,8 @@ // | github开源项目:https://github.com/zoujingli/WeChatDeveloper // +---------------------------------------------------------------------- -namespace AliPay\Contracts; +namespace WeChat\Contracts; -use WeChat\Contracts\DataArray; -use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidArgumentException; /** @@ -23,7 +21,7 @@ use WeChat\Exceptions\InvalidArgumentException; * Class AliPay * @package AliPay\Contracts */ -abstract class Ali +abstract class BasicAliPay { /** @@ -228,5 +226,4 @@ abstract class Ali */ abstract public function apply($options); - } \ No newline at end of file diff --git a/WeChat/Contracts/BasicPay.php b/WeChat/Contracts/BasicWePay.php similarity index 99% rename from WeChat/Contracts/BasicPay.php rename to WeChat/Contracts/BasicWePay.php index eff91ac..f25cbda 100644 --- a/WeChat/Contracts/BasicPay.php +++ b/WeChat/Contracts/BasicWePay.php @@ -22,7 +22,7 @@ use WeChat\Exceptions\InvalidResponseException; * Class BasicPay * @package WeChat\Contracts */ -class BasicPay +class BasicWePay { /** * 商户配置 diff --git a/WeChat/Pay.php b/WeChat/WePay.php similarity index 98% rename from WeChat/Pay.php rename to WeChat/WePay.php index de595d9..1820de5 100644 --- a/WeChat/Pay.php +++ b/WeChat/WePay.php @@ -14,7 +14,7 @@ namespace WeChat; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; use WeChat\Exceptions\InvalidResponseException; use WePay\Bill; use WePay\Order; @@ -27,7 +27,7 @@ use WePay\TransfersBank; * Class Pay * @package WeChat\Contracts */ -class Pay extends BasicPay +class WePay extends BasicWePay { /** diff --git a/WePay/Bill.php b/WePay/Bill.php index 3ad9459..383da63 100644 --- a/WePay/Bill.php +++ b/WePay/Bill.php @@ -14,7 +14,7 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidResponseException; @@ -23,7 +23,7 @@ use WeChat\Exceptions\InvalidResponseException; * Class Bill * @package WePay */ -class Bill extends BasicPay +class Bill extends BasicWePay { /** * 下载对账单 diff --git a/WePay/Coupon.php b/WePay/Coupon.php index 28a0f3a..92ca5c0 100644 --- a/WePay/Coupon.php +++ b/WePay/Coupon.php @@ -14,14 +14,14 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; /** * 微信商户代金券 * Class Coupon * @package WePay */ -class Coupon extends BasicPay +class Coupon extends BasicWePay { /** * 发放代金券 diff --git a/WePay/Order.php b/WePay/Order.php index 06a158b..1b9de10 100644 --- a/WePay/Order.php +++ b/WePay/Order.php @@ -14,7 +14,7 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; use WeChat\Contracts\Tools; /** @@ -22,7 +22,7 @@ use WeChat\Contracts\Tools; * Class Order * @package WePay */ -class Order extends BasicPay +class Order extends BasicWePay { /** diff --git a/WePay/Redpack.php b/WePay/Redpack.php index 3f0fc3e..bf97ad8 100644 --- a/WePay/Redpack.php +++ b/WePay/Redpack.php @@ -14,14 +14,14 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; /** * 微信红包支持 * Class Redpack * @package WePay */ -class Redpack extends BasicPay +class Redpack extends BasicWePay { /** diff --git a/WePay/Refund.php b/WePay/Refund.php index ba98d18..8e3c199 100644 --- a/WePay/Refund.php +++ b/WePay/Refund.php @@ -14,7 +14,7 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidResponseException; @@ -23,7 +23,7 @@ use WeChat\Exceptions\InvalidResponseException; * Class Refund * @package WePay */ -class Refund extends BasicPay +class Refund extends BasicWePay { /** diff --git a/WePay/Transfers.php b/WePay/Transfers.php index 130dce4..89ff1d8 100644 --- a/WePay/Transfers.php +++ b/WePay/Transfers.php @@ -14,14 +14,14 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; /** * 微信商户打款到零钱 * Class Transfers * @package WePay */ -class Transfers extends BasicPay +class Transfers extends BasicWePay { /** diff --git a/WePay/TransfersBank.php b/WePay/TransfersBank.php index 5f57c82..0509d01 100644 --- a/WePay/TransfersBank.php +++ b/WePay/TransfersBank.php @@ -14,7 +14,7 @@ namespace WePay; -use WeChat\Contracts\BasicPay; +use WeChat\Contracts\BasicWePay; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidArgumentException; use WeChat\Exceptions\InvalidDecryptException; @@ -25,7 +25,7 @@ use WeChat\Exceptions\InvalidResponseException; * Class TransfersBank * @package WePay */ -class TransfersBank extends BasicPay +class TransfersBank extends BasicWePay { /** diff --git a/_test/pay-download-bill.php b/_test/pay-download-bill.php index c0181fb..3bcf9a8 100644 --- a/_test/pay-download-bill.php +++ b/_test/pay-download-bill.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-order-close.php b/_test/pay-order-close.php index 3a31ddc..a70cae5 100644 --- a/_test/pay-order-close.php +++ b/_test/pay-order-close.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = '1217752501201407033233368018'; diff --git a/_test/pay-order-create.php b/_test/pay-order-create.php index e130bb1..21dfea8 100644 --- a/_test/pay-order-create.php +++ b/_test/pay-order-create.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-order-query.php b/_test/pay-order-query.php index d993488..7e7151c 100644 --- a/_test/pay-order-query.php +++ b/_test/pay-order-query.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-refund-create.php b/_test/pay-refund-create.php index 02b554b..8447f06 100644 --- a/_test/pay-refund-create.php +++ b/_test/pay-refund-create.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-refund-query.php b/_test/pay-refund-query.php index a812ac4..7383b89 100644 --- a/_test/pay-refund-query.php +++ b/_test/pay-refund-query.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-transfers-create.php b/_test/pay-transfers-create.php index 77d70b0..889bd19 100644 --- a/_test/pay-transfers-create.php +++ b/_test/pay-transfers-create.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [ diff --git a/_test/pay-transfersbank-create.php b/_test/pay-transfersbank-create.php index 92147af..f70d12d 100644 --- a/_test/pay-transfersbank-create.php +++ b/_test/pay-transfersbank-create.php @@ -21,7 +21,7 @@ try { $config = include "./config.php"; // 3. 创建接口实例 - $wechat = new \WeChat\Pay($config); + $wechat = new \WeChat\WePay($config); // 4. 组装参数,可以参考官方商户文档 $options = [