Conditions | 3 |
Paths | 3 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function updateCMSFields(FieldList $fields) |
||
10 | { |
||
11 | if ($this->owner->IsSubmitted()) { |
||
12 | if (! $this->owner->IsPaid()) { |
||
13 | $fields->addFieldsToTab( |
||
14 | 'Root.Payments', |
||
15 | [ |
||
16 | HeaderField::create( |
||
17 | 'SkipToSecurityChecks', |
||
18 | 'Skip To Security Checks' |
||
19 | ), |
||
20 | CheckboxField::create( |
||
21 | 'SkipPayment', |
||
22 | 'Skip Payment' |
||
23 | )->setDescription( |
||
24 | 'Ticking this checkbox will add a fake "successful" payment to the order, this allows the order to proceed to the security checks step. |
||
25 | <br>Make sure to save the order after ticking this checkbox.' |
||
26 | ) |
||
27 | ] |
||
28 | ); |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 | |||
51 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.