1 | <?php |
||
3 | class EduSveaWebPayBaseConfig implements \Svea\WebPay\Config\ConfigurationProvider { |
||
4 | /** |
||
5 | * @var EDU_SveaWebPay |
||
6 | */ |
||
7 | public $plugin; |
||
8 | |||
9 | /** |
||
10 | * EduSveaWebPayProductionConfig constructor. |
||
11 | * |
||
12 | * @param EDU_SveaWebPay $_plugin |
||
13 | */ |
||
14 | public function __construct( $_plugin ) { |
||
17 | |||
18 | /** |
||
19 | * fetch username, used with invoice or payment plan (i.e. Svea WebService Europe API) |
||
20 | * |
||
21 | * @return string |
||
22 | * |
||
23 | * @param string $type Svea\WebPay\Config\ConfigurationProvider::INVOICE_TYPE, ::PAYMENTPLAN_TYPE can be used if needed to match different configuration settings |
||
24 | * @param string $country iso3166 alpha-2 CountryCode, eg. SE, NO, DK, FI, NL, DE can be used if needed to match different configuration settings |
||
25 | * |
||
26 | * @throws \Svea\WebPay\HostedService\Helper\InvalidTypeException in case of unsupported $type |
||
27 | * @throws \Svea\WebPay\HostedService\Helper\InvalidCountryException in case of unsupported $country |
||
28 | */ |
||
29 | public function getUsername( $type, $country ) { |
||
32 | |||
33 | /** |
||
34 | * fetch password, used with invoice or payment plan (i.e. Svea WebService Europe API) |
||
35 | * |
||
36 | * @return string |
||
37 | * |
||
38 | * @param string $type Svea\WebPay\Config\ConfigurationProvider::INVOICE_TYPE, ::PAYMENTPLAN_TYPE can be used if needed to match different configuration settings |
||
39 | * @param string $country iso3166 alpha-2 CountryCode, eg. SE, NO, DK, FI, NL, DE can be used if needed to match different configuration settings |
||
40 | * |
||
41 | * @throws \Svea\WebPay\HostedService\Helper\InvalidTypeException in case of unsupported $type |
||
42 | * @throws \Svea\WebPay\HostedService\Helper\InvalidCountryException in case of unsupported $country |
||
43 | */ |
||
44 | public function getPassword( $type, $country ) { |
||
47 | |||
48 | /** |
||
49 | * fetch client number, used with invoice or payment plan (i.e. Svea WebService Europe API) |
||
50 | * |
||
51 | * @return \Svea\WebPay\Config\ClientNumber |
||
52 | * |
||
53 | * @param string $type Svea\WebPay\Config\ConfigurationProvider::INVOICE_TYPE, ::PAYMENTPLAN_TYPE can be used if needed to match different configuration settings |
||
54 | * @param string $country iso3166 alpha-2 CountryCode, eg. SE, NO, DK, FI, NL, DE can be used if needed to match different configuration settings |
||
55 | * |
||
56 | * @throws \Svea\WebPay\HostedService\Helper\InvalidTypeException in case of unsupported $type |
||
57 | * @throws \Svea\WebPay\HostedService\Helper\InvalidCountryException in case of unsupported $country |
||
58 | */ |
||
59 | public function getClientNumber( $type, $country ) { |
||
62 | |||
63 | /** |
||
64 | * fetch merchant id, used with card or direct bank payments (i.e. Svea Hosted Web Service API) |
||
65 | * |
||
66 | * @return string |
||
67 | * |
||
68 | * @param string $type Svea\WebPay\Config\ConfigurationProvider::INVOICE_TYPE, ::PAYMENTPLAN_TYPE can be used if needed to match different configuration settings |
||
69 | * @param string $country CountryCode eg. SE, NO, DK, FI, NL, DE |
||
70 | */ |
||
71 | public function getMerchantId( $type, $country ) { |
||
76 | |||
77 | /** |
||
78 | * fetch secret word, used with card or direct bank payments (i.e. Svea Hosted Web Service API) |
||
79 | * |
||
80 | * @return string |
||
81 | * |
||
82 | * @param string $type Svea\WebPay\Config\ConfigurationProvider::INVOICE_TYPE, ::PAYMENTPLAN_TYPE can be used if needed to match different configuration settings |
||
83 | * @param string $country CountryCode eg. SE, NO, DK, FI, NL, DE |
||
84 | */ |
||
85 | public function getSecret( $type, $country ) { |
||
90 | |||
91 | /** |
||
92 | * Constants for the endpoint url found in the class ConfigurationService.php |
||
93 | * getEndPoint() should return an url corresponding to $type. |
||
94 | * |
||
95 | * @param string $type one of Svea\WebPay\Config\ConfigurationProvider::HOSTED_TYPE, ::INVOICE_TYPE, ::PAYMENTPLAN_TYPE, ::HOSTED_ADMIN_TYPE, ::ADMIN_TYPE |
||
96 | * |
||
97 | * @throws Exception |
||
98 | * @return string |
||
99 | */ |
||
100 | |||
101 | public function getEndPoint( $type ) { /* Defined in subclasses */ |
||
103 | |||
104 | /** |
||
105 | * fetch Checkout Merchant id, used for Checkout order type |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getCheckoutMerchantId() { |
||
114 | |||
115 | /** |
||
116 | * fetch Checkout Secret word, used for Checkout order type |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getCheckoutSecret() { |
||
125 | |||
126 | public function getIntegrationCompany() { |
||
129 | |||
130 | public function getIntegrationPlatform() { |
||
133 | } |
||
134 | |||
207 | } |