123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <<<<<<< HEAD
- <?php
- namespace crmeb\repositories;
- use app\models\store\StoreOrder;
- use app\models\user\UserRecharge;
- /**
- * Class PaymentRepositories
- * @package crmeb\repositories
- */
- class PaymentRepositories
- {
- /**
- * 公众号下单成功之后
- * @param $order
- * @param $prepay_id
- */
- public static function wechatPaymentPrepare($order, $prepay_id)
- {
- }
- /**
- * 小程序下单成功之后
- * @param $order
- * @param $prepay_id
- */
- public static function wechatPaymentPrepareProgram($order, $prepay_id)
- {
- }
- /**
- * 使用余额支付订单时
- * @param $userInfo
- * @param $orderInfo
- */
- public static function yuePayProduct($userInfo, $orderInfo)
- {
- }
- /**
- * 订单支付成功之后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function wechatProduct(string $order_id = null)
- {
- try {
- if (StoreOrder::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return StoreOrder::paySuccess($order_id);
- } catch (\Exception $e) {
- return false;
- }
- }
- /**
- * 订单支付成功之后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function aliProduct(string $order_id = null)
- {
- try {
- if (StoreOrder::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return StoreOrder::paySuccess($order_id, 'ali');
- } catch (\Exception $e) {
- return false;
- }
- }
- /**
- * 充值成功后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function wechatUserRecharge(string $order_id = null)
- {
- try {
- if (UserRecharge::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return UserRecharge::rechargeSuccess($order_id);
- } catch (\Exception $e) {
- return false;
- }
- }
- =======
- <?php
- namespace crmeb\repositories;
- use app\models\store\StoreOrder;
- use app\models\user\UserRecharge;
- /**
- * Class PaymentRepositories
- * @package crmeb\repositories
- */
- class PaymentRepositories
- {
- /**
- * 公众号下单成功之后
- * @param $order
- * @param $prepay_id
- */
- public static function wechatPaymentPrepare($order, $prepay_id)
- {
- }
- /**
- * 小程序下单成功之后
- * @param $order
- * @param $prepay_id
- */
- public static function wechatPaymentPrepareProgram($order, $prepay_id)
- {
- }
- /**
- * 使用余额支付订单时
- * @param $userInfo
- * @param $orderInfo
- */
- public static function yuePayProduct($userInfo, $orderInfo)
- {
- }
- /**
- * 订单支付成功之后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function wechatProduct(string $order_id = null)
- {
- try {
- if (StoreOrder::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return StoreOrder::paySuccess($order_id);
- } catch (\Exception $e) {
- return false;
- }
- }
- /**
- * 订单支付成功之后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function aliProduct(string $order_id = null)
- {
- try {
- if (StoreOrder::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return StoreOrder::paySuccess($order_id, 'ali');
- } catch (\Exception $e) {
- return false;
- }
- }
- /**
- * 充值成功后
- * @param string|null $order_id 订单id
- * @return bool
- */
- public static function wechatUserRecharge(string $order_id = null)
- {
- try {
- if (UserRecharge::be(['order_id' => $order_id, 'paid' => 1])) return true;
- return UserRecharge::rechargeSuccess($order_id);
- } catch (\Exception $e) {
- return false;
- }
- }
- >>>>>>> 386b37d33e5ba817cba00df29efaefbd692e4dd1
- }
|