public function actionReturnurl() { $ll = new lianlianClass(); $test = $ll->urlReturn(); if ($test) { $this->redirect('recharge'); } else { echo '返回错误'; exit; } }
/** * 用户首次支付 * @param $uid 用户id * @param $card_no 银行卡号 * @param $money 充值金额 */ public static function confirmation($uid, $card_no, $money) { $flag = member::isAuthentic($uid); if ($flag) { $id_cardno = $flag['idcard']; $real_name = $flag['real_name']; //TODO 获取银行卡信息 $bank_code = '01050000'; //用户标识 $flag = payLL::find()->where(['status' => self::SUCCESS, 'uid' => $uid])->orderBy('create_at desc')->one(); if ($flag) { $user_id = $flag['user_id']; } else { $user_id = self::verification($uid); } //商户业务类型 $busi_partne = '101001'; //商户唯一订单号 $no_order = self::verification($card_no); $name_goods = "充值"; $money_order = $money; $notify_url = 'http://www.lianlianpay.com/notify_url.html'; $id_no = $id_cardno; $acct_name = $real_name; $card_no = $card_no; //写入数据库记录 $pay = new payLL(); $pay->uid = $uid; $pay->idcard = $id_cardno; $pay->real_name = $real_name; $pay->user_id = $user_id; $pay->busi_partne = $busi_partne; $pay->no_order = $no_order; $pay->name_goods = $name_goods; $pay->money_order = $money; $pay->card_no = $card_no; $pay->from_ip = Yii::$app->request->userIp; $pay->status = self::CONFIRM; $res = $pay->save(); if ($res) { $lianlian = new lianlianClass(); $res = $lianlian->confirmation($user_id, $busi_partne, $no_order, $name_goods, $money_order, $notify_url, $id_no, $acct_name, $card_no, $bank_code); return $res; } } else { return "先实名认证"; } }
public function actionNotify() { $ll = new lianlianClass(); $test = $ll->returnNotify(); var_dump($test); }