Beispiel #1
0
 /**
  * 从银联下载优惠券
  * @param  $uid
  * @param  $mobile
  * @param  $unionUid
  * @param unknown_type $unionCouponId
  * @param unknown_type $transSeq
  * @return 成功返回data数组, 失败返回respCd
  */
 public function download_union_coupon($uid, $mobile, $unionUid, $unionCouponId, $transSeq)
 {
     $data['chnlUsrId'] = $uid;
     $data['chnlUsrMobile'] = $mobile;
     $data['couponId'] = $unionCouponId;
     $data['couponNum'] = '1';
     $data['couponSceneId'] = '000';
     $data['transSeq'] = $transSeq;
     $data['userId'] = $unionUid;
     //		print_r($data);
     $response = $this->unionpay->couponDwnById($data);
     $response = json_decode($response, true);
     $respCd = $response['respCd'];
     if ($respCd == '000000') {
         return $response['data'];
     } else {
         return $respCd;
     }
 }
Beispiel #2
0
 function testCouponDwnById()
 {
     header('Content-Type:text/html;charset=utf-8 ');
     //		$transSeq = '123456789900';
     //		$userId = 'c00050001985';
     //		$couponId = 'Z00000000010074';
     //		$couponNum = '1';
     //		$chnlUsrId = '111';
     //		$chnlUsrMobile = '13166361023';
     //		$couponSceneId = '000';
     $data['chnlUsrId'] = '57';
     $data['chnlUsrMobile'] = '13166361023';
     $data['couponId'] = 'Z00000000008039';
     $data['couponNum'] = '1';
     $data['couponSceneId'] = '000';
     $data['transSeq'] = 'C57D36T1414479969';
     $data['userId'] = 'c00055685346';
     $response = $this->unionpay->couponDwnById($data);
     //
     //
     echo $response;
 }