test.php 430 B

1234567891011121314
  1. <?php
  2. $ch = curl_init('https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers');
  3. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  4. curl_setopt($ch, CURLOPT_CAINFO, '/etc/ssl/certs/ca-bundle.crt');
  5. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
  6. $response = curl_exec($ch);
  7. if ($response === false) {
  8. echo 'cURL Error: ' . curl_error($ch);
  9. } else {
  10. echo "Success!\n";
  11. var_dump($response);
  12. }
  13. curl_close($ch);