gateway-failed-event.php
58 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Actions\Events\Gateway_Failed; |
| 5 | |
| 6 | |
| 7 | use Jet_Form_Builder\Actions\Events\Base_Executor; |
| 8 | use Jet_Form_Builder\Actions\Events\Base_Gateway_Event; |
| 9 | use Jet_Form_Builder\Actions\Events\Default_Process\Default_Process_Executor; |
| 10 | |
| 11 | class Gateway_Failed_Event extends Base_Gateway_Event { |
| 12 | |
| 13 | public function get_id(): string { |
| 14 | return 'GATEWAY.FAILED'; |
| 15 | } |
| 16 | |
| 17 | public function get_label(): string { |
| 18 | return __( 'When canceling the passage of the gateway', 'jet-form-builder' ); |
| 19 | } |
| 20 | |
| 21 | public function get_help(): string { |
| 22 | return __( |
| 23 | 'replaces the old "On failed payment" option for selecting post-submit actions. |
| 24 | The event is executed when the user returns from the payment system\'s checkout page |
| 25 | without making a payment or subscribing;', |
| 26 | 'jet-form-builder' |
| 27 | ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @return Base_Executor[] |
| 32 | */ |
| 33 | public function executors(): array { |
| 34 | return array( |
| 35 | new Gateway_Failed_Executor(), |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | public function ignored_executors(): array { |
| 40 | return array( |
| 41 | Default_Process_Executor::class, |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * @return string |
| 47 | */ |
| 48 | public function get_gateway(): string { |
| 49 | return ''; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * @return string |
| 54 | */ |
| 55 | public function get_scenario(): string { |
| 56 | return ''; |
| 57 | } |
| 58 | } |