public function bind_union_card($unionUid, $cardNo) { $response = $this->unionpay->bindCard($unionUid, $cardNo); $response = json_decode($response, true); $respCd = $response['respCd']; if ($respCd == '000000') { return $response['data']; } else { return $respCd; } }
/** * * 银行卡开通服务 */ function testBindCard() { header('Content-Type:text/html;charset=utf-8 '); $userId = 'c00050001985'; $cardNo = '6222021001128509530'; $response = $this->unionpay->bindCard($userId, $cardNo); echo $response; }