test_crash.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace refill\event;
  3. class test_crash
  4. {
  5. use crash;
  6. protected const cache_name = 'card_crash';
  7. protected $mChannels = [];
  8. protected $mSuccInterval = 900;
  9. public function __construct()
  10. {
  11. }
  12. public function load($cfgs)
  13. {
  14. $channels = $cfgs['channels'] ?? '';
  15. $channels = explode(',',$channels);
  16. $this->mChannels = [];
  17. foreach ($channels as $item) {
  18. $this->mChannels[] = trim($item);
  19. }
  20. $this->mSuccInterval = intval($cfgs['succ_interval'] ?? 900);
  21. }
  22. public function testDelete($card_no)
  23. {
  24. $this->delete($card_no);
  25. }
  26. public function testCan_submit($card_no)
  27. {
  28. return $this->can_submit($card_no);
  29. }
  30. public function testSubmit($card_no, $oid)
  31. {
  32. $this->submit($card_no,$oid);
  33. }
  34. public function testCan_commit($card_no, $oid, $ch_name)
  35. {
  36. return $this->can_commit($card_no, $oid, $ch_name);
  37. }
  38. public function testCommit($card_no, $oid, $ch_name)
  39. {
  40. $this->commit($card_no, $oid, $ch_name);
  41. }
  42. public function testNotify($card_no, $oid, $ch_name,$succ)
  43. {
  44. $this->notify($card_no, $oid, $ch_name,$succ);
  45. }
  46. public function testComplete($card_no, $oid, $ch_name,$succ)
  47. {
  48. $this->complete($card_no, $oid, $ch_name,$succ);
  49. }
  50. }