| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
class FrmTransLitePayment extends FrmTransLiteDb { |
| 7 |
|
| 8 |
public $table_name = 'frm_payments'; |
| 9 |
public $singular = 'payment'; |
| 10 |
|
| 11 |
/** |
| 12 |
* @return array |
| 13 |
*/ |
| 14 |
public function get_defaults() { |
| 15 |
$values = array( |
| 16 |
'receipt_id' => array( |
| 17 |
'sanitize' => 'sanitize_text_field', |
| 18 |
'default' => '', |
| 19 |
), |
| 20 |
'invoice_id' => array( |
| 21 |
'sanitize' => 'sanitize_text_field', |
| 22 |
'default' => '', |
| 23 |
), |
| 24 |
'sub_id' => array( |
| 25 |
'sanitize' => 'sanitize_text_field', |
| 26 |
'default' => '', |
| 27 |
), |
| 28 |
'item_id' => array( |
| 29 |
'sanitize' => 'absint', |
| 30 |
'default' => '', |
| 31 |
), |
| 32 |
'amount' => array( |
| 33 |
'sanitize' => 'float', |
| 34 |
'default' => '', |
| 35 |
), |
| 36 |
'status' => array( |
| 37 |
'sanitize' => 'sanitize_text_field', |
| 38 |
'default' => 'pending', |
| 39 |
), |
| 40 |
'action_id' => array( |
| 41 |
'sanitize' => 'absint', |
| 42 |
'default' => 0, |
| 43 |
), |
| 44 |
'paysys' => array( |
| 45 |
'sanitize' => 'sanitize_text_field', |
| 46 |
'default' => 'manual', |
| 47 |
), |
| 48 |
'created_at' => array( |
| 49 |
'sanitize' => 'sanitize_text_field', |
| 50 |
'default' => current_time( 'mysql', 1 ), |
| 51 |
), |
| 52 |
'begin_date' => array( |
| 53 |
'sanitize' => 'sanitize_text_field', |
| 54 |
'default' => current_time( 'mysql', 1 ), |
| 55 |
), |
| 56 |
'expire_date' => array( |
| 57 |
'sanitize' => 'sanitize_text_field', |
| 58 |
'default' => '0000-00-00', |
| 59 |
), |
| 60 |
'meta_value' => array( |
| 61 |
'sanitize' => 'maybe_serialize', |
| 62 |
'default' => '', |
| 63 |
), |
| 64 |
); |
| 65 |
return $values; |
| 66 |
} |
| 67 |
} |
| 68 |
|