예제 #1
0
파일: Request.php 프로젝트: allvie/wechat
 /**
  * POST Request
  */
 public static function post($url, $params = array(), $jsonDecode = true)
 {
     $response = static::doRequest('POST', $url, $params);
     return $jsonDecode ? JSON::decode($response) : $response;
 }
예제 #2
0
파일: Config.php 프로젝트: kendoctor/wechat
 /**
  * 微信支付 JSSDK chooseWXPay 方式配置文件
  */
 public static function getPaymentJssdkConfig(Unifiedorder $unifiedorder, $asArray = false)
 {
     $config = static::getPaymentConfig($unifiedorder, true);
     $bag = new Bag();
     $bag->set('timestamp', $config['timeStamp']);
     $bag->set('nonceStr', $config['nonceStr']);
     $bag->set('package', $config['package']);
     $bag->set('signType', $config['signType']);
     $bag->set('paySign', $config['paySign']);
     return $asArray ? $bag->all() : JSON::encode($bag->all());
 }