| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace common\globals;
- use common\globals\BaseGlobal;
- /**
- * 银典代付全局调用
- * YunFastAgent class
- * @package common\globals
- */
- class YunFastAgent extends BaseGlobal
- {
- /**
- * 获取提现限制条件
- * @param array $invokes
- * @param array $params
- * @return void
- */
- public function agent($invokes, $params = [])
- {
- $withdral_cond_list = [];
- foreach ($invokes as $invoke) {
- try {
- // 获取条件
- $withdral_cond = $this->invoke($invoke['class'], $invoke['method'], $params);
- $is_success = $this->validateInvokeReturn($params['invoke_id'], $withdral_cond);
-
- // 全局调用获取提现条件
- if ($is_success) {
- $withdral_cond_list = array_merge($withdral_cond_list, $withdral_cond);
- } else {
- throw new \Exception('结果数据格式校验未通过');
- }
- } catch (\Exception $e) {
- \Yii::error('全局调用(INVOKE_WITHDRAW_YUNFAST_PAY)出错:' . $invoke['class'] . '->' . $invoke['method'] . 'msg:' . $e->getMessage());
- continue;
- }
- }
- return $withdral_cond_list;
- }
- /**
- * 验证
- * @param mixed $return
- * @return boolean
- */
- public function validateCheck($return = null)
- {
- return true;
- }
- /**
- * 验证调用结果
- * @param mixed $return
- * @return boolean
- */
- protected function validateWithDrawLimitCond($return = null): bool
- {
- return true;
- }
- }
|