Sfoglia il codice sorgente

【程序目录】小程序支付提示优化

吴昊天 3 anni fa
parent
commit
86cc190063
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      crmeb/app/services/pay/PayServices.php

+ 3 - 0
crmeb/app/services/pay/PayServices.php

@@ -92,6 +92,9 @@ class PayServices
             return $pay->create($orderId, $price, $successAction, $body, '', ['openid' => $openid, 'isCode' => $isCode, 'pay_new_weixin_open' => (bool)sys_config('pay_new_weixin_open')]);
             return $pay->create($orderId, $price, $successAction, $body, '', ['openid' => $openid, 'isCode' => $isCode, 'pay_new_weixin_open' => (bool)sys_config('pay_new_weixin_open')]);
 
 
         } catch (\Exception $e) {
         } catch (\Exception $e) {
+            if (strpos($e->getMessage(), 'api unauthorized rid') !== false) {
+                throw new ApiException('请在微信支付配置中将小程序商户号选择改为商户号绑定');
+            }
             throw new ApiException($e->getMessage());
             throw new ApiException($e->getMessage());
         }
         }
     }
     }