WeChat template message

 

POST request

https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN

IT Industry Order Payment Success Template ID: PZUlx0thAMs_jyL2b0-FsF9iffxyqhqPdQiiDznNVmc

    $tmpMsg ['touser'] = 'oFOOH1Ze8CuqEIsvc2r72nfeP1lU' ;
     $tmpMsg ['template_id'] = 'PZUlx0thAMs_jyL2b0-FsF9iffxyqhqPdQiiDznNVmc' ;
     $tmpMsg ['url'] = $url ;
     $tmpMsg ['topcolor'] = " #
     $tmpMsg ['data']['first']['value'] = "We have received your payment and are ready to serve you1" ;
     $tmpMsg ['data']['orderMoneySum']['value' ] = "100" ;
     $tmpMsg ['data']['orderProductName']['value'] = "We have received your payment and are ready to serve you 2" ;
     $tmpMsg ['data']['Remark ']['value'] = "We have received your payment and are ready to serve you 3" ;
     $tmpUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=".getAccessToken();
    https_request($tmpUrl,json_encode($tmpMsg));

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324705231&siteId=291194637