123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- namespace crmeb\repositories;
- use app\models\store\StoreOrder;
- use app\models\user\UserRecharge;
- class PaymentRepositories
- {
-
- public static function wechatPaymentPrepare($order, $prepay_id)
- {
- }
-
- public static function wechatPaymentPrepareProgram($order, $prepay_id)
- {
- }
-
- public static function yuePayProduct($userInfo, $orderInfo)
- {
- }
-
- 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;
- }
- }
-
- 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;
- }
- }
-
- 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;
- }
- }
-
- public static function aliUserRecharge(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;
- }
- }
- }
|