本文整理汇总了PHP中RequestHandler::createMd5Sign方法的典型用法代码示例。如果您正苦于以下问题:PHP RequestHandler::createMd5Sign方法的具体用法?PHP RequestHandler::createMd5Sign怎么用?PHP RequestHandler::createMd5Sign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RequestHandler
的用法示例。
在下文中一共展示了RequestHandler::createMd5Sign方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strval
$packetParams['body'] = $product_name;
//商品详情
$packetParams['attach'] = $product_name;
//商户订单号
$packetParams['out_trade_no'] = $out_trade_no;
//总金额
$packetParams['total_fee'] = $total_fee;
//访问接口IP
//$packetParams['spbill_create_ip'] = Request::getClientIp();
$packetParams['spbill_create_ip'] = '127.0.0.1';
//接受微信支付异步通知回调地址
$packetParams['notify_url'] = ecmobile_url() . $notify_url;
//交易类型:JSAPI,NATIVE,APP
$packetParams['trade_type'] = "APP";
//签名 TODO
$sign = $reqHandler->createMd5Sign($packetParams);
$packetParams['sign'] = $sign;
$time_stamp = strval(time());
//获取prepayid
$prepayid = $reqHandler->sendPrepay($packetParams);
if ($prepayid != null) {
$pack = 'Sign=WXPay';
//输出参数列表
$prePayParams = array();
$prePayParams['appid'] = $APP_ID;
$prePayParams['partnerid'] = $PARTNER;
$prePayParams['prepayid'] = $prepayid;
$prePayParams['package'] = $pack;
$prePayParams['noncestr'] = $nonce_str;
$prePayParams['timestamp'] = $time_stamp;
//生成签名