This guide works with Jobster v4.0.0 and above. For Jobster v3.9.4 and below, please check Payment Gateways API v1.
Download and extract the sample gateway: wpjobster-sample-gateway-v2.2.zip
Open “wpjobster-sample-gateway.php” with your favorite code editor, then search and replace “sample” and “Sample” (both case sensitive) with your gateway name (lowercase and normal case, respectively). Rename the file and plugin folder too.
‘sample’ => ‘mygateway’
‘Sample’ => ‘MyGateway’
The sample gateway consists in three main parts:
- Construct functions
- add_gateways( $methods )
- Checkout functions
- taketogateway_function( $payment_type, $common_details )
- get_gateway_currency( $currency )
- Processing functions
- processgateway_function( $payment_type, $details )
Normally you should be able to create your gateway only by adding your code in those functions from above, leaving all the rest of the code untouched.
Below we’ll take and explain one by one all of the functions that you may need to touch.