Skip to content

Commit 3efdee4

Browse files
committed
updates
1 parent 0fc027d commit 3efdee4

File tree

8 files changed

+185
-148
lines changed

8 files changed

+185
-148
lines changed

content/dev/moduleSupport/payment/_index.md

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ layout: docs
99
The documentation in this section is Work in progress and relates to features that might not be available yet.
1010
{{% /alert %}}
1111

12-
# Introduction
13-
1412
A payment module class should use this basic skeleton.
1513

1614
e.g.
@@ -41,78 +39,6 @@ class moneyorder extends PaymentBase implements PaymentContract
4139

4240
the define built would be `MODULE_PAYMENT_MONEYORDER_STATUS`
4341

44-
As with other module types you can define a `addCustomConfigurationKeys` along with `checkNonFatalConfigureStatus` and `checFatalConfigureStatus`
42+
As with other module types you can define a `addCustomConfigurationKeys` along with `checkNonFatalConfigureStatus` and `checkFatalConfigureStatus`
4543

4644
where necessary.
47-
48-
## Configuration settings
49-
50-
The default configuration settings for a payment module are :-
51-
52-
``` php
53-
protected function setCommonConfigurationKeys(): array
54-
{
55-
$configKeys = [];
56-
$key = $this->buildDefine('STATUS');
57-
$configKeys[$key] = [
58-
'configuration_value' => 'False',
59-
'configuration_title' => 'Enable this module',
60-
'configuration_description' => 'Do you want to accept payments using this module',
61-
'configuration_group_id' => 6,
62-
'sort_order' => 1,
63-
'set_function' => "zen_cfg_select_option(array('True', 'False'), ",
64-
];
65-
$key = $this->buildDefine('SORT_ORDER');
66-
$configKeys[$key] = [
67-
'configuration_value' => 0,
68-
'configuration_title' => 'Sort order of display.',
69-
'configuration_description' => 'Sort order of display. Lowest is displayed first.',
70-
'configuration_group_id' => 6,
71-
'sort_order' => 1,
72-
];
73-
$key = $this->buildDefine('ZONE');
74-
$configKeys[$key] = [
75-
'configuration_value' => 0,
76-
'configuration_title' => 'Payment Zone',
77-
'configuration_description' => 'If a zone is selected, only enable this payment method for that zone.',
78-
'configuration_group_id' => 6,
79-
'sort_order' => 1,
80-
'set_function' => "zen_cfg_pull_down_zone_classes(",
81-
];
82-
$key = $this->buildDefine('DEBUG_MODE');
83-
$configKeys[$key] = [
84-
'configuration_value' => '--none--',
85-
'configuration_title' => 'Use debug mode',
86-
'configuration_description' => 'Debug Mode adds extra logging to file, email and console output',
87-
'configuration_group_id' => 6,
88-
'sort_order' => 1,
89-
'set_function' => "zen_cfg_select_multioption(array('File', 'Email', 'BrowserConsole'), ",
90-
];
91-
return $configKeys;
92-
}
93-
```
94-
95-
Payment modules can define a number of methods to interact with the checkout/order flow.
96-
97-
## update_status
98-
99-
## javascript_validation
100-
101-
## selection
102-
103-
## pre_confirmation_check
104-
105-
## confirmation
106-
107-
## process_button
108-
109-
## clear_payments
110-
111-
## before_process
112-
113-
## after_order_create
114-
115-
## after_process
116-
117-
## admin_notification
118-

content/dev/moduleSupport/payment/classMethods/_index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,29 @@ layout: docs
88
{{% alert title="Warning" color="warning" %}}
99
The documentation in this section is Work in progress and relates to features that might not be available yet.
1010
{{% /alert %}}
11+
12+
13+
Payment modules can define a number of methods to interact with the checkout/order flow.
14+
15+
## update_status
16+
17+
## javascript_validation
18+
19+
## selection
20+
21+
## pre_confirmation_check
22+
23+
## confirmation
24+
25+
## process_button
26+
27+
## clear_payments
28+
29+
## before_process
30+
31+
## after_order_create
32+
33+
## after_process
34+
35+
## admin_notification
36+

content/dev/moduleSupport/payment/classVariables/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ layout: docs
88
{{% alert title="Warning" color="warning" %}}
99
The documentation in this section is Work in progress and relates to features that might not be available yet.
1010
{{% /alert %}}
11+
12+
13+
As well as the class variables defined by the base modules, payment modules also define the following class variables.
14+
15+
## public int $order_status
16+
## public string $email_footer = ""

content/dev/moduleSupport/payment/configurationSettings/_index.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,48 @@ layout: docs
88
{{% alert title="Warning" color="warning" %}}
99
The documentation in this section is Work in progress and relates to features that might not be available yet.
1010
{{% /alert %}}
11+
12+
The default configuration settings for a payment module are :-
13+
14+
``` php
15+
protected function setCommonConfigurationKeys(): array
16+
{
17+
$configKeys = [];
18+
$key = $this->buildDefine('STATUS');
19+
$configKeys[$key] = [
20+
'configuration_value' => 'False',
21+
'configuration_title' => 'Enable this module',
22+
'configuration_description' => 'Do you want to accept payments using this module',
23+
'configuration_group_id' => 6,
24+
'sort_order' => 1,
25+
'set_function' => "zen_cfg_select_option(array('True', 'False'), ",
26+
];
27+
$key = $this->buildDefine('SORT_ORDER');
28+
$configKeys[$key] = [
29+
'configuration_value' => 0,
30+
'configuration_title' => 'Sort order of display.',
31+
'configuration_description' => 'Sort order of display. Lowest is displayed first.',
32+
'configuration_group_id' => 6,
33+
'sort_order' => 1,
34+
];
35+
$key = $this->buildDefine('ZONE');
36+
$configKeys[$key] = [
37+
'configuration_value' => 0,
38+
'configuration_title' => 'Payment Zone',
39+
'configuration_description' => 'If a zone is selected, only enable this payment method for that zone.',
40+
'configuration_group_id' => 6,
41+
'sort_order' => 1,
42+
'set_function' => "zen_cfg_pull_down_zone_classes(",
43+
];
44+
$key = $this->buildDefine('DEBUG_MODE');
45+
$configKeys[$key] = [
46+
'configuration_value' => '--none--',
47+
'configuration_title' => 'Use debug mode',
48+
'configuration_description' => 'Debug Mode adds extra logging to file, email and console output',
49+
'configuration_group_id' => 6,
50+
'sort_order' => 1,
51+
'set_function' => "zen_cfg_select_multioption(array('File', 'Email', 'BrowserConsole'), ",
52+
];
53+
return $configKeys;
54+
}
55+
```

content/dev/moduleSupport/shipping/_index.md

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -42,79 +42,7 @@ class flat extends ShippingBase implements ShippingContract
4242

4343
the define built would be `MODULE_SHIPPING_FLAT_STATUS`
4444

45-
As with other module types you can define a `addCustomConfigurationKeys` method along with `checkNonFatalConfigureStatus` and `checFatalConfigureStatus`
45+
As with other module types you can define a `addCustomConfigurationKeys` method along with `checkNonFatalConfigureStatus` and `checkFatalConfigureStatus`
4646

4747
methods where necessary.
4848

49-
## Configuration settings
50-
51-
The default configuration settings for a shipping module are :-
52-
53-
``` php
54-
protected function setCommonConfigurationKeys(): array
55-
{
56-
$configKeys = [];
57-
$key = $this->buildDefine('STATUS');
58-
$configKeys[$key] = [
59-
'configuration_value' => 'False',
60-
'configuration_title' => 'Enable this module',
61-
'configuration_description' => 'Do you want to accept payments using this module',
62-
'configuration_group_id' => 6,
63-
'sort_order' => 1,
64-
'set_function' => "zen_cfg_select_option(array('True', 'False'), ",
65-
];
66-
$key = $this->buildDefine('SORT_ORDER');
67-
$configKeys[$key] = [
68-
'configuration_value' => 0,
69-
'configuration_title' => 'Sort order of display.',
70-
'configuration_description' => 'Sort order of display. Lowest is displayed first.',
71-
'configuration_group_id' => 6,
72-
'sort_order' => 1,
73-
];
74-
$key = $this->buildDefine('TAX_CLASS');
75-
$configKeys[$key] = [
76-
'configuration_value' => 0,
77-
'configuration_title' => 'Tax Class',
78-
'configuration_description' => 'Use the following tax class on the shipping fee.',
79-
'configuration_group_id' => 6,
80-
'sort_order' => 1,
81-
'use_function' => 'zen_get_tax_class_title',
82-
'set_function' => "zen_cfg_pull_down_tax_classes(",
83-
];
84-
$key = $this->buildDefine('TAX_BASIS');
85-
$configKeys[$key] = [
86-
'configuration_value' => 'Shipping',
87-
'configuration_title' => 'Tax Basis',
88-
'configuration_description' => 'On what basis is Shipping Tax calculated. Options are<br>Shipping - Based on customers Shipping Address<br>Billing Based on customers Billing address<br>Store - Based on Store address if Billing/Shipping Zone equals Store zone',
89-
'configuration_group_id' => 6,
90-
'sort_order' => 1,
91-
'use_function' => 'zen_get_tax_class_title',
92-
'set_function' => 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ',
93-
];
94-
$key = $this->buildDefine('ZONE');
95-
$configKeys[$key] = [
96-
'configuration_value' => 0,
97-
'configuration_title' => 'Payment Zone',
98-
'configuration_description' => 'If a zone is selected, only enable this shipping method for that zone.',
99-
'configuration_group_id' => 6,
100-
'sort_order' => 1,
101-
'set_function' => "zen_cfg_pull_down_zone_classes(",
102-
];
103-
104-
$key = $this->buildDefine('DEBUG_MODE');
105-
$configKeys[$key] = [
106-
'configuration_value' => '--none--',
107-
'configuration_title' => 'Use debug mode',
108-
'configuration_description' => 'Debug Mode adds extra logging to file, email and console output',
109-
'configuration_group_id' => 6,
110-
'sort_order' => 1,
111-
'set_function' => "zen_cfg_select_multioption(array('File', 'Email', 'BrowserConsole'), ",
112-
];
113-
return $configKeys;
114-
}
115-
```
116-
117-
118-
Shipping modules only define one method to interact with the checkout/order flow.
119-
120-
## quote
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Class Methods
3+
description:
4+
weight: 140
5+
layout: docs
6+
---
7+
8+
{{% alert title="Warning" color="warning" %}}
9+
The documentation in this section is Work in progress and relates to features that might not be available yet.
10+
{{% /alert %}}
11+
12+
13+
## quotes
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Class Variables
3+
description:
4+
weight: 120
5+
layout: docs
6+
---
7+
8+
{{% alert title="Warning" color="warning" %}}
9+
The documentation in this section is Work in progress and relates to features that might not be available yet.
10+
{{% /alert %}}
11+
12+
13+
## public string $tax_class = ''
14+
## public string $tax_basis = ''
15+
## public $quotes
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Configuraton Settings
3+
description:
4+
weight: 100
5+
layout: docs
6+
---
7+
8+
{{% alert title="Warning" color="warning" %}}
9+
The documentation in this section is Work in progress and relates to features that might not be available yet.
10+
{{% /alert %}}
11+
12+
## Configuration settings
13+
14+
The default configuration settings for a shipping module are :-
15+
16+
``` php
17+
protected function setCommonConfigurationKeys(): array
18+
{
19+
$configKeys = [];
20+
$key = $this->buildDefine('STATUS');
21+
$configKeys[$key] = [
22+
'configuration_value' => 'False',
23+
'configuration_title' => 'Enable this module',
24+
'configuration_description' => 'Do you want to accept payments using this module',
25+
'configuration_group_id' => 6,
26+
'sort_order' => 1,
27+
'set_function' => "zen_cfg_select_option(array('True', 'False'), ",
28+
];
29+
$key = $this->buildDefine('SORT_ORDER');
30+
$configKeys[$key] = [
31+
'configuration_value' => 0,
32+
'configuration_title' => 'Sort order of display.',
33+
'configuration_description' => 'Sort order of display. Lowest is displayed first.',
34+
'configuration_group_id' => 6,
35+
'sort_order' => 1,
36+
];
37+
$key = $this->buildDefine('TAX_CLASS');
38+
$configKeys[$key] = [
39+
'configuration_value' => 0,
40+
'configuration_title' => 'Tax Class',
41+
'configuration_description' => 'Use the following tax class on the shipping fee.',
42+
'configuration_group_id' => 6,
43+
'sort_order' => 1,
44+
'use_function' => 'zen_get_tax_class_title',
45+
'set_function' => "zen_cfg_pull_down_tax_classes(",
46+
];
47+
$key = $this->buildDefine('TAX_BASIS');
48+
$configKeys[$key] = [
49+
'configuration_value' => 'Shipping',
50+
'configuration_title' => 'Tax Basis',
51+
'configuration_description' => 'On what basis is Shipping Tax calculated. Options are<br>Shipping - Based on customers Shipping Address<br>Billing Based on customers Billing address<br>Store - Based on Store address if Billing/Shipping Zone equals Store zone',
52+
'configuration_group_id' => 6,
53+
'sort_order' => 1,
54+
'use_function' => 'zen_get_tax_class_title',
55+
'set_function' => 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ',
56+
];
57+
$key = $this->buildDefine('ZONE');
58+
$configKeys[$key] = [
59+
'configuration_value' => 0,
60+
'configuration_title' => 'Payment Zone',
61+
'configuration_description' => 'If a zone is selected, only enable this shipping method for that zone.',
62+
'configuration_group_id' => 6,
63+
'sort_order' => 1,
64+
'set_function' => "zen_cfg_pull_down_zone_classes(",
65+
];
66+
67+
$key = $this->buildDefine('DEBUG_MODE');
68+
$configKeys[$key] = [
69+
'configuration_value' => '--none--',
70+
'configuration_title' => 'Use debug mode',
71+
'configuration_description' => 'Debug Mode adds extra logging to file, email and console output',
72+
'configuration_group_id' => 6,
73+
'sort_order' => 1,
74+
'set_function' => "zen_cfg_select_multioption(array('File', 'Email', 'BrowserConsole'), ",
75+
];
76+
return $configKeys;
77+
}
78+
```

0 commit comments

Comments
 (0)