Paypal offline payment module, attached. Functions of the paypal offline payment module: 1. the Paypal offline payment option is provided, prompting the customer to enter a paypal email account, so that the customer can contact customer 2 after the order is submitted. after the order is submitted successfully, the paypal offline payment module is automatically sent.
Function:
1. the Paypal offline payment option is provided, prompting the customer to enter the paypal email account so that they can contact the customer after submitting the order.
2. after the order is submitted successfully, an email (including the paypal account) is automatically sent to the customer, prompting the customer to operate according to the email.
3. Custom Development of Paypal and background functions
This module modifies the Paypal offline payment module based on the Western Union remittance mail sending function. The local test function is complete. if you have any questions, please contact us.
The installation code is as follows:
[Php]
Class ppoffline {
Var $ code, $ title, $ description, $ enabled;
// Class constructor
Function ppoffline (){
Global $ order;
$ This-> code = 'ppoffline ';
$ This-> title = MODULE_PAYMENT_PPOFFLINE_TEXT_TITLE;
$ This-> description = MODULE_PAYMENT_PPOFFLINE_TEXT_DESCRIPTION;
$ This-> sort_order = MODULE_PAYMENT_PPOFFLINE_SORT_ORDER;
$ This-> enabled = (MODULE_PAYMENT_PPOFFLINE_STATUS = 'true ')? True: false );
If (int) MODULE_PAYMENT_PPOFFLINE_ORDER_STATUS_ID> 0 ){
$ This-> order_status = MODULE_PAYMENT_PPOFFLINE_ORDER_STATUS_ID;
}
If (is_object ($ order) $ this-> update_status ();
$ This-> email_footer ='
Our Paypal Email Account: '. MODULE_PAYMENT_PPOFFLINE_PAYPAL_EMAIL .', '; // Send an email notification to the paypal receiving account
$ This-> email_footer. = MODULE_PAYMENT_PPOFFLINE_TEXT_EMAIL_FOOTER;
}
// Class methods
Function update_status (){
Global $ order, $ db;
If ($ this-> enabled = true) & (int) MODULE_PAYMENT_PPOFFLINE_ZONE> 0 )){
$ Check_flag = false;
$ Check = $ db-> Execute ("select zone_id from ". TABLE_ZONES_TO_GEO_ZONES. "where geo_zone_id = '". MODULE_PAYMENT_PPOFFLINE_ZONE. "'and zone_country_id = '". $ order-> billing ['country'] ['id']. "'Order by zone_id ");
While (! $ Check-> EOF ){
If ($ check-> fields ['zone _ id'] <1 ){
$ Check_flag = true;
Break;
} Elseif ($ check-> fields ['zone _ id'] ==$ order-> billing ['zone _ id']) {
$ Check_flag = true;
Break;
}
$ Check-> MoveNext ();
}
If ($ check_flag = false ){
$ This-> enabled = false;
}
}
}
Function compute cript_validation (){
Return false;
}
Function selection (){
Return array ('id' => $ this-> code,
'Module' => MODULE_PAYMENT_PPOFFLINE_TEXT_CATALOG_LOGO,
'Icon '=> MODULE_PAYMENT_PPOFFLINE_TEXT_CATALOG_LOGO
);
}
Function pre_confirmation_check (){
Return false;
}
Function confirmation (){
Return array ('title' => MODULE_PAYMENT_PPOFFLINE_TEXT_DESCRIPTION );
}
Function process_button (){
Return false;
}
Function before_process (){
Return false;
}
Function after_process (){
Return false;
}
Function get_error (){
Return false;
}
Function check (){
Global $ db;
If (! Isset ($ this-> _ check )){
$ Check_query = $ db-> Execute ("select configuration_value from". TABLE_CONFIGURATION. "where configuration_key = 'Module _ PAYMENT_PPOFFLINE_STATUS '");
$ This-> _ check = $ check_query-> RecordCount ();
}
Return $ this-> _ check;
}
Function install (){
Global $ db, $ language;
If (! Defined ('Module _ PAYMENT_PPOFFLINE_PAYPAL_EMAIL ') include (dir_fs_catalog_ages. $ _ SESSION ['language']. '/modules/payment /'. $ this-> code. '. php ');
$ Db-> Execute ("insert ". TABLE_CONFIGURATION. "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_1_1. "', 'Module _ PAYMENT_PPOFFLINE_STATUS', 'true ','". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_1_2. "', '6', '1', 'Zen _ resource_select_option (array (\ 'True \', \ 'false \ '),', now ()); ");
$ Db-> Execute ("insert ". TABLE_CONFIGURATION. "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('". MODULE_PAYMENT_PPOFFLINE_PAYPAL_EMAIL. "', 'Module _ PAYMENT_PPOFFLINE_PAYPAL_EMAIL','', '', '6', '7', now ());");
$ Db-> Execute ("insert ". TABLE_CONFIGURATION. "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('". MODULE_PAYMENT_PPOFFLINE_RECEIVER_PHONE. "', 'Module _ PAYMENT_PPOFFLINE_RECEIVER_PHONE','', '', '6', '8', now ());");
$ Db-> Execute ("insert ". TABLE_CONFIGURATION. "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_2_1. "', 'Module _ PAYMENT_PPOFFLINE_SORT_ORDER', '0 ','". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_2_2. "', '6', '0', now ())");
$ Db-> Execute ("insert ". TABLE_CONFIGURATION. "(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_3_1. "', 'Module _ PAYMENT_PPOFFLINE_ORDER_STATUS_ID', '0 ','". MODULE_PAYMENT_PPOFFLINE_TEXT_CONFIG_3_2. "', '6', '0', 'Zen _ resource_pull_down_order_statuses (', 'Zen _ get_order_status_name ', now ())");
}
Function remove (){
Global $ db;
$ Db-> Execute ("delete from ". TABLE_CONFIGURATION. "where configuration_key in ('". implode ("','", $ this-> keys ()). "')");
}
Function keys (){
Return array ('Module _ PAYMENT_PPOFFLINE_STATUS ', 'Module _ PAYMENT_PPOFFLINE_PAYPAL_EMAIL', 'Module _ response', 'Module _ PAYMENT_PPOFFLINE_SORT_ORDER ', 'Module _ response ');
}
}
?>
Function:
1. background settings
2. payment method selection
3. email notification
Paypal offline payment
Http://www.BkJia.com/uploadfile/2012/0910/20120910025514326.rar
The plug-in cannot be installed using
23rd rows
Class ppoffline {
Change
Class paypaloffline {
27th rows
Function ppoffline (){
Change
Function paypaloffline (){
29th rows
$ This-> code = 'ppoffline ';
Modify
$ This-> code = 'paypaloffline ';
Renewal function: 1. the Paypal offline payment option is provided, prompting the customer to enter a paypal email account, so that the customer can be contacted 2 after the order is submitted. after the order is submitted successfully, it will be automatically sent...