|
@@ -5,6 +5,7 @@ namespace SixShop\Payment;
|
|
|
use SixShop\Payment\Contracts\PaymentResponse;
|
|
use SixShop\Payment\Contracts\PaymentResponse;
|
|
|
use SixShop\Payment\Entity\ExtensionPaymentEntity;
|
|
use SixShop\Payment\Entity\ExtensionPaymentEntity;
|
|
|
use SixShop\Payment\Enum\PaymentBizEnum;
|
|
use SixShop\Payment\Enum\PaymentBizEnum;
|
|
|
|
|
+use SixShop\Payment\Event\BeforePayEvent;
|
|
|
use SixShop\Payment\Event\GatheringPaymentEvent;
|
|
use SixShop\Payment\Event\GatheringPaymentEvent;
|
|
|
use SixShop\System\ExtensionManager;
|
|
use SixShop\System\ExtensionManager;
|
|
|
use SixShop\System\Model\ExtensionModel;
|
|
use SixShop\System\Model\ExtensionModel;
|
|
@@ -46,6 +47,7 @@ readonly class PaymentManager
|
|
|
public function create($paymentId, array $order, PaymentBizEnum $bizType = PaymentBizEnum::ORDER_PAY): PaymentResponse
|
|
public function create($paymentId, array $order, PaymentBizEnum $bizType = PaymentBizEnum::ORDER_PAY): PaymentResponse
|
|
|
{
|
|
{
|
|
|
$extension = $this->extensionManager->getExtension($paymentId);
|
|
$extension = $this->extensionManager->getExtension($paymentId);
|
|
|
|
|
+ Event::trigger(new BeforePayEvent($order, $paymentId, $bizType));
|
|
|
return $extension->getPaymentProvider()->create($order, $bizType);
|
|
return $extension->getPaymentProvider()->create($order, $bizType);
|
|
|
}
|
|
}
|
|
|
|
|
|