TailongpayService.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace crmeb\services;
  3. class TailongpayService
  4. {
  5. protected static $RequestUrl = 'http://47.100.209.133:8080/preSfpPOST';
  6. public static function makeGrpQrcode($order_id, $pay_price, $attach, $body)
  7. {
  8. $data = [
  9. 'reqData' => [
  10. 'body' => [
  11. 'mechNo' => '8202302069000445',
  12. 'mechNm' => '台州市椒江宏根蒂酒业有限公司',
  13. 'channelCode' => 'CNHGDJY020401',
  14. 'inetNo' => $order_id,
  15. 'sndTmstmp' => date('YmdHis'),
  16. 'acctType' => '02',
  17. 'ccy' => '156',
  18. 'pdDsc' => $body,
  19. 'pymntAmt' => bcmul($pay_price, 100),
  20. 'addMsg' => $attach
  21. ],
  22. 'head' => [
  23. 'serviceId' => 'makeGrpQrcode',
  24. 'txSno' => 'd723b7bc39584788ba91548ce0d7db17'
  25. ]
  26. ]
  27. ];
  28. // $data = json_encode_tl($data);
  29. $res = do_request(self::$RequestUrl, $data, null, true, true, 256);
  30. var_dump($res);
  31. }
  32. }