|
@@ -1,16 +1,15 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
+
|
|
|
declare(strict_types=1);
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace SixShop\Balpay;
|
|
namespace SixShop\Balpay;
|
|
|
|
|
|
|
|
use app\model\User;
|
|
use app\model\User;
|
|
|
-use function SixShop\Core\throw_logic_exception;
|
|
|
|
|
use SixShop\Balpay\Entity\ExtensionBalpayLogEntity;
|
|
use SixShop\Balpay\Entity\ExtensionBalpayLogEntity;
|
|
|
use SixShop\Balpay\Enum\BalpayLogTypeEnum;
|
|
use SixShop\Balpay\Enum\BalpayLogTypeEnum;
|
|
|
use SixShop\Payment\Contracts\PaymentNotifyResult;
|
|
use SixShop\Payment\Contracts\PaymentNotifyResult;
|
|
|
use SixShop\Payment\Contracts\PaymentProviderInterface;
|
|
use SixShop\Payment\Contracts\PaymentProviderInterface;
|
|
|
use SixShop\Payment\Contracts\PaymentQueryResult;
|
|
use SixShop\Payment\Contracts\PaymentQueryResult;
|
|
|
-use SixShop\Payment\Contracts\PaymentRefundQueryResult;
|
|
|
|
|
use SixShop\Payment\Contracts\PaymentRefundRequest;
|
|
use SixShop\Payment\Contracts\PaymentRefundRequest;
|
|
|
use SixShop\Payment\Contracts\PaymentRefundResult;
|
|
use SixShop\Payment\Contracts\PaymentRefundResult;
|
|
|
use SixShop\Payment\Contracts\PaymentResponse;
|
|
use SixShop\Payment\Contracts\PaymentResponse;
|
|
@@ -24,16 +23,17 @@ use SixShop\Payment\Event\RefundSuccessEvent;
|
|
|
use think\facade\Db;
|
|
use think\facade\Db;
|
|
|
use think\facade\Event;
|
|
use think\facade\Event;
|
|
|
|
|
|
|
|
|
|
+use function SixShop\Core\throw_logic_exception;
|
|
|
|
|
+
|
|
|
class PaymentProvider implements PaymentProviderInterface
|
|
class PaymentProvider implements PaymentProviderInterface
|
|
|
{
|
|
{
|
|
|
- const string PAYMENT_TYPE = 'balpay';
|
|
|
|
|
|
|
+ public const string PAYMENT_TYPE = 'balpay';
|
|
|
|
|
|
|
|
public function __construct(
|
|
public function __construct(
|
|
|
private readonly ExtensionBalpayLogEntity $logEntity,
|
|
private readonly ExtensionBalpayLogEntity $logEntity,
|
|
|
private readonly ExtensionPaymentEntity $extensionPaymentEntity,
|
|
private readonly ExtensionPaymentEntity $extensionPaymentEntity,
|
|
|
private readonly ExtensionRefundEntity $extensionRefundEntity,
|
|
private readonly ExtensionRefundEntity $extensionRefundEntity,
|
|
|
- )
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ ) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function create(array $order, PaymentBizEnum $bizType): PaymentResponse
|
|
public function create(array $order, PaymentBizEnum $bizType): PaymentResponse
|
|
@@ -131,4 +131,4 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
throw_logic_exception('支付密码错误', status: 'balpay.pay_password_error');
|
|
throw_logic_exception('支付密码错误', status: 'balpay.pay_password_error');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|