PayTest.php 700 B

12345678910111213141516171819202122232425262728
  1. <?php /*
  2. * Copyright (C) 2017 All rights reserved.
  3. *
  4. * @File PayTest.php
  5. * @Brief
  6. * @Author abelzhu, abelzhu@tencent.com
  7. * @Version 1.0
  8. * @Date 2017-12-26
  9. *
  10. */
  11. include_once("../src/CorpAPI.class.php");
  12. include_once("../src/ServiceCorpAPI.class.php");
  13. include_once("../src/ServiceProviderAPI.class.php");
  14. //
  15. $config = require('./config.php');
  16. //
  17. $agentId = $config['APP_ID'];
  18. $api = new CorpAPI($config['CORP_ID'], $config['APP_SECRET']);
  19. try {
  20. $SendWorkWxRedpackReq = new SendWorkWxRedpackReq();
  21. {
  22. $SendWorkWxRedpackReq->nonce_str = "nonce_str";
  23. }
  24. $api->SendWorkWxRedpack($SendWorkWxRedpackReq);
  25. } catch (Exception $e) {
  26. echo $e->getMessage() . "\n";
  27. }