|
|
@@ -19,6 +19,7 @@ use SixShop\Payment\Enum\PaymentBizEnum;
|
|
|
use SixShop\Payment\Enum\PaymentStatusEnum;
|
|
|
use SixShop\Payment\Event\PaymentSuccessEvent;
|
|
|
use think\facade\Event;
|
|
|
+use function SixShop\Core\throw_logic_exception;
|
|
|
|
|
|
class PaymentProvider implements PaymentProviderInterface
|
|
|
{
|
|
|
@@ -123,6 +124,9 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
$accBusiFields = new TradePreorderWechaAccBusiFields();
|
|
|
$accBusiFields->setTimeoutExpress($expireDuration);
|
|
|
$accBusiFields->setSubAppid($this->config->sub_appid);
|
|
|
+ if (!isset($order['params']['openid'])) {
|
|
|
+ throw_logic_exception('微信未授权无法交易');
|
|
|
+ }
|
|
|
$accBusiFields->setUserId($order['params']['openid']);
|
|
|
/*$detail = new TradePreorderWechaDetail();
|
|
|
$detail->setCostPrice((float)$order['pay_amount']);
|