WapPayPlugin.php 814 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. declare(strict_types=1);
  3. namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
  4. use Yansongda\Pay\Direction\ResponseDirection;
  5. use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
  6. use Yansongda\Pay\Rocket;
  7. /**
  8. * @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=754&apiservId=448&version=V2.2&bussType=0
  9. */
  10. class WapPayPlugin extends GeneralPlugin
  11. {
  12. protected function getUri(Rocket $rocket): string
  13. {
  14. return 'gateway/api/frontTransReq.do';
  15. }
  16. protected function doSomething(Rocket $rocket): void
  17. {
  18. $rocket->setDirection(ResponseDirection::class)
  19. ->mergePayload([
  20. 'bizType' => '000201',
  21. 'txnType' => '01',
  22. 'txnSubType' => '01',
  23. 'channelType' => '08',
  24. ])
  25. ;
  26. }
  27. }