Difference between revisions of "Developers - Payment Classes"

From Zen Cart(tm) Wiki
Jump to: navigation, search
(remove Method)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Template:menuBarDevelopers}}
 
{{Template:menuBarDevelopers}}
{{Template:TOCFloatRight}}
 
 
== Introduction ==
 
== Introduction ==
 +
''Payment'' modules consists of two files.
 +
 +
 +
The payment class is stored in
 +
:''includes/modules/payment/<module name>.php''
 +
 +
 +
while all text is stored in the appropriate language file
 +
:''includes/languages/<current language>/modules/payment/<module name>.php''
 +
 +
 
== Payment Class ==
 
== Payment Class ==
 +
 +
 
== Anatomy of a Payment Module ==
 
== Anatomy of a Payment Module ==
 
=== Class Names ===
 
=== Class Names ===
 
=== Constructor Method ===
 
=== Constructor Method ===
 +
Class constructor -> initialize class variables. Sets the class code, description, and status.
 +
 
=== update_status Method ===
 
=== update_status Method ===
 
=== javascript_validation Method ===
 
=== javascript_validation Method ===
 +
Check the user input submitted on checkout_payment.php with javascript (client-side).
 +
 +
'''''Examples''''': validate credit card number, make sure required fields are filled in
 +
 
=== selection Method ===
 
=== selection Method ===
 
=== pre_confirmation_check Method ===
 
=== pre_confirmation_check Method ===
 +
Pre confirmation checks (ie, check if credit card information is right before sending the info to the payment server
 +
 
=== confirmation Method ===
 
=== confirmation Method ===
 +
Functions to execute before displaying the checkout confirmation page
 +
 
=== process_button Method ===
 
=== process_button Method ===
 +
Functions to execute before finishing the form
 +
 +
'''Examples''': add extra hidden fields to the form
 +
 
=== before_process Method ===
 
=== before_process Method ===
 
=== after_process Method ===
 
=== after_process Method ===
 
=== after_order_create Method ===
 
=== after_order_create Method ===
 
=== get_error Method ===
 
=== get_error Method ===
 +
If an error occurs with the process, output error messages here
 +
 
=== check Method ===
 
=== check Method ===
 +
Check if module is installed (Administration Tool)
 +
 
=== install Method ===
 
=== install Method ===
 +
Install the module (Administration Tool)
 +
 
=== remove Method ===
 
=== remove Method ===
 +
Remove the module (Administration Tool)
 +
 
=== keys Method ===
 
=== keys Method ===
 +
 +
 
== Tips & Tricks ==
 
== Tips & Tricks ==
 +
 +
 
== Trouble Shooting ==
 
== Trouble Shooting ==

Latest revision as of 21:17, 11 December 2006

Introduction

Payment modules consists of two files.


The payment class is stored in

includes/modules/payment/<module name>.php


while all text is stored in the appropriate language file

includes/languages/<current language>/modules/payment/<module name>.php


Payment Class

Anatomy of a Payment Module

Class Names

Constructor Method

Class constructor -> initialize class variables. Sets the class code, description, and status.

update_status Method

javascript_validation Method

Check the user input submitted on checkout_payment.php with javascript (client-side).

Examples: validate credit card number, make sure required fields are filled in

selection Method

pre_confirmation_check Method

Pre confirmation checks (ie, check if credit card information is right before sending the info to the payment server

confirmation Method

Functions to execute before displaying the checkout confirmation page

process_button Method

Functions to execute before finishing the form

Examples: add extra hidden fields to the form

before_process Method

after_process Method

after_order_create Method

get_error Method

If an error occurs with the process, output error messages here

check Method

Check if module is installed (Administration Tool)

install Method

Install the module (Administration Tool)

remove Method

Remove the module (Administration Tool)

keys Method

Tips & Tricks

Trouble Shooting