Wap.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. * 手机WAP网站支付支持
  19. * Class Wap
  20. * @package AliPay
  21. */
  22. class Wap extends BasicAliPay
  23. {
  24. /**
  25. * Wap constructor.
  26. * @param array $options
  27. */
  28. public function __construct(array $options)
  29. {
  30. parent::__construct($options);
  31. $this->options->set('method', 'alipay.trade.wap.pay');
  32. $this->params->set('product_code', 'QUICK_WAP_WAY');
  33. }
  34. /**
  35. * 创建数据操作
  36. * @param array $options
  37. * @return string
  38. */
  39. public function apply($options)
  40. {
  41. parent::applyData($options);
  42. return $this->buildPayHtml();
  43. }
  44. }