Class WPBooking_SubmitForm_Gateway là cổng thanh toán Offline . Được kế thừa từ class WPBooking_Abstract_Payment_Gateway để phục vụ cho thanh toán booking. Dưới dây là action và filter mà class sử dụng ! Thêm options Submit Form trong Setting Gateways: $this->settings=array(...); Thêm mô tả cho cổng thanh toán trong trang checkout: add_action('wpbooking_gateway_desc_'.$this->gateway_id,array($this,'_show_bank_account')); Add Setting Submit Form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
$this->gateway_info=array( 'label'=>__("Submit Form",'wpbooking') ); $this->settings=array( array( 'id' => 'enable', 'label' => __('Enable', 'wpbooking'), 'type' => 'checkbox', 'std' => '', 'checkbox_label'=>__("Yes, I want to enable Submit Form",'wpbooking') ), array( 'id' => 'title', 'label' => __('Title', 'wpbooking'), 'type' => 'text', 'std' => 'Submit Form', ), array( 'id' => 'desc', 'label' => __('Descriptions', 'wpbooking'), 'type' => 'textarea', ), array( 'id' => 'bank_account', 'label' => __('Bank Account', 'wpbooking'), 'type' => 'textarea', 'description'=>__("Write down your back account here",'wpbooking') ), ); |
Function _show_bank_account() – Hiển […]