Transfer.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | WeChatDeveloper
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2014~2023 ThinkAdmin [ thinkadmin.top ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: https://thinkadmin.top
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( https://mit-license.org )
  10. // | 免责声明 ( https://thinkadmin.top/disclaimer )
  11. // +----------------------------------------------------------------------
  12. // | gitee 代码仓库:https://gitee.com/zoujingli/WeChatDeveloper
  13. // | github 代码仓库:https://github.com/zoujingli/WeChatDeveloper
  14. // +----------------------------------------------------------------------
  15. namespace AliPay;
  16. use WeChat\Contracts\BasicAliPay;
  17. /**
  18. * 支付宝转账到账户
  19. * Class Transfer
  20. * @package AliPay
  21. */
  22. class Transfer extends BasicAliPay
  23. {
  24. /**
  25. * 旧版 向指定支付宝账户转账
  26. * @param array $options
  27. * @return array|bool
  28. * @throws \WeChat\Exceptions\InvalidResponseException
  29. * @throws \WeChat\Exceptions\LocalCacheException
  30. */
  31. public function apply($options)
  32. {
  33. $this->options->set('method', 'alipay.fund.trans.toaccount.transfer');
  34. return $this->getResult($options);
  35. }
  36. /**
  37. * 新版 向指定支付宝账户转账
  38. * @param array $options
  39. * @return array|bool
  40. * @throws \WeChat\Exceptions\InvalidResponseException
  41. * @throws \WeChat\Exceptions\LocalCacheException
  42. */
  43. public function create($options = [])
  44. {
  45. $this->options->set('method', 'alipay.fund.trans.uni.transfer');
  46. return $this->getResult($options);
  47. }
  48. /**
  49. * 新版 转账业务单据查询接口
  50. * @param array $options
  51. * @return array|bool
  52. * @throws \WeChat\Exceptions\InvalidResponseException
  53. * @throws \WeChat\Exceptions\LocalCacheException
  54. */
  55. public function queryResult($options = [])
  56. {
  57. $this->options->set('method', 'alipay.fund.trans.common.query');
  58. return $this->getResult($options);
  59. }
  60. /**
  61. * 新版 支付宝资金账户资产查询接口
  62. * @param array $options
  63. * @return array|bool
  64. * @throws \WeChat\Exceptions\InvalidResponseException
  65. * @throws \WeChat\Exceptions\LocalCacheException
  66. */
  67. public function queryAccount($options = [])
  68. {
  69. $this->options->set('method', 'alipay.fund.account.query');
  70. return $this->getResult($options);
  71. }
  72. }