PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 2.0.4
JetFormBuilder — Dynamic Blocks Form Builder v2.0.4
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / gateways / table-views / payments.php
jetformbuilder / includes / gateways / table-views Last commit date
actions 4 years ago columns 4 years ago payments.php 4 years ago
payments.php
73 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Gateways\Table_Views;
5
6 use Jet_Form_Builder\Admin\Table_Views\Columns\Record_Id_Column_Advanced;
7 use Jet_Form_Builder\Admin\Table_Views\View_Advanced_Base;
8 use Jet_Form_Builder\Exceptions\Query_Builder_Exception;
9 use Jet_Form_Builder\Gateways\Db_Models\Payment_To_Payer_Shipping_Model;
10 use Jet_Form_Builder\Gateways\Db_Models\Payment_To_Record;
11 use Jet_Form_Builder\Gateways\Query_Views\Payment_Count_View;
12 use Jet_Form_Builder\Gateways\Query_Views\Payment_View;
13 use Jet_Form_Builder\Gateways\Paypal\Rest_Endpoints;
14 use Jet_Form_Builder\Admin\Table_Views\Columns\Created_At_Column;
15 use Jet_Form_Builder\Gateways\Rest_Api\Receive_Payments;
16 use Jet_Form_Builder\Gateways\Table_Views\Columns\Gross_Column;
17 use Jet_Form_Builder\Gateways\Table_Views\Columns\Header_Actions_Column;
18 use Jet_Form_Builder\Gateways\Table_Views\Columns\Payer_Column;
19 use Jet_Form_Builder\Gateways\Table_Views\Columns\Payment_Status_Column;
20 use Jet_Form_Builder\Gateways\Table_Views\Columns\Payment_Type_Column;
21 use Jet_Form_Builder\Gateways\Table_Views\Columns\Row_Actions_Column;
22 use Jet_Form_Builder\Gateways\Table_Views\Columns\Transaction_Column;
23
24 class Payments extends View_Advanced_Base {
25
26 public function get_raw_list( array $args ): array {
27 try {
28 return ( new Payment_View() )
29 ->set_table_args( $args )
30 ->query()
31 ->query_all();
32 } catch ( Query_Builder_Exception $exception ) {
33 return array();
34 }
35 }
36
37 public function get_dependencies(): array {
38 return array(
39 new Payment_To_Payer_Shipping_Model(),
40 new Payment_To_Record(),
41 );
42 }
43
44 public function get_rest_url(): string {
45 return Receive_Payments::rest_url();
46 }
47
48 public function get_rest_methods(): string {
49 return Receive_Payments::get_methods();
50 }
51
52 public function get_total(): int {
53 return Payment_Count_View::count();
54 }
55
56 public function get_empty_message(): string {
57 return __( 'No payments found.', 'jet-form-builder' );
58 }
59
60 public function get_columns(): array {
61 return array(
62 'type' => new Payment_Type_Column(),
63 'date' => new Created_At_Column(),
64 'payment_status' => new Payment_Status_Column(),
65 'gross' => new Gross_Column(),
66 'payer' => new Payer_Column(),
67 'id' => new Record_Id_Column_Advanced(),
68 );
69 }
70
71 }
72
73