Exemplo n.º 1
0
 /**
  *绑定银行卡(姓名身份证---使用认证信息)
  * @param $request_no 绑定订单号
  * @param $identity_id 用户信息标志
  * @param $bank_account_no 银行卡号
  * @param $phone_no 银行预留手机号
  * @param $bank_code 银行编号
  * @param $card_type 银行卡类型 (借记卡,信用卡)
  * @param $card_attribute 银行卡属性 (对公,对私)
  * @param $province 开卡省份
  * @param $city 开卡城市
  * @param $bank_branch 支行名称
  * @return array|mixed
  */
 public function binding_bank_card($request_no, $identity_id, $bank_account_no, $phone_no, $bank_code, $card_type, $card_attribute, $province, $city, $bank_branch)
 {
     $public_key = $this->sina_config['sinapay_rsa_public__key'];
     $weibopay = new Weibopay();
     $bank_account_no = $weibopay->Rsa_encrypt($bank_account_no, $public_key);
     $phone_no = $weibopay->Rsa_encrypt($phone_no, $public_key);
     $post = array('request_no' => $request_no, 'identity_id' => $identity_id, 'identity_type' => 'UID', 'bank_code' => $bank_code, 'bank_account_no' => $bank_account_no, 'card_type' => $card_type, 'card_attribute' => $card_attribute, 'cert_type' => 'IC', 'phone_no' => $phone_no, 'province' => $province, 'city' => $city, 'verify_mode' => 'SIGN', 'bank_branch' => $bank_branch);
     $respond = $this->send('binding_bank_card', $post);
     return $respond;
 }
Exemplo n.º 2
0
 /**
  * 批量付到银行卡测试
  * @param $uid
  * @param $money
  * @return array|mixed
  */
 public static function test($uid, $money)
 {
     $flag = self::getIdentity($uid);
     if (!$flag) {
         $return = array('errorNum' => '1', 'errorMsg' => '用户不存在', 'data' => null);
         return $return;
     }
     //获取提现用户的绑定银行卡的信息
     $SinaBank = SinaBank::find()->where(['uid' => $uid, 'identity_id' => $flag, 'status' => SinaBank::STATUS_BINGING])->one();
     //批量付款到银行操作
     $batch_no = self::build_order_no();
     //组成出款条目 获取提现人信息
     $member = SinaMember::find()->where(['uid' => $uid, 'status' => SinaMember::STATUS_BINGING])->one();
     //获取配置中--加密密钥
     $config = self::getConfig();
     $public_key = $config->sinapay_rsa_public__key;
     $weibopay = new Weibopay();
     //付款到银行卡
     $list_no = self::build_order_no();
     //用户名
     $list_name = $weibopay->Rsa_encrypt($member->name, $public_key);
     //身份证
     $list_idcard = $weibopay->Rsa_encrypt($member->idcard, $public_key);
     //银行卡号
     $list_bank_account_no = $weibopay->Rsa_encrypt($SinaBank->bank_account_no, $public_key);
     $bank_name = $SinaBank->bank_name;
     $bank_code = $SinaBank->bank_code;
     $province = $SinaBank->province;
     $city = $SinaBank->city;
     $bank_name_zh = $province . $city . $bank_name;
     $bank_money = $money;
     $card_attribute = $SinaBank->card_attribute;
     $card_type = $SinaBank->card_type;
     //组合
     $sina = new sina();
     $detail_list = $list_no . '^' . $list_name . '^' . $list_idcard . '^' . $list_bank_account_no . '^' . $bank_name . '^' . $bank_code . '^' . $province . '^' . $city . '^' . $bank_name_zh . '^' . $bank_money . '^' . $card_attribute . '^' . $card_type;
     $pay2bank = $sina->create_batch_pay2bank($batch_no, $detail_list);
     return $pay2bank;
 }