|
|
@@ -49,6 +49,8 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
throw new \RuntimeException('开发测试中,请稍后再试');
|
|
|
}
|
|
|
$payment->transaction(function () use ($bizType, $order, $payment) {
|
|
|
+ $randomDiscount = mt_rand(1, intval($this->config->random_discount_max * 100)) / 100;
|
|
|
+ $order['pay_amount'] = $order['pay_amount'] - $randomDiscount;
|
|
|
$payment->save([
|
|
|
'user_id' => $order['user_id'],
|
|
|
'order_id' => $order['id'],
|