|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Magium\Magento\Actions\Admin\Configuration\PaymentMethods; |
|
4
|
|
|
|
|
5
|
|
|
|
|
6
|
|
|
class SavedCC extends AbstractPaymentMethod |
|
7
|
|
|
{ |
|
8
|
|
|
const NAME = 'Saved CC'; |
|
9
|
|
|
const ACTION = 'Admin\Configuration\PaymentMethods\SavedCC'; |
|
10
|
|
|
|
|
11
|
|
|
protected $section = 'Payment Methods/' . self::NAME; |
|
12
|
|
|
|
|
13
|
|
|
protected $settings = [ |
|
14
|
|
|
'payment_ccsave_active' => 0, |
|
15
|
|
|
'payment_ccsave_title' => 'Credit Card (saved)', |
|
16
|
|
|
'payment_ccsave_order_status' => null, |
|
17
|
|
|
'payment_ccsave_cctypes' => null, |
|
18
|
|
|
'payment_ccsave_useccv' => null, |
|
19
|
|
|
'payment_ccsave_centinel' => null, |
|
20
|
|
|
'payment_ccsave_allowspecific' => null, |
|
21
|
|
|
'payment_ccsave_specificcountry' => null, |
|
22
|
|
|
'payment_ccsave_min_order_total' => null, |
|
23
|
|
|
'payment_ccsave_max_order_total' => null, |
|
24
|
|
|
'payment_ccsave_sort_order' => null |
|
25
|
|
|
]; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @param string $enabled |
|
29
|
|
|
*/ |
|
30
|
|
|
public function setEnabled($enabled) |
|
31
|
|
|
{ |
|
32
|
|
|
$this->settings['payment_ccsave_active'] = $enabled; |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @param string $title |
|
37
|
|
|
*/ |
|
38
|
|
|
public function setTitle($title) |
|
39
|
|
|
{ |
|
40
|
|
|
$this->settings['payment_ccsave_title'] = $title; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @param string $order_status |
|
45
|
|
|
*/ |
|
46
|
|
|
public function setOrderStatus($order_status) |
|
47
|
|
|
{ |
|
48
|
|
|
$this->settings['payment_ccsave_order_status'] = $order_status; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function setCreditCardTypes($types) { |
|
52
|
|
|
$this->settings['payment_ccsave_cctypes'] = $types; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
public function setRequestCardSecurityCode($request) |
|
56
|
|
|
{ |
|
57
|
|
|
$this->settings['payment_ccsave_useccv'] = $request; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function set3DSecureCardValidation($use) |
|
61
|
|
|
{ |
|
62
|
|
|
$this->settings['payment_ccsave_centinel'] = $use; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
public function setPaymentfromApplicableCountries($countriesSetting) |
|
66
|
|
|
{ |
|
67
|
|
|
$this->settings['payment_ccsave_allowspecific'] = $countriesSetting; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
public function setSpecificCountry($countries) |
|
71
|
|
|
{ |
|
72
|
|
|
$this->settings['payment_ccsave_specificcountry'] = $countries; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function setMinOrderTotal($total) |
|
76
|
|
|
{ |
|
77
|
|
|
$this->settings['payment_ccsave_min_order_total'] = $total; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
public function setMaxOrderTotal($total) |
|
81
|
|
|
{ |
|
82
|
|
|
$this->settings['payment_ccsave_max_order_total'] = $total; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
public function setSortOrder($sortOrder) |
|
86
|
|
|
{ |
|
87
|
|
|
$this->settings['payment_ccsave_sort_order'] = $sortOrder; |
|
88
|
|
|
} |
|
89
|
|
|
|
|
90
|
|
|
|
|
91
|
|
|
} |