official-idin-magento-extension - Version 1.0.0

Version Notes

Release 1.0

Download this release

Release Info

Developer Epartment Ecommerce
Extension official-idin-magento-extension
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (99) hide show
  1. app/code/community/CMGroep/Idin/Block/Abstract.php +58 -0
  2. app/code/community/CMGroep/Idin/Block/Adminhtml/Customer/Edit/Tab/Idin.php +146 -0
  3. app/code/community/CMGroep/Idin/Block/Adminhtml/Customer/Edit/Tab/View/Idin.php +91 -0
  4. app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction.php +50 -0
  5. app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details.php +60 -0
  6. app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details/Form.php +167 -0
  7. app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details/Response.php +68 -0
  8. app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Grid.php +130 -0
  9. app/code/community/CMGroep/Idin/Block/Adminhtml/Sales/Order/View/Tab/Idin.php +146 -0
  10. app/code/community/CMGroep/Idin/Block/Adminhtml/System/Config/Support.php +66 -0
  11. app/code/community/CMGroep/Idin/Block/Catalog/Product/Notice.php +97 -0
  12. app/code/community/CMGroep/Idin/Block/Checkout/Cart/Notice.php +55 -0
  13. app/code/community/CMGroep/Idin/Block/Checkout/Onepage.php +67 -0
  14. app/code/community/CMGroep/Idin/Block/Checkout/Onepage/Js.php +75 -0
  15. app/code/community/CMGroep/Idin/Block/Checkout/Onepage/Verification.php +113 -0
  16. app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Abstract.php +92 -0
  17. app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Onestepcheckout/Checkout.php +35 -0
  18. app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Onestepcheckout/Js.php +35 -0
  19. app/code/community/CMGroep/Idin/Block/Core/Issuer/Select.php +52 -0
  20. app/code/community/CMGroep/Idin/Block/Customer/Account/Info.php +124 -0
  21. app/code/community/CMGroep/Idin/Block/Customer/Account/Login/Idin.php +126 -0
  22. app/code/community/CMGroep/Idin/Block/Customer/Account/Registration/Finish.php +63 -0
  23. app/code/community/CMGroep/Idin/Helper/Api.php +192 -0
  24. app/code/community/CMGroep/Idin/Helper/Api/Transaction.php +160 -0
  25. app/code/community/CMGroep/Idin/Helper/Crypto.php +72 -0
  26. app/code/community/CMGroep/Idin/Helper/Customer.php +143 -0
  27. app/code/community/CMGroep/Idin/Helper/Data.php +360 -0
  28. app/code/community/CMGroep/Idin/Model/Adminhtml/Observer.php +144 -0
  29. app/code/community/CMGroep/Idin/Model/Entity/Setup.php +107 -0
  30. app/code/community/CMGroep/Idin/Model/Observer.php +50 -0
  31. app/code/community/CMGroep/Idin/Model/Resource/Setup.php +145 -0
  32. app/code/community/CMGroep/Idin/Model/Resource/Transaction.php +38 -0
  33. app/code/community/CMGroep/Idin/Model/Resource/Transaction/Collection.php +48 -0
  34. app/code/community/CMGroep/Idin/Model/System/Config/Source/Mode.php +65 -0
  35. app/code/community/CMGroep/Idin/Model/System/Config/Source/Showproductnotice.php +65 -0
  36. app/code/community/CMGroep/Idin/Model/System/Config/Source/Verificationrequired.php +62 -0
  37. app/code/community/CMGroep/Idin/Model/Transaction.php +97 -0
  38. app/code/community/CMGroep/Idin/controllers/Adminhtml/Idin/TransactionController.php +61 -0
  39. app/code/community/CMGroep/Idin/controllers/AuthController.php +694 -0
  40. app/code/community/CMGroep/Idin/controllers/OnepageController.php +65 -0
  41. app/code/community/CMGroep/Idin/etc/adminhtml.xml +77 -0
  42. app/code/community/CMGroep/Idin/etc/config.xml +187 -0
  43. app/code/community/CMGroep/Idin/etc/system.xml +256 -0
  44. app/code/community/CMGroep/Idin/sql/cmgroep_idin_entity_setup/install-0.1.0.php +38 -0
  45. app/code/community/CMGroep/Idin/sql/cmgroep_idin_setup/install-0.1.0.php +38 -0
  46. app/design/adminhtml/base/default/layout/cmgroep_idin.xml +77 -0
  47. app/design/adminhtml/base/default/template/cm/idin/customer/tab/view/idin.phtml +54 -0
  48. app/design/adminhtml/base/default/template/cm/idin/system/config/support.phtml +66 -0
  49. app/design/adminhtml/base/default/template/cm/idin/transaction/response.phtml +35 -0
  50. app/design/frontend/base/default/layout/cmgroep_idin.xml +270 -0
  51. app/design/frontend/base/default/template/cmgroep/idin/catalog/product/notice.phtml +35 -0
  52. app/design/frontend/base/default/template/cmgroep/idin/checkout/cart/notice.phtml +35 -0
  53. app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage.phtml +47 -0
  54. app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/age_verification.phtml +60 -0
  55. app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/progress.phtml +72 -0
  56. app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/progress/age_verification.phtml +44 -0
  57. app/design/frontend/base/default/template/cmgroep/idin/checkout/third_party/onestepcheckout/checkout.phtml +68 -0
  58. app/design/frontend/base/default/template/cmgroep/idin/checkout/third_party/onestepcheckout/js.phtml +35 -0
  59. app/design/frontend/base/default/template/cmgroep/idin/core/issuer_select.phtml +41 -0
  60. app/design/frontend/base/default/template/cmgroep/idin/customer/info.phtml +80 -0
  61. app/design/frontend/base/default/template/cmgroep/idin/register_login.phtml +80 -0
  62. app/design/frontend/base/default/template/cmgroep/idin/registration/finish.phtml +82 -0
  63. app/etc/modules/CMGroep_Idin.xml +12 -0
  64. app/locale/en_US/template/email/cmgroep/idin/registration_confirmation.html +39 -0
  65. app/locale/nl_NL/CMGroep_Idin.csv +103 -0
  66. lib/CMGroep/Idin/autoload.php +65 -0
  67. lib/CMGroep/Idin/src/Api/IdinApi.php +440 -0
  68. lib/CMGroep/Idin/src/ApiClient.php +361 -0
  69. lib/CMGroep/Idin/src/ApiException.php +134 -0
  70. lib/CMGroep/Idin/src/Configuration.php +531 -0
  71. lib/CMGroep/Idin/src/Models/BaseRequest.php +247 -0
  72. lib/CMGroep/Idin/src/Models/DirectoryRequest.php +217 -0
  73. lib/CMGroep/Idin/src/Models/DirectoryResponse.php +263 -0
  74. lib/CMGroep/Idin/src/Models/Error.php +289 -0
  75. lib/CMGroep/Idin/src/Models/IdentityAddress.php +367 -0
  76. lib/CMGroep/Idin/src/Models/IdentityAge.php +263 -0
  77. lib/CMGroep/Idin/src/Models/IdentityBase.php +315 -0
  78. lib/CMGroep/Idin/src/Models/Issuer.php +263 -0
  79. lib/CMGroep/Idin/src/Models/MerchantResponse.php +341 -0
  80. lib/CMGroep/Idin/src/Models/MerchantResponseBalance.php +263 -0
  81. lib/CMGroep/Idin/src/Models/MerchantResponseContact.php +289 -0
  82. lib/CMGroep/Idin/src/Models/MerchantResponseServices.php +341 -0
  83. lib/CMGroep/Idin/src/Models/StatusRequest.php +245 -0
  84. lib/CMGroep/Idin/src/Models/StatusResponse.php +367 -0
  85. lib/CMGroep/Idin/src/Models/TransactionRequest.php +495 -0
  86. lib/CMGroep/Idin/src/Models/TransactionResponse.php +263 -0
  87. lib/CMGroep/Idin/src/ObjectSerializer.php +310 -0
  88. package.xml +2 -0
  89. skin/adminhtml/base/default/cm/idin/css/support.css +190 -0
  90. skin/adminhtml/base/default/cm/idin/images/logos/CM.svg +51 -0
  91. skin/adminhtml/base/default/cm/idin/images/logos/Epartment.svg +30 -0
  92. skin/adminhtml/base/default/cm/idin/images/logos/iDIN.svg +23 -0
  93. skin/adminhtml/base/default/cm/idin/src/support.less +212 -0
  94. skin/frontend/base/default/cm/idin/css/styles.css +517 -0
  95. skin/frontend/base/default/cm/idin/images/iDIN.svg +23 -0
  96. skin/frontend/base/default/cm/idin/js/age_verification.js +100 -0
  97. skin/frontend/base/default/cm/idin/js/onestepcheckout_idin.js +93 -0
  98. skin/frontend/base/default/cm/idin/js/opcheckout_idin.js +83 -0
  99. skin/frontend/base/default/cm/idin/src/styles.less +615 -0
app/code/community/CMGroep/Idin/Block/Abstract.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Abstract extends Mage_Core_Block_Template
33
+ {
34
+ /** @var CMGroep_Idin_Helper_Data */
35
+ protected $_helper = null;
36
+
37
+ /**
38
+ * @return CMGroep_Idin_Helper_Data
39
+ */
40
+ public function getHelper()
41
+ {
42
+ if ($this->_helper == null) {
43
+ $this->_helper = Mage::helper('cmgroep_idin');
44
+ }
45
+
46
+ return $this->_helper;
47
+ }
48
+
49
+ /**
50
+ * Generates Issuer Select HTML
51
+ *
52
+ * @return string
53
+ */
54
+ public function getIssuerSelectHtml()
55
+ {
56
+ return $this->getLayout()->createBlock('cmgroep_idin/core_issuer_select')->toHtml();
57
+ }
58
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Customer/Edit/Tab/Idin.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Customer_Edit_Tab_Idin extends Mage_Adminhtml_Block_Widget_Grid implements Mage_Adminhtml_Block_Widget_Tab_Interface
33
+ {
34
+
35
+ /**
36
+ * Retrieve collection of transactions for current order
37
+ *
38
+ * @return $this
39
+ */
40
+ public function _prepareCollection()
41
+ {
42
+ if ($this->getCollection() == null) {
43
+ $currentCustomer = Mage::registry('current_customer');
44
+
45
+ $collection = Mage::getResourceModel('cmgroep_idin/transaction_collection')
46
+ ->addFieldToFilter('customer_id', array('eq' => $currentCustomer->getId()));
47
+
48
+ $this->setCollection($collection);
49
+
50
+ return $this;
51
+ }
52
+ }
53
+
54
+ /*
55
+ * Render the columns
56
+ */
57
+ public function _prepareColumns()
58
+ {
59
+ $this->addColumn(
60
+ 'entity_id',
61
+ array(
62
+ 'header' => $this->__('#'),
63
+ 'width' => '100px',
64
+ 'index' => 'entity_id'
65
+ )
66
+ );
67
+
68
+ $this->addColumn(
69
+ 'transaction_date',
70
+ array(
71
+ 'header' => $this->__('Date'),
72
+ 'width' => '150px',
73
+ 'type' => 'datetime',
74
+ 'index' => 'transaction_date'
75
+ )
76
+ );
77
+
78
+ $this->addColumn(
79
+ 'transaction_id',
80
+ array(
81
+ 'header' => $this->__('Transaction #'),
82
+ 'index' => 'transaction_id'
83
+ )
84
+ );
85
+
86
+ return $this;
87
+ }
88
+
89
+ /**
90
+ * Return Tab label
91
+ *
92
+ * @return string
93
+ */
94
+ public function getTabLabel()
95
+ {
96
+ return $this->__('iDIN Transactions');
97
+ }
98
+
99
+ /**
100
+ * Return Tab title
101
+ *
102
+ * @return string
103
+ */
104
+ public function getTabTitle()
105
+ {
106
+ return $this->__('iDIN Transactions');
107
+ }
108
+
109
+ /**
110
+ * Can show tab in tabs
111
+ *
112
+ * @return boolean
113
+ */
114
+ public function canShowTab()
115
+ {
116
+ /** Make sure the collection has initialized */
117
+ $this->_prepareCollection();
118
+
119
+ return $this->getCollection()->getSize() > 0;
120
+ }
121
+
122
+ /**
123
+ * Tab is hidden
124
+ *
125
+ * @return boolean
126
+ */
127
+ public function isHidden()
128
+ {
129
+ /** Make sure the collection has initialized */
130
+ $this->_prepareCollection();
131
+
132
+ return $this->getCollection()->getSize() == 0;
133
+ }
134
+
135
+ /**
136
+ * Retrieves detail url
137
+ *
138
+ * @param CMGroep_Idin_Model_Transaction $item
139
+ *
140
+ * @return string
141
+ */
142
+ public function getRowUrl($item)
143
+ {
144
+ return $this->getUrl('adminhtml/idin_transaction/details', array('id' => $item->getId()));
145
+ }
146
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Customer/Edit/Tab/View/Idin.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ class CMGroep_Idin_Block_Adminhtml_Customer_Edit_Tab_View_Idin extends Mage_Adminhtml_Block_Template
32
+ {
33
+ protected $_customer;
34
+
35
+ /**
36
+ * Retrieves current customer
37
+ *
38
+ * @return Mage_Customer_Model_Customer
39
+ */
40
+ public function getCustomer()
41
+ {
42
+ if (!$this->_customer) {
43
+ $this->_customer = Mage::registry('current_customer');
44
+ }
45
+
46
+ return $this->_customer;
47
+ }
48
+
49
+ /**
50
+ * Returns true if age has been verified
51
+ *
52
+ * @return bool
53
+ */
54
+ public function getCustomerAgeVerified()
55
+ {
56
+ return $this->getCustomer()->getIdinAgeVerified() == 1;
57
+ }
58
+
59
+ /**
60
+ * Returns true if the customer is connected with iDIN
61
+ *
62
+ * @return bool
63
+ */
64
+ public function getCustomerIdinConnected()
65
+ {
66
+ return empty($this->getCustomer()->getIdinBin()) == false;
67
+ }
68
+
69
+ /**
70
+ * Injects extra CSS file, only on the customer edit page
71
+ *
72
+ * @return Mage_Core_Block_Abstract
73
+ */
74
+ protected function _prepareLayout()
75
+ {
76
+ $this->getLayout()->getBlock('head')->addCss('cm/idin/css/support.css');
77
+ return parent::_prepareLayout();
78
+ }
79
+
80
+ /**
81
+ * Only render the block when iDIN data is available
82
+ *
83
+ * @return string
84
+ */
85
+ public function _toHtml()
86
+ {
87
+ if ($this->getCustomerIdinConnected() || $this->getCustomerAgeVerified()) {
88
+ return parent::_toHtml();
89
+ }
90
+ }
91
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Idin_Transaction extends Mage_Adminhtml_Block_Widget_Grid_Container
33
+ {
34
+ /**
35
+ * CMGroep_Idin_Block_Adminhtml_Idin_Transaction constructor
36
+ */
37
+ public function __construct()
38
+ {
39
+ $this->_blockGroup = 'cmgroep_idin';
40
+ $this->_controller = 'adminhtml_idin_transaction';
41
+ $this->_headerText = $this->__('iDIN Transaction Log');
42
+
43
+ parent::__construct();
44
+
45
+ /**
46
+ * Remove add button
47
+ */
48
+ $this->_removeButton('add');
49
+ }
50
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Details extends Mage_Adminhtml_Block_Widget_Form_Container
33
+ {
34
+ /**
35
+ * CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Details constructor
36
+ */
37
+ public function __construct()
38
+ {
39
+ parent::__construct();
40
+
41
+ $this->_blockGroup = 'cmgroep_idin';
42
+ $this->_controller = 'adminhtml_idin_transaction';
43
+ $this->_mode = 'details';
44
+ $this->_headerText = $this->__('Details for transaction %s', $this->getTransaction()->getTransactionId());
45
+
46
+ $this->_removeButton('reset');
47
+ $this->_removeButton('delete');
48
+ $this->_removeButton('save');
49
+ }
50
+
51
+ /**
52
+ * @return CMGroep_Idin_Model_Transaction
53
+ */
54
+ public function getTransaction()
55
+ {
56
+ if ($this->getRequest()->getParam('id')) {
57
+ return Mage::getModel('cmgroep_idin/transaction')->load($this->getRequest()->getParam('id'));
58
+ }
59
+ }
60
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details/Form.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Details_Form extends Mage_Adminhtml_Block_Widget_Form
33
+ {
34
+ protected $_transaction = null;
35
+
36
+ /**
37
+ * CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Details_Form constructor
38
+ */
39
+ public function __construct()
40
+ {
41
+ parent::__construct();
42
+
43
+ $this->setId('cmgroep_idin_transaction_details_form');
44
+ }
45
+
46
+ /**
47
+ * Render the transaction form
48
+ *
49
+ * @return Mage_Adminhtml_Block_Widget_Form
50
+ */
51
+ protected function _prepareForm()
52
+ {
53
+ $form = new Varien_Data_Form(
54
+ array(
55
+ 'id' => 'detail_form'
56
+ )
57
+ );
58
+
59
+ $transactionDetailsFieldset = $form->addFieldset(
60
+ 'transaction_details_fieldset',
61
+ array(
62
+ 'legend' => $this->__('Transaction Information'),
63
+ 'class' => 'fieldset'
64
+ )
65
+ );
66
+
67
+ $transactionDetailsFieldset->addField(
68
+ 'transaction_date',
69
+ 'label',
70
+ array(
71
+ 'label' => $this->__('Transaction Date'),
72
+ 'value' => Mage::helper('core')->formatDate(
73
+ $this->getTransaction()->getTransactionDate(), Mage_Core_Model_Locale::FORMAT_TYPE_LONG, true
74
+ )
75
+ )
76
+ );
77
+
78
+ $transactionDetailsFieldset->addField(
79
+ 'transaction_id',
80
+ 'label',
81
+ array(
82
+ 'label' => $this->__('Transaction ID'),
83
+ 'value' => $this->getTransaction()->getTransactionId()
84
+ )
85
+ );
86
+
87
+ $transactionDetailsFieldset->addField(
88
+ 'entrance_code',
89
+ 'label',
90
+ array(
91
+ 'label' => $this->__('Entrance Code'),
92
+ 'value' => $this->getTransaction()->getEntranceCode()
93
+ )
94
+ );
95
+
96
+ if ($this->getTransaction()->getCustomerId()) {
97
+ $transactionDetailsFieldset->addField(
98
+ 'customer_id',
99
+ 'link',
100
+ array(
101
+ 'label' => $this->__('Customer #'),
102
+ 'href' => $this->getUrl('adminhtml/customer/edit', array('id' => $this->getTransaction()->getCustomerId())),
103
+ 'value' => $this->getTransaction()->getCustomerId()
104
+ )
105
+ );
106
+ }
107
+
108
+ if ($this->getTransaction()->getQuoteId()) {
109
+ $orderCollection = Mage::getResourceModel('sales/order_collection')
110
+ ->addAttributeToFilter('quote_id', $this->getTransaction()->getQuoteId())
111
+ ->setPageSize(1);
112
+
113
+ if ($orderCollection->getSize() > 0 && $order = $orderCollection->getFirstItem()) {
114
+ $transactionDetailsFieldset->addField(
115
+ 'order_id',
116
+ 'link',
117
+ array(
118
+ 'label' => $this->__('Order #'),
119
+ 'href' => $this->getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId())),
120
+ 'value' => $order->getIncrementId()
121
+ )
122
+ );
123
+ }
124
+ }
125
+
126
+ $transactionResponseFieldset = $form->addFieldset(
127
+ 'transaction_response_fieldset',
128
+ array(
129
+ 'legend' => $this->__('Transaction Response'),
130
+ 'class' => 'fieldset'
131
+ )
132
+ );
133
+
134
+ $transactionResponseFieldset->addField(
135
+ 'status_response',
136
+ 'hidden',
137
+ array(
138
+ 'name' => '',
139
+ 'after_element_html' => $this->getLayout()
140
+ ->createBlock('cmgroep_idin/adminhtml_idin_transaction_details_response')
141
+ ->setResponse($this->getTransaction()->getTransactionResponse())
142
+ ->toHtml()
143
+ )
144
+ );
145
+
146
+ $form->setUseContainer(true);
147
+ $this->setForm($form);
148
+
149
+ return parent::_prepareForm();
150
+ }
151
+
152
+ /**
153
+ * @return CMGroep_Idin_Model_Transaction
154
+ */
155
+ public function getTransaction()
156
+ {
157
+ if ($this->_transaction == null) {
158
+ if ($this->getRequest()->getParam('id')) {
159
+ $this->_transaction = Mage::getModel('cmgroep_idin/transaction')->load(
160
+ $this->getRequest()->getParam('id')
161
+ );
162
+ }
163
+ }
164
+
165
+ return $this->_transaction;
166
+ }
167
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Details/Response.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Details_Response extends Mage_Core_Block_Template
33
+ {
34
+ protected $_template = 'cm/idin/transaction/response.phtml';
35
+ protected $_response = null;
36
+
37
+ /**
38
+ * @param $transactionResponse Encoded transaction response
39
+ *
40
+ * @return $this
41
+ */
42
+ public function setResponse($transactionResponse)
43
+ {
44
+ $this->_response = $transactionResponse;
45
+
46
+ return $this;
47
+ }
48
+
49
+ /**
50
+ * @return string
51
+ */
52
+ public function getResponse()
53
+ {
54
+ return $this->_response;
55
+ }
56
+
57
+ /**
58
+ * Deserializes the response and encodes the JSON using Pretty Print
59
+ *
60
+ * @return string
61
+ */
62
+ public function getFormattedResponse()
63
+ {
64
+ $jsonObject = json_decode($this->getResponse(), true);
65
+
66
+ return json_encode($jsonObject, JSON_PRETTY_PRINT);
67
+ }
68
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Idin/Transaction/Grid.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Grid extends Mage_Adminhtml_Block_Widget_Grid
33
+ {
34
+ /**
35
+ * CMGroep_Idin_Block_Adminhtml_Idin_Transaction_Grid constructor
36
+ */
37
+ public function __construct()
38
+ {
39
+ parent::__construct();
40
+
41
+ $this->setId('cmgroep_idin_transaction_grid');
42
+ $this->setDefaultSort('transaction_date');
43
+ $this->setDefaultDir('desc');
44
+ }
45
+
46
+ /**
47
+ * Prepare transaction collection
48
+ * - Joins order table
49
+ *
50
+ * @return Mage_Adminhtml_Block_Widget_Grid
51
+ */
52
+ protected function _prepareCollection()
53
+ {
54
+ $transactionCollection = Mage::getResourceModel('cmgroep_idin/transaction_collection');
55
+
56
+ /**
57
+ * Join order table
58
+ */
59
+ $transactionCollection->joinOrderTable();
60
+
61
+ $this->setCollection($transactionCollection);
62
+
63
+ return parent::_prepareCollection();
64
+ }
65
+
66
+ /**
67
+ * Prepare grid columns
68
+ *
69
+ * @return $this
70
+ */
71
+ protected function _prepareColumns()
72
+ {
73
+ $this->addColumn(
74
+ 'entity_id',
75
+ array(
76
+ 'header' => $this->__('#'),
77
+ 'width' => '100px',
78
+ 'index' => 'entity_id'
79
+ )
80
+ );
81
+
82
+ $this->addColumn(
83
+ 'transaction_date',
84
+ array(
85
+ 'header' => $this->__('Date'),
86
+ 'width' => '150px',
87
+ 'type' => 'datetime',
88
+ 'index' => 'transaction_date'
89
+ )
90
+ );
91
+
92
+ $this->addColumn(
93
+ 'transaction_id',
94
+ array(
95
+ 'header' => $this->__('Transaction #'),
96
+ 'index' => 'transaction_id'
97
+ )
98
+ );
99
+
100
+ $this->addColumn(
101
+ 'customer_id',
102
+ array(
103
+ 'header' => $this->__('Customer #'),
104
+ 'index' => 'customer_id'
105
+ )
106
+ );
107
+
108
+ $this->addColumn(
109
+ 'order_increment_id',
110
+ array(
111
+ 'header' => $this->__('Order #'),
112
+ 'index' => 'order_increment_id'
113
+ )
114
+ );
115
+
116
+ return parent::_prepareColumns();
117
+ }
118
+
119
+ /**
120
+ * Retrieves detail url
121
+ *
122
+ * @param CMGroep_Idin_Model_Transaction $item
123
+ *
124
+ * @return string
125
+ */
126
+ public function getRowUrl($item)
127
+ {
128
+ return $this->getUrl('adminhtml/idin_transaction/details', array('id' => $item->getId()));
129
+ }
130
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/Sales/Order/View/Tab/Idin.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_Sales_Order_View_Tab_Idin extends Mage_Adminhtml_Block_Widget_Grid implements Mage_Adminhtml_Block_Widget_Tab_Interface
33
+ {
34
+
35
+ /**
36
+ * Retrieve collection of transactions for current order
37
+ *
38
+ * @return $this
39
+ */
40
+ public function _prepareCollection()
41
+ {
42
+ if ($this->getCollection() == null) {
43
+ $currentOrder = Mage::registry('current_order');
44
+
45
+ $collection = Mage::getResourceModel('cmgroep_idin/transaction_collection')
46
+ ->addFieldToFilter('quote_id', array('eq' => $currentOrder->getQuoteId()));
47
+
48
+ $this->setCollection($collection);
49
+
50
+ return $this;
51
+ }
52
+ }
53
+
54
+ /*
55
+ * Render the columns
56
+ */
57
+ public function _prepareColumns()
58
+ {
59
+ $this->addColumn(
60
+ 'entity_id',
61
+ array(
62
+ 'header' => $this->__('#'),
63
+ 'width' => '100px',
64
+ 'index' => 'entity_id'
65
+ )
66
+ );
67
+
68
+ $this->addColumn(
69
+ 'transaction_date',
70
+ array(
71
+ 'header' => $this->__('Date'),
72
+ 'width' => '150px',
73
+ 'type' => 'datetime',
74
+ 'index' => 'transaction_date'
75
+ )
76
+ );
77
+
78
+ $this->addColumn(
79
+ 'transaction_id',
80
+ array(
81
+ 'header' => $this->__('Transaction #'),
82
+ 'index' => 'transaction_id'
83
+ )
84
+ );
85
+
86
+ return $this;
87
+ }
88
+
89
+ /**
90
+ * Return Tab label
91
+ *
92
+ * @return string
93
+ */
94
+ public function getTabLabel()
95
+ {
96
+ return $this->__('iDIN Transactions');
97
+ }
98
+
99
+ /**
100
+ * Return Tab title
101
+ *
102
+ * @return string
103
+ */
104
+ public function getTabTitle()
105
+ {
106
+ return $this->__('iDIN Transactions');
107
+ }
108
+
109
+ /**
110
+ * Can show tab in tabs
111
+ *
112
+ * @return boolean
113
+ */
114
+ public function canShowTab()
115
+ {
116
+ /** Make sure the collection has initialized */
117
+ $this->_prepareCollection();
118
+
119
+ return $this->getCollection()->getSize() > 0;
120
+ }
121
+
122
+ /**
123
+ * Tab is hidden
124
+ *
125
+ * @return boolean
126
+ */
127
+ public function isHidden()
128
+ {
129
+ /** Make sure the collection has initialized */
130
+ $this->_prepareCollection();
131
+
132
+ return $this->getCollection()->getSize() == 0;
133
+ }
134
+
135
+ /**
136
+ * Retrieves detail url
137
+ *
138
+ * @param CMGroep_Idin_Model_Transaction $item
139
+ *
140
+ * @return string
141
+ */
142
+ public function getRowUrl($item)
143
+ {
144
+ return $this->getUrl('adminhtml/idin_transaction/details', array('id' => $item->getId()));
145
+ }
146
+ }
app/code/community/CMGroep/Idin/Block/Adminhtml/System/Config/Support.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Adminhtml_System_Config_Support extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
33
+ {
34
+ protected $_template = 'cm/idin/system/config/support.phtml';
35
+
36
+ /**
37
+ * Injects extra CSS file, only on the iDIN settings page
38
+ *
39
+ * @return Mage_Core_Block_Abstract
40
+ */
41
+ protected function _prepareLayout()
42
+ {
43
+ $this->getLayout()->getBlock('head')->addCss('cm/idin/css/support.css');
44
+ return parent::_prepareLayout();
45
+ }
46
+
47
+ /**
48
+ * Renders the template
49
+ *
50
+ * @param Varien_Data_Form_Element_Abstract $element
51
+ *
52
+ * @return string
53
+ */
54
+ public function render(Varien_Data_Form_Element_Abstract $element)
55
+ {
56
+ return $this->toHtml();
57
+ }
58
+
59
+ /**
60
+ * Retrieves current extension version
61
+ */
62
+ public function getExtensionVersion()
63
+ {
64
+ return (string) Mage::getConfig()->getNode()->modules->CMGroep_Idin->version;
65
+ }
66
+ }
app/code/community/CMGroep/Idin/Block/Catalog/Product/Notice.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Catalog_Product_Notice extends CMGroep_Idin_Block_Abstract
33
+ {
34
+ /** @var Mage_Catalog_Model_Product */
35
+ protected $_product = null;
36
+
37
+ /**
38
+ * Retrieve current product
39
+ *
40
+ * @return Mage_Catalog_Model_Product
41
+ */
42
+ public function getProduct()
43
+ {
44
+ if ($this->_product == null) {
45
+ $this->_product = Mage::registry('current_product');
46
+ }
47
+
48
+ return $this->_product;
49
+ }
50
+
51
+ /**
52
+ * Determines if product requires age verification
53
+ *
54
+ * @return bool
55
+ */
56
+ public function productRequiredAgeVerification()
57
+ {
58
+ $productRequiresAgeVerification = Mage::getResourceModel('catalog/product')->getAttributeRawValue(
59
+ $this->getProduct()->getId(), 'idin_require_age_verification', Mage::app()->getStore()->getId()
60
+ );
61
+
62
+ return $productRequiresAgeVerification == 1;
63
+ }
64
+
65
+ /**
66
+ * Only render when 18+ attribute is set on the product
67
+ *
68
+ * @return string
69
+ */
70
+ public function _toHtml()
71
+ {
72
+ /**
73
+ * Determine if notice should be visible based on the settings
74
+ */
75
+ $noticeSetting = $this->getHelper()->getIdinAgeVerificationProductNoticeSetting();
76
+
77
+ if ($this->getHelper()->getExtensionActive() && $this->getHelper()->getIdinAgeVerificationActive()) {
78
+ if ($noticeSetting == CMGroep_Idin_Model_System_Config_Source_Showproductnotice::MODE_ALWAYS) {
79
+ return parent::_toHtml();
80
+ } else if ($noticeSetting == CMGroep_Idin_Model_System_Config_Source_Showproductnotice::MODE_PRODUCTS) {
81
+ if ($this->productRequiredAgeVerification()) {
82
+ return parent::_toHtml();
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Retrieve product notice from settings
90
+ *
91
+ * @return string
92
+ */
93
+ public function getProductNotice()
94
+ {
95
+ return $this->getHelper()->getIdinAgeProductVerificationNotice();
96
+ }
97
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Cart/Notice.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Cart_Notice extends CMGroep_Idin_Block_Abstract
33
+ {
34
+ /**
35
+ * Only render when verification is still required and notice is enabled
36
+ *
37
+ * @return string
38
+ */
39
+ public function _toHtml()
40
+ {
41
+ if (($this->getHelper()->getIdinAgeVerificationCartNoticeEnabled() && $this->getHelper()->getIdinAgeVerificationActive() && $this->getHelper()->ageVerificationRequired()) && $this->getHelper()->getExtensionActive()) {
42
+ return parent::_toHtml();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Retrieve cart notice from settings
48
+ *
49
+ * @return string
50
+ */
51
+ public function getCartNotice()
52
+ {
53
+ return $this->getHelper()->getIdinAgeCartVerificationNotice();
54
+ }
55
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Onepage.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Onepage extends Mage_Checkout_Block_Onepage
33
+ {
34
+ /**
35
+ * Add the age verification step to the default OnePageCheckout steps
36
+ * when age verification is active
37
+ *
38
+ * @return array Steps for checkout
39
+ */
40
+ public function getSteps()
41
+ {
42
+ if (Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()
43
+ && Mage::helper('cmgroep_idin')->ageVerificationRequired(true) && Mage::helper('cmgroep_idin')->getExtensionActive()) {
44
+ $steps = parent::getSteps();
45
+
46
+ $ageVerificationStep = array(
47
+ 'age_verification' => array(
48
+ 'label' => Mage::helper('cmgroep_idin')->__('Age Verification'),
49
+ 'allow' => true
50
+ )
51
+ );
52
+
53
+ if (array_key_exists('login', $steps)) {
54
+ $steps = array_merge(
55
+ array_slice($steps, 0, 1, true), $ageVerificationStep,
56
+ array_slice($steps, 1, null, true)
57
+ );
58
+ } else {
59
+ $steps = array_merge($ageVerificationStep, $steps);
60
+ }
61
+
62
+ return $steps;
63
+ }
64
+
65
+ return parent::getSteps();
66
+ }
67
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Onepage/Js.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Onepage_Js extends Mage_Core_Block_Template
33
+ {
34
+ /**
35
+ * Only render when age verification is active
36
+ *
37
+ * @return string
38
+ */
39
+ public function _toHtml()
40
+ {
41
+ if (Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()
42
+ && Mage::helper('cmgroep_idin')->ageVerificationRequired(true) && Mage::helper('cmgroep_idin')->getExtensionActive()) {
43
+ return parent::_toHtml();
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Get checkout method after age verification in order to
49
+ * skip the authentication step in OnePageCheckout
50
+ *
51
+ * @return string
52
+ */
53
+ public function getCheckoutMethod()
54
+ {
55
+ return Mage::getSingleton('core/session')->getData('idin_checkout_method');
56
+ }
57
+
58
+ /**
59
+ * Get active step
60
+ *
61
+ * @return string
62
+ */
63
+ public function getActiveStep()
64
+ {
65
+ if (Mage::helper('customer')->isLoggedIn() == false) {
66
+ return 'login';
67
+ } else {
68
+ if (Mage::helper('cmgroep_idin')->ageVerificationRequired()) {
69
+ return 'age_verification';
70
+ } else {
71
+ return 'billing';
72
+ }
73
+ }
74
+ }
75
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Onepage/Verification.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Onepage_Verification extends Mage_Checkout_Block_Onepage_Abstract
33
+ {
34
+ /** @var CMGroep_Idin_Helper_Data */
35
+ protected $_helper = null;
36
+
37
+ /**
38
+ * @return CMGroep_Idin_Helper_Data
39
+ */
40
+ public function getHelper()
41
+ {
42
+ if ($this->_helper == null) {
43
+ $this->_helper = Mage::helper('cmgroep_idin');
44
+ }
45
+
46
+ return $this->_helper;
47
+ }
48
+
49
+ /**
50
+ * Generates Issuer Select HTML
51
+ *
52
+ * @return string
53
+ */
54
+ public function getIssuerSelectHtml()
55
+ {
56
+ return $this->getLayout()->createBlock('cmgroep_idin/core_issuer_select')->toHtml();
57
+ }
58
+
59
+ /**
60
+ * Add step data for age verification
61
+ * Disable billing step if verification is required
62
+ */
63
+ protected function _construct()
64
+ {
65
+ $this->getCheckout()->setStepData(
66
+ 'age_verification',
67
+ array(
68
+ 'label' => $this->getHelper()->__('Age Verification'),
69
+ 'is_show' => $this->isShow(),
70
+ 'allow' => true,
71
+ )
72
+ );
73
+
74
+ if ($this->getHelper()->ageVerificationRequired() && $this->getHelper()->getExtensionActive() && $this->getHelper()->getIdinAgeVerificationActive()) {
75
+ $this->getCheckout()->setStepData('billing', 'allow', false);
76
+ }
77
+
78
+ parent::_construct();
79
+ }
80
+
81
+ /**
82
+ * Determines if verification is required
83
+ *
84
+ * @return bool
85
+ */
86
+ public function isAgeVerificationRequired()
87
+ {
88
+ return $this->getHelper()->ageVerificationRequired();
89
+ }
90
+
91
+ /**
92
+ * Get url for starting age verification from the checkout
93
+ *
94
+ * @return string
95
+ */
96
+ public function getVerifyAgeUrl()
97
+ {
98
+ return Mage::getUrl('idin/auth/verifyAge', array('mode' => 'checkout'));
99
+ }
100
+
101
+ /**
102
+ * Only render when age verification is active
103
+ *
104
+ * @return string
105
+ */
106
+ public function _toHtml()
107
+ {
108
+ if (Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()
109
+ && Mage::helper('cmgroep_idin')->ageVerificationRequired(true) && Mage::helper('cmgroep_idin')->getExtensionActive()) {
110
+ return parent::_toHtml();
111
+ }
112
+ }
113
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Abstract.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Thirdparty_Abstract extends Mage_Core_Block_Template
33
+ {
34
+ /** @var CMGroep_Idin_Helper_Data */
35
+ protected $_helper = null;
36
+
37
+ /**
38
+ * @return CMGroep_Idin_Helper_Data
39
+ */
40
+ public function getHelper()
41
+ {
42
+ if ($this->_helper == null) {
43
+ $this->_helper = Mage::helper('cmgroep_idin');
44
+ }
45
+
46
+ return $this->_helper;
47
+ }
48
+
49
+ /**
50
+ * Generates Issuer Select HTML
51
+ *
52
+ * @return string
53
+ */
54
+ public function getIssuerSelectHtml()
55
+ {
56
+ return $this->getLayout()->createBlock('cmgroep_idin/core_issuer_select')->toHtml();
57
+ }
58
+
59
+ /**
60
+ * Determines if verification is required
61
+ *
62
+ * @return bool
63
+ */
64
+ public function isAgeVerificationRequired()
65
+ {
66
+ return $this->getHelper()->ageVerificationRequired();
67
+ }
68
+
69
+ /**
70
+ * Get url for starting age verification from the checkout
71
+ *
72
+ * @return string
73
+ */
74
+ public function getVerifyAgeUrl()
75
+ {
76
+ return Mage::getUrl('idin/auth/verifyAge', array('mode' => 'checkout'));
77
+ }
78
+
79
+ /**
80
+ * Only render when age verification is active
81
+ *
82
+ * @return string
83
+ */
84
+ public function _toHtml()
85
+ {
86
+ if (Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()
87
+ && Mage::helper('cmgroep_idin')->ageVerificationRequired(true)
88
+ && Mage::helper('cmgroep_idin')->getExtensionActive()) {
89
+ return parent::_toHtml();
90
+ }
91
+ }
92
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Onestepcheckout/Checkout.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Thirdparty_Onestepcheckout_Checkout extends CMGroep_Idin_Block_Checkout_Thirdparty_Abstract
33
+ {
34
+
35
+ }
app/code/community/CMGroep/Idin/Block/Checkout/Thirdparty/Onestepcheckout/Js.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Checkout_Thirdparty_Onestepcheckout_Js extends CMGroep_Idin_Block_Checkout_Thirdparty_Abstract
33
+ {
34
+
35
+ }
app/code/community/CMGroep/Idin/Block/Core/Issuer/Select.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Core_Issuer_Select extends Mage_Core_Block_Template
33
+ {
34
+ /** @var array */
35
+ protected $_issuers = null;
36
+
37
+ protected $_template = 'cmgroep/idin/core/issuer_select.phtml';
38
+
39
+ /**
40
+ * Retrieves available issuers
41
+ *
42
+ * @return array List of issuers
43
+ */
44
+ public function getIssuers()
45
+ {
46
+ if ($this->_issuers == null) {
47
+ $this->_issuers = Mage::helper('cmgroep_idin')->getIssuerList();
48
+ }
49
+
50
+ return $this->_issuers;
51
+ }
52
+ }
app/code/community/CMGroep/Idin/Block/Customer/Account/Info.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Customer_Account_Info extends CMGroep_Idin_Block_Abstract
33
+ {
34
+ /**
35
+ * @var Mage_Customer_Model_Customer
36
+ */
37
+ protected $_customer;
38
+
39
+ /**
40
+ * Gets the current customer
41
+ *
42
+ * @return Mage_Customer_Model_Customer
43
+ */
44
+ public function getCustomer()
45
+ {
46
+ if ($this->_customer == null) {
47
+ $this->_customer = Mage::helper('customer')->getCurrentCustomer();
48
+ }
49
+
50
+ return $this->_customer;
51
+ }
52
+
53
+ /**
54
+ * @return bool
55
+ */
56
+ public function shouldShow()
57
+ {
58
+ if (($this->getHelper()->getIdinLoginActive() || $this->getHelper()->getIdinAgeVerificationActive()) && $this->getHelper()->getExtensionActive()) {
59
+ return true;
60
+ }
61
+
62
+ return false;
63
+ }
64
+
65
+ /**
66
+ * Determines if customer has iDIN login enabled
67
+ *
68
+ * @return bool
69
+ */
70
+ public function customerHasIdin()
71
+ {
72
+ return empty($this->getCustomer()->getIdinBin()) === false;
73
+ }
74
+
75
+ /**
76
+ * Determines if customer's age is verified
77
+ *
78
+ * @return bool
79
+ */
80
+ public function customerHasVerifiedAge()
81
+ {
82
+ return $this->getCustomer()->getIdinAgeVerified() == 1;
83
+ }
84
+
85
+ /**
86
+ * Determines if iDIN login is enabled
87
+ *
88
+ * @return bool
89
+ */
90
+ public function isIdinLoginEnabled()
91
+ {
92
+ return $this->getHelper()->getIdinLoginActive();
93
+ }
94
+
95
+ /**
96
+ * Determines if iDIN age verification is active
97
+ *
98
+ * @return bool
99
+ */
100
+ public function isIdinAgeVerificationEnabled()
101
+ {
102
+ return $this->getHelper()->getIdinAgeVerificationActive();
103
+ }
104
+
105
+ /**
106
+ * Get URL for connecting iDIN to account
107
+ *
108
+ * @return string
109
+ */
110
+ public function getConnectWithIdinUrl()
111
+ {
112
+ return $this->getUrl('idin/auth/connect');
113
+ }
114
+
115
+ /**
116
+ * Get URL for verifying age through iDIN
117
+ *
118
+ * @return string
119
+ */
120
+ public function getVerifyAgeWithIdinUrl()
121
+ {
122
+ return $this->getUrl('idin/auth/verifyAge');
123
+ }
124
+ }
app/code/community/CMGroep/Idin/Block/Customer/Account/Login/Idin.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Customer_Account_Login_Idin extends CMGroep_Idin_Block_Abstract
33
+ {
34
+ protected $_isRegistration = false;
35
+ protected $_isCheckout = false;
36
+
37
+ /**
38
+ * Enable registration only mode
39
+ *
40
+ * @param $registration
41
+ */
42
+ public function setIsRegistration($registration)
43
+ {
44
+ $this->_isRegistration = $registration;
45
+ }
46
+
47
+ /**
48
+ * Retrieves registration only mode
49
+ *
50
+ * @return bool
51
+ */
52
+ public function getIsRegistration()
53
+ {
54
+ return $this->_isRegistration;
55
+ }
56
+
57
+ /**
58
+ * Enable checkout only mode
59
+ *
60
+ * @param $checkout
61
+ */
62
+ public function setIsCheckout($checkout)
63
+ {
64
+ $this->_isCheckout = $checkout;
65
+ }
66
+
67
+ /**
68
+ * Retrieves checkout only mode
69
+ *
70
+ * @return bool
71
+ */
72
+ public function getIsCheckout()
73
+ {
74
+ return $this->_isCheckout;
75
+ }
76
+
77
+ /**
78
+ * @return string URL for iDIN authentication
79
+ */
80
+ public function getFormAction()
81
+ {
82
+ return $this->getUrl('idin/auth/index');
83
+ }
84
+
85
+ /**
86
+ * Returns whether registration is enabled or not
87
+ *
88
+ * @return bool
89
+ */
90
+ public function registrationEnabled()
91
+ {
92
+ return $this->_helper->getIdinRegistrationActive();
93
+ }
94
+
95
+ /**
96
+ * Returns whether registration is enabled or not
97
+ *
98
+ * @return bool
99
+ */
100
+ public function loginEnabled()
101
+ {
102
+ return $this->_helper->getIdinLoginActive();
103
+ }
104
+
105
+ /**
106
+ * Do not render the block unless one of the authentication
107
+ * functions is enabled
108
+ *
109
+ * @return string
110
+ */
111
+ public function _toHtml()
112
+ {
113
+ if (($this->getHelper()->getIdinLoginActive() || $this->getHelper()->getIdinRegistrationActive()) && $this->getHelper()->getExtensionActive()) {
114
+
115
+ /**
116
+ * Do not render if registration is disabled and the current page is a registration page
117
+ */
118
+ if ($this->getIsRegistration() == 1 && $this->getHelper()->getIdinRegistrationActive() == false) {
119
+ return;
120
+ }
121
+
122
+ return parent::_toHtml();
123
+ }
124
+ }
125
+ }
126
+
app/code/community/CMGroep/Idin/Block/Customer/Account/Registration/Finish.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Block_Customer_Account_Registration_Finish extends Mage_Core_Block_Template
33
+ {
34
+ /**
35
+ * Retrieves the transaction ID from the request
36
+ *
37
+ * @return string
38
+ */
39
+ public function getTransactionId()
40
+ {
41
+ return $this->getRequest()->getParam('trxid');
42
+ }
43
+
44
+ /**
45
+ * Retrieves the Entrance Code from the request
46
+ *
47
+ * @return string
48
+ */
49
+ public function getEntranceCode()
50
+ {
51
+ return $this->getRequest()->getParam('ec');
52
+ }
53
+
54
+ /**
55
+ * Returns the url for finishing registration
56
+ *
57
+ * @return string
58
+ */
59
+ public function getFormAction()
60
+ {
61
+ return $this->getUrl('*/*/register');
62
+ }
63
+ }
app/code/community/CMGroep/Idin/Helper/Api.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ require_once(Mage::getBaseDir('lib') . DS . 'CMGroep' . DS . 'Idin' . DS . 'autoload.php');
33
+
34
+ class CMGroep_Idin_Helper_Api extends Mage_Core_Helper_Abstract
35
+ {
36
+ /**
37
+ * Retrieves the host to be used depending on the extension mode
38
+ *
39
+ * @return string
40
+ */
41
+ public function getApiHost()
42
+ {
43
+ if (Mage::helper('cmgroep_idin')->getExtensionMode() == CMGroep_Idin_Model_System_Config_Source_Mode::MODE_LIVE) {
44
+ return CMGroep_Idin_Model_System_Config_Source_Mode::GATEWAY_LIVE;
45
+ } else {
46
+ return CMGroep_Idin_Model_System_Config_Source_Mode::GATEWAY_TEST;
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Retrieves API client with configuration according
52
+ * to Magento System Configuration
53
+ *
54
+ * @return \CMGroep\Idin\ApiClient
55
+ */
56
+ public function getApiClient()
57
+ {
58
+ $apiConfiguration = new \CMGroep\Idin\Configuration();
59
+ $apiConfiguration->setHost($this->getApiHost());
60
+ $apiConfiguration->setUserAgent(sprintf('Magento-CMGroep-iDIN/%s', Mage::helper('cmgroep_idin')->getExtensionVersion()));
61
+
62
+ $apiClient = new \CMGroep\Idin\ApiClient($apiConfiguration);
63
+
64
+ return $apiClient;
65
+ }
66
+
67
+ /**
68
+ * @return \CMGroep\Idin\Api\IdinApi
69
+ */
70
+ public function getIdinApi()
71
+ {
72
+ $idinApi = new \CMGroep\Idin\Api\IdinApi($this->getApiClient());
73
+
74
+ return $idinApi;
75
+ }
76
+
77
+ /**
78
+ * Prepares request by adding the required merchant token
79
+ *
80
+ * @param \CMGroep\Idin\Models\BaseRequest $baseRequest
81
+ *
82
+ * @return \CMGroep\Idin\Models\BaseRequest
83
+ */
84
+ public function prepareRequest(\CMGroep\Idin\Models\BaseRequest $baseRequest)
85
+ {
86
+ $merchantToken = Mage::helper('cmgroep_idin')->getMerchantToken();
87
+ $baseRequest->setMerchantToken($merchantToken);
88
+
89
+ return $baseRequest;
90
+ }
91
+
92
+ /**
93
+ * Retrieves all issuers from the iDIN directory
94
+ *
95
+ * @return \CMGroep\Idin\Models\DirectoryResponse[]|\CMGroep\Idin\Models\Error
96
+ */
97
+ public function getDirectory()
98
+ {
99
+ $api = $this->getIdinApi();
100
+
101
+ /** @var \CMGroep\Idin\Models\DirectoryRequest $directoryRequest */
102
+ $directoryRequest = $this->prepareRequest(new \CMGroep\Idin\Models\DirectoryRequest());
103
+
104
+ try {
105
+ $directoryResponse = $api->directoryPost($directoryRequest);
106
+ return $directoryResponse;
107
+ } catch (\CMGroep\Idin\ApiException $ex) {
108
+ return $ex->getResponseObject();
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Retrieves merchant information
114
+ *
115
+ * @param $merchantToken
116
+ *
117
+ * @return \CMGroep\Idin\Models\MerchantResponse|\CMGroep\Idin\Models\Error
118
+ */
119
+ public function getMerchantInformation($merchantToken)
120
+ {
121
+ $api = $this->getIdinApi();
122
+
123
+ try {
124
+ $merchantResponse = $api->merchantsMerchantTokenGet($merchantToken);
125
+ return $merchantResponse;
126
+ } catch (\CMGroep\Idin\ApiException $ex) {
127
+ return $ex->getResponseObject();
128
+ }
129
+ }
130
+
131
+ /**
132
+ * Retrieves the transaction status for a transaction
133
+ *
134
+ * @param $transactionId
135
+ *
136
+ * @return \CMGroep\Idin\Models\StatusResponse|\CMGroep\Idin\Models\Error
137
+ */
138
+ public function getTransactionStatus($transactionId)
139
+ {
140
+ $api = $this->getIdinApi();
141
+
142
+ /** @var \CMGroep\Idin\Models\StatusRequest $transactionStatusRequest */
143
+ $transactionStatusRequest = $this->prepareRequest(new \CMGroep\Idin\Models\StatusRequest());
144
+ $transactionStatusRequest->setTransactionId($transactionId);
145
+
146
+ try {
147
+ $transactionStatusResponse = $api->statusPost(
148
+ $transactionStatusRequest
149
+ );
150
+ return $transactionStatusResponse;
151
+ } catch (\CMGroep\Idin\ApiException $ex) {
152
+ return $ex->getResponseObject();
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Generates a random entrance code for a transaction
158
+ *
159
+ * @return string
160
+ */
161
+ public function generateEntranceCode()
162
+ {
163
+ return Mage::helper('cmgroep_idin/crypto')->randomString(40);
164
+ }
165
+
166
+ /**
167
+ * Serializes a status response for saving it in database
168
+ *
169
+ * @param \CMGroep\Idin\Models\StatusResponse $statusReponse
170
+ *
171
+ * @return string
172
+ */
173
+ public function serializeStatusResponse(\CMGroep\Idin\Models\StatusResponse $statusReponse)
174
+ {
175
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($statusReponse));
176
+ }
177
+
178
+ /**
179
+ * Deserializes a status response from the database
180
+ *
181
+ * @param $statusResponseData
182
+ *
183
+ * @return object
184
+ */
185
+ public function deserializeStatusResponse($statusResponseData)
186
+ {
187
+ return \CMGroep\Idin\ObjectSerializer::deserialize(
188
+ json_decode($statusResponseData),
189
+ \CMGroep\Idin\Models\StatusResponse::class
190
+ );
191
+ }
192
+ }
app/code/community/CMGroep/Idin/Helper/Api/Transaction.php ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ require_once(Mage::getBaseDir('lib') . DS . 'CMGroep' . DS . 'Idin' . DS . 'autoload.php');
33
+
34
+ class CMGroep_Idin_Helper_Api_Transaction extends Mage_Core_Helper_Abstract
35
+ {
36
+ /**
37
+ * @var CMGroep_Idin_Helper_Api
38
+ */
39
+ protected $_apiHelper = null;
40
+
41
+ /**
42
+ * @var \CMGroep\Idin\Api\IdinApi
43
+ */
44
+ protected $_idinApi = null;
45
+
46
+ /**
47
+ * @var \CMGroep\Idin\Models\TransactionRequest
48
+ */
49
+ protected $_transactionRequest = null;
50
+
51
+ /**
52
+ * CMGroep_Idin_Helper_Api_Transaction constructor.
53
+ */
54
+ public function __construct()
55
+ {
56
+ if ($this->_apiHelper == null) {
57
+ $this->_apiHelper = Mage::helper('cmgroep_idin/api');
58
+ }
59
+
60
+ if ($this->_idinApi == null) {
61
+ $this->_idinApi = $this->_apiHelper->getIdinApi();
62
+ }
63
+ }
64
+
65
+ /**
66
+ * Starts a new transaction
67
+ *
68
+ * @param $issuerId Issuer ID of bank
69
+ * @param $entranceCode Entrance Code
70
+ * @param $returnUrl Return url
71
+ *
72
+ * @return $this
73
+ */
74
+ public function start($issuerId, $entranceCode, $returnUrl)
75
+ {
76
+ $this->_transactionRequest = $this->_apiHelper->prepareRequest(new \CMGroep\Idin\Models\TransactionRequest());
77
+ $this->_transactionRequest->setIssuerId($issuerId);
78
+ $this->_transactionRequest->setEntranceCode($entranceCode);
79
+
80
+ $this->_transactionRequest->setMerchantReturnUrl($returnUrl);
81
+
82
+ return $this;
83
+ }
84
+
85
+ /**
86
+ * Executes the current transaction
87
+ *
88
+ * @return \CMGroep\Idin\Models\TransactionResponse|\CMGroep\Idin\Models\Error
89
+ */
90
+ public function execute()
91
+ {
92
+ try {
93
+ $transactionResponse = $this->_idinApi->transactionPost($this->_transactionRequest);
94
+ } catch (\CMGroep\Idin\ApiException $ex) {
95
+ return $ex->getResponseObject();
96
+ }
97
+
98
+ return $transactionResponse;
99
+ }
100
+
101
+ /**
102
+ * Retrieve identity with transaction
103
+ *
104
+ * @return $this
105
+ */
106
+ public function withIdentity()
107
+ {
108
+ $this->_transactionRequest->setIdentity(true);
109
+
110
+ return $this;
111
+ }
112
+
113
+ /**
114
+ * Retrieve name with transaction
115
+ *
116
+ * @return $this
117
+ */
118
+ public function withName()
119
+ {
120
+ $this->_transactionRequest->setName(true);
121
+
122
+ return $this;
123
+ }
124
+
125
+ /**
126
+ * Retrieve address with transaction
127
+ *
128
+ * @return $this
129
+ */
130
+ public function withAddress()
131
+ {
132
+ $this->_transactionRequest->setAddress(true);
133
+
134
+ return $this;
135
+ }
136
+
137
+ /**
138
+ * Retrieve date of birth with transaction
139
+ *
140
+ * @return $this
141
+ */
142
+ public function withDateOfBirth()
143
+ {
144
+ $this->_transactionRequest->setDateOfBirth(true);
145
+
146
+ return $this;
147
+ }
148
+
149
+ /**
150
+ * Retrieve 18 year or older status with transaction
151
+ *
152
+ * @return $this
153
+ */
154
+ public function with18yOrOlder()
155
+ {
156
+ $this->_transactionRequest->set18yOrOlder(true);
157
+
158
+ return $this;
159
+ }
160
+ }
app/code/community/CMGroep/Idin/Helper/Crypto.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Helper_Crypto extends Mage_Core_Helper_Abstract
33
+ {
34
+
35
+ /**
36
+ * Generates a secure as possible random string
37
+ * - PHP 7: random_bytes
38
+ * - Mcrypt
39
+ * - OpenSSL
40
+ * - mt_rand
41
+ *
42
+ * @param int $length
43
+ *
44
+ * @return string
45
+ */
46
+ public function randomString($length = 40)
47
+ {
48
+ /**
49
+ * PHP 7 only, use random_bytes
50
+ */
51
+ if (function_exists('random_bytes')) {
52
+ return bin2hex(random_bytes($length / 2));
53
+ }
54
+
55
+ if (extension_loaded('mcrypt')) {
56
+ return bin2hex(mcrypt_create_iv($length / 2, MCRYPT_DEV_URANDOM));
57
+ } else if (extension_loaded('openssl')) {
58
+ return bin2hex(openssl_random_pseudo_bytes($length / 2));
59
+ } else {
60
+ $randomString = '';
61
+ $characters = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'));
62
+ $max = count($characters) - 1;
63
+
64
+ for ($i = 0; $i < $length; $i++) {
65
+ $rand = mt_rand(0, $max);
66
+ $randomString .= $characters[$rand];
67
+ }
68
+
69
+ return $randomString;
70
+ }
71
+ }
72
+ }
app/code/community/CMGroep/Idin/Helper/Customer.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Helper_Customer extends Mage_Core_Helper_Abstract
33
+ {
34
+
35
+ /**
36
+ * Creates an user and address based off an iDIN status response
37
+ * Used for registration through iDIN
38
+ *
39
+ * Returns false if creation failed
40
+ *
41
+ * @param string $emailAddress
42
+ * @param string $phoneNumber
43
+ * @param string $password
44
+ * @param \CMGroep\Idin\Models\StatusResponse $statusResponse
45
+ *
46
+ * @return false|Mage_Customer_Model_Customer
47
+ */
48
+ public function createCustomer($emailAddress, $phoneNumber, $password, \CMGroep\Idin\Models\StatusResponse $statusResponse)
49
+ {
50
+ try {
51
+ $websiteId = Mage::app()->getWebsite()->getId();
52
+ $store = Mage::app()->getStore();
53
+ $groupId = Mage::helper('customer')->getDefaultCustomerGroupId();
54
+
55
+ $customer = Mage::getModel('customer/customer');
56
+ $customer->setWebsiteId($websiteId)
57
+ ->setStore($store)
58
+ ->setGroupId($groupId)
59
+ ->setFirstname($statusResponse->getName()->getInitials())
60
+ ->setMiddlename($statusResponse->getName()->getLastNamePrefix())
61
+ ->setLastname($statusResponse->getName()->getLastName())
62
+ ->setEmail($emailAddress)
63
+ ->setPassword(strlen($password) > 0 ? $password : $statusResponse->getBin())
64
+ ->setIdinBin($statusResponse->getBin());
65
+
66
+ $customer->save();
67
+
68
+ $address = Mage::getModel('customer/address');
69
+ $address->setCustomerId($customer->getId())
70
+ ->setFirstname($customer->getFirstname())
71
+ ->setMiddlename($customer->getMiddlename())
72
+ ->setLastname($customer->getLastname())
73
+ ->setCountryId($statusResponse->getAddress()->getCountry())
74
+ ->setPostcode($statusResponse->getAddress()->getPostalCode())
75
+ ->setCity($statusResponse->getAddress()->getCity())
76
+ ->setStreet($statusResponse->getAddress()->getStreet() . ' ' . $statusResponse->getAddress()->getHouseNumber() . ' ' . $statusResponse->getAddress()->getHouseNumberSuffix())
77
+ ->setTelephone(empty($phoneNumber) ? '-' : $phoneNumber)
78
+ ->setIsDefaultBilling(1)
79
+ ->setIsDefaultShipping(1)
80
+ ->setSaveInAddressBook(1);
81
+
82
+ $address->save();
83
+
84
+ /**
85
+ * Send iDIN registration confirmation email
86
+ */
87
+ $this->sendConfirmationEmail($customer);
88
+
89
+ return $customer;
90
+ } catch (Exception $ex) {
91
+ Mage::logException($ex);
92
+ }
93
+
94
+ return false;
95
+ }
96
+
97
+ /**
98
+ * Send customer registration email
99
+ *
100
+ * @param Mage_Customer_Model_Customer $customer
101
+ *
102
+ * @return $this
103
+ */
104
+ public function sendConfirmationEmail($customer)
105
+ {
106
+ $templateId = 'cmgroep_idin_email_confirmation';
107
+
108
+ if (Mage::getStoreConfig('cmgroep_idin/registration/email_confirmation_template', $customer->getStore()->getId()) !=
109
+ 'cmgroep_idin_registration_email_confirmation_template') {
110
+ $templateId = Mage::getStoreConfig('cmgroep_idin/registration/email_confirmation_template', $customer->getStore()->getId());
111
+ }
112
+
113
+ /** @var $mailer Mage_Core_Model_Email_Template_Mailer */
114
+ $mailer = Mage::getModel('core/email_template_mailer');
115
+ $emailInfo = Mage::getModel('core/email_info');
116
+ $emailInfo->addTo($customer->getEmail(), $customer->getName());
117
+ $mailer->addEmailInfo($emailInfo);
118
+
119
+ // Set all required params and send emails
120
+ $mailer->setSender(Mage::getStoreConfig(Mage_Customer_Model_Customer::XML_PATH_REGISTER_EMAIL_IDENTITY, $customer->getStore()->getId()));
121
+ $mailer->setStoreId($customer->getStore()->getId());
122
+ $mailer->setTemplateId($templateId);
123
+ $mailer->setTemplateParams(array('customer' => $customer, 'back_url' => ''));
124
+ $mailer->send();
125
+ }
126
+
127
+ /**
128
+ * Clears current sessions and starts an authenticated
129
+ * session for given customer
130
+ *
131
+ * @param Mage_Customer_model_Customer $customer
132
+ *
133
+ * @return bool
134
+ */
135
+ public function startSessionForCustomer($customer)
136
+ {
137
+ $session = Mage::getSingleton('customer/session');
138
+ $session->clear();
139
+ $session->setCustomerAsLoggedIn($customer);
140
+
141
+ return true;
142
+ }
143
+ }
app/code/community/CMGroep/Idin/Helper/Data.php ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Helper_Data extends Mage_Core_Helper_Abstract
33
+ {
34
+ const CACHE_TAG_IDIN = 'cmgroep_idin';
35
+ const CACHE_KEY_IDIN_ISSUERS = 'cmgroup_idin_issuers';
36
+
37
+ /**
38
+ * Retrieves current extension version
39
+ */
40
+ public function getExtensionVersion()
41
+ {
42
+ return (string) Mage::getConfig()->getNode()->modules->CMGroep_Idin->version;
43
+ }
44
+
45
+ /**
46
+ * Returns whether login is enabled or not
47
+ *
48
+ * @return bool
49
+ */
50
+ public function getExtensionActive()
51
+ {
52
+ return Mage::getStoreConfig('cmgroep_idin/common/active') == 1;
53
+ }
54
+
55
+ /**
56
+ * Retrieves the current mode
57
+ *
58
+ * @return integer
59
+ */
60
+ public function getExtensionMode()
61
+ {
62
+ return Mage::getStoreConfig('cmgroep_idin/common/mode');
63
+ }
64
+
65
+ /**
66
+ * Retrieves the merchant token
67
+ *
68
+ * @return string
69
+ */
70
+ public function getMerchantToken()
71
+ {
72
+ return Mage::getStoreConfig('cmgroep_idin/common/merchant_token');
73
+ }
74
+
75
+ /**
76
+ * Returns whether registration is enabled or not
77
+ *
78
+ * @return bool
79
+ */
80
+ public function getIdinRegistrationActive()
81
+ {
82
+ return Mage::getStoreConfig('cmgroep_idin/registration/active') == 1;
83
+ }
84
+
85
+ /**
86
+ * Returns whether login is enabled or not
87
+ *
88
+ * @return bool
89
+ */
90
+ public function getIdinLoginActive()
91
+ {
92
+ return Mage::getStoreConfig('cmgroep_idin/login/active') == 1;
93
+ }
94
+
95
+ /**
96
+ * Returns whether age verification is enabled or not
97
+ *
98
+ * @return bool
99
+ */
100
+ public function getIdinAgeVerificationActive()
101
+ {
102
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/active') == 1;
103
+ }
104
+
105
+ /**
106
+ * Retrieves the age requirement setting
107
+ *
108
+ * @return int
109
+ */
110
+ public function getIdinAgeVerificationRequired()
111
+ {
112
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/required');
113
+ }
114
+
115
+ /**
116
+ * Determines if the age verification result should be saved
117
+ *
118
+ * @return bool
119
+ */
120
+ public function getIdinSaveAgeVerificationResult()
121
+ {
122
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/save_verification_result') == 1;
123
+ }
124
+
125
+ /**
126
+ * Determines is product notice is enabled
127
+ *
128
+ * @return bool
129
+ */
130
+ public function getIdinAgeVerificationProductNoticeSetting()
131
+ {
132
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/show_product_notice');
133
+ }
134
+
135
+ /**
136
+ * Determines is cart notice is enabled
137
+ *
138
+ * @return bool
139
+ */
140
+ public function getIdinAgeVerificationCartNoticeEnabled()
141
+ {
142
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/show_cart_notice') == 1;
143
+ }
144
+
145
+ public function registerTransaction($transactionId, $entranceCode, \CMGroep\Idin\Models\StatusResponse $statusResponse = null)
146
+ {
147
+ if ($statusResponse === null) {
148
+ Mage::getModel('cmgroep_idin/transaction')
149
+ ->setTransactionId($transactionId)
150
+ ->setEntranceCode($entranceCode)
151
+ ->save();
152
+ } else {
153
+ $matchingTransactionLogCollection = Mage::getResourceModel('cmgroep_idin/transaction_collection')
154
+ ->addFieldToFilter('transaction_id', $transactionId)
155
+ ->addFieldToFilter('entrance_code', $entranceCode)
156
+ ->setPageSize(1);
157
+
158
+ if ($matchingTransactionLogCollection->getSize() == 1 && $transactionLog = $matchingTransactionLogCollection->getFirstItem()) {
159
+ $serializedResponse = Mage::helper('cmgroep_idin/api')->serializeStatusResponse($statusResponse);
160
+ $transactionLog->setTransactionResponse($serializedResponse);
161
+ $transactionLog->save();
162
+ }
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Retrieves the cart notice to be shown
168
+ *
169
+ * @return string
170
+ */
171
+ public function getIdinAgeCartVerificationNotice()
172
+ {
173
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/cart_notice');
174
+ }
175
+
176
+ /**
177
+ * Retrieves the product notice to be shown
178
+ *
179
+ * @return string
180
+ */
181
+ public function getIdinAgeProductVerificationNotice()
182
+ {
183
+ return Mage::getStoreConfig('cmgroep_idin/age_verification/product_notice');
184
+ }
185
+
186
+ /**
187
+ * Retrieves return url for registration actions
188
+ *
189
+ * @return string
190
+ */
191
+ public function getFinishRegistrationUrl()
192
+ {
193
+ return Mage::getUrl('idin/auth/finish');
194
+ }
195
+
196
+ /**
197
+ * Retrieves return url for login actions
198
+ *
199
+ * @return string
200
+ */
201
+ public function getAuthReturnUrl()
202
+ {
203
+ return Mage::getUrl('idin/auth/auth');
204
+ }
205
+
206
+ /**
207
+ * Retrieves return url for connecting existing accounts
208
+ *
209
+ * @return string
210
+ */
211
+ public function getConnectReturnUrl()
212
+ {
213
+ return Mage::getUrl('idin/auth/connectFinish');
214
+ }
215
+
216
+ /**
217
+ * Retrieves the return url for age verification
218
+ *
219
+ * @return string
220
+ */
221
+ public function getVerifyAgeReturnUrl()
222
+ {
223
+ return Mage::getUrl('idin/auth/verifyAgeFinish');
224
+ }
225
+
226
+ /**
227
+ * Retrieves the return url for age verification initiated from
228
+ * the checkout
229
+ *
230
+ * @param $checkoutMethod
231
+ *
232
+ * @return string
233
+ */
234
+ public function getVerifyAgeCheckoutReturnUrl($checkoutMethod)
235
+ {
236
+ return Mage::getUrl('idin/auth/verifyAgeCheckoutFinish', array('checkout_method' => $checkoutMethod));
237
+ }
238
+
239
+ /**
240
+ * Returns list of issuers grouped by country
241
+ *
242
+ * @return array
243
+ */
244
+ public function getIssuerList()
245
+ {
246
+ /**
247
+ * Logic to retrieve issuers if not cached or expired (24h)
248
+ */
249
+ $cache = Mage::app()->getCache();
250
+
251
+ if ($issuers = $cache->load(self::CACHE_KEY_IDIN_ISSUERS)) {
252
+ return json_decode($issuers, true);
253
+ } else {
254
+ $issuersPerCountry = array();
255
+
256
+ $idinDirectories = Mage::helper('cmgroep_idin/api')->getDirectory();
257
+
258
+ /** @var \CMGroep\Idin\Models\DirectoryResponse $idinDirectory */
259
+ foreach ($idinDirectories as $idinDirectory) {
260
+ foreach ($idinDirectory->getIssuers() as $issuer) {
261
+ $issuersPerCountry[$idinDirectory->getCountry()][] = array(
262
+ 'issuer_id' => $issuer->getIssuerId(),
263
+ 'issuer_name' => $issuer->getIssuerName()
264
+ );
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Save issuers for 7d in cache
270
+ */
271
+ $cache->save(json_encode($issuersPerCountry), self::CACHE_KEY_IDIN_ISSUERS, array(self::CACHE_TAG_IDIN), 60*60*24*7);
272
+
273
+ return $issuersPerCountry;
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Determines if verification is required
279
+ * Checks:
280
+ * - Age Verification required or 18+ products
281
+ * - 18+ products in cart
282
+ * - Customers age verification status
283
+ *
284
+ * @param bool $skipCustomerAndQuoteCheck Skip the check if the session has been verified, just check if it should have been done
285
+ *
286
+ * @return bool
287
+ */
288
+ public function ageVerificationRequired($skipCustomerAndQuoteCheck = false)
289
+ {
290
+ $customerHelper = Mage::helper('customer');
291
+ $ageVerified = false;
292
+
293
+ if ($skipCustomerAndQuoteCheck == false) {
294
+ $quote = Mage::helper('checkout/cart')->getQuote();
295
+
296
+ if ($customerHelper->isLoggedIn()) {
297
+ /**
298
+ * Check customers verification status
299
+ */
300
+ if ($customerHelper->getCurrentCustomer()->getIdinAgeVerified()) {
301
+ $ageVerified = true;
302
+ }
303
+ } else {
304
+ /**
305
+ * Check current quote session verification status
306
+ */
307
+ if ($quote->getIdinAgeVerified()) {
308
+ $ageVerified = true;
309
+ }
310
+ }
311
+
312
+ /**
313
+ * Always verify the age when not saved and quote has not yet been verified
314
+ */
315
+ if ($this->getIdinSaveAgeVerificationResult() == false && $quote->getIdinAgeVerified() == false) {
316
+ $ageVerified = false;
317
+ }
318
+
319
+ /**
320
+ * Skip extra processing if age is verified
321
+ */
322
+ if ($ageVerified) {
323
+ return false;
324
+ }
325
+ }
326
+
327
+ if ($this->getIdinAgeVerificationRequired() == CMGroep_Idin_Model_System_Config_Source_Verificationrequired::MODE_ALWAYS) {
328
+ /**
329
+ * Verification is always required
330
+ */
331
+ return $ageVerified == false;
332
+ } elseif ($this->getIdinAgeVerificationRequired() == CMGroep_Idin_Model_System_Config_Source_Verificationrequired::MODE_PRODUCTS) {
333
+ /**
334
+ * Check cart for 18+ products
335
+ */
336
+
337
+ /** @var Mage_Sales_Model_Quote_Item[] $cartItems */
338
+ $cartItems = Mage::helper('checkout/cart')->getQuote()->getAllItems();
339
+
340
+ /** @var Mage_Sales_Model_Quote_Item $productIds */
341
+ $cartProductIds = array_map(
342
+ function ($cartItem) {
343
+ return $cartItem->getProductId();
344
+ },
345
+ $cartItems
346
+ );
347
+
348
+ $productsWithRequiredAgeVerification = Mage::getResourceModel('catalog/product_collection')
349
+ ->addAttributeToSelect('idin_require_age_verification')
350
+ ->addFieldToFilter('entity_id', array('in' => $cartProductIds))
351
+ ->addAttributeToFilter('idin_require_age_verification', 1);
352
+
353
+ if ($productsWithRequiredAgeVerification->getSize() > 0) {
354
+ return $ageVerified == false;
355
+ }
356
+ }
357
+
358
+ return false;
359
+ }
360
+ }
app/code/community/CMGroep/Idin/Model/Adminhtml/Observer.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2017 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ class CMGroep_Idin_Model_Adminhtml_Observer
33
+ {
34
+
35
+ /**
36
+ * Handles configuration changes
37
+ * - Retrieve available services
38
+ * - Enable/Disable specific product attributes
39
+ *
40
+ * @param $event
41
+ */
42
+ public function processConfigurationChanges($event)
43
+ {
44
+ $this->refreshAvailableServices();
45
+ $this->updateIdinProductAttributes();
46
+ }
47
+
48
+ /**
49
+ * Retrieves available services based on selected mode and merchant_token
50
+ */
51
+ protected function refreshAvailableServices()
52
+ {
53
+ $merchantToken = Mage::getStoreConfig('cmgroep_idin/common/merchant_token');
54
+
55
+ if ($merchantToken !== '') {
56
+ $apiHelper = Mage::helper('cmgroep_idin/api');
57
+ $merchantInformation = $apiHelper->getMerchantInformation($merchantToken);
58
+
59
+ /**
60
+ * Save available services into hidden config
61
+ */
62
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/identity', $merchantInformation->getServices()->getIdentity());
63
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/name', $merchantInformation->getServices()->getName());
64
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/address', $merchantInformation->getServices()->getAddress());
65
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/date_of_birth', $merchantInformation->getServices()->getDateOfBirth());
66
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/18y_or_older', $merchantInformation->getServices()->get18yOrOlder());
67
+ } else {
68
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/identity', 0);
69
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/name', 0);
70
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/address', 0);
71
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/date_of_birth', 0);
72
+ Mage::getConfig()->saveConfig('cmgroep_idin/services/18y_or_older', 0);
73
+ }
74
+
75
+ /**
76
+ * Disable unavailable services
77
+ */
78
+ if (Mage::getStoreConfig('cmgroep_idin/services/identity') == 0) {
79
+ Mage::getConfig()->saveConfig('cmgroep_idin/login/active', 0);
80
+ }
81
+
82
+ if (Mage::getStoreConfig('cmgroep_idin/services/name') == 0 || Mage::getStoreConfig('cmgroep_idin/services/address') == 0) {
83
+ Mage::getConfig()->saveConfig('cmgroep_idin/registration/active', 0);
84
+ }
85
+
86
+ if (Mage::getStoreConfig('cmgroep_idin/services/18y_or_older') == 0) {
87
+ Mage::getConfig()->saveConfig('cmgroep_idin/age_verification/active', 0);
88
+ }
89
+
90
+ /**
91
+ * Refresh the cache to reflect changes immediately
92
+ */
93
+ Mage::getConfig()->cleanCache();
94
+ }
95
+
96
+ /**
97
+ * If the module is de-activated, hide the iDIN 18+ Product Attribute
98
+ */
99
+ protected function updateIdinProductAttributes()
100
+ {
101
+ $moduleStatus = Mage::getStoreConfig('cmgroep_idin/common/active');
102
+
103
+ if ($moduleStatus == 0) {
104
+ $attributeApi = Mage::getModel('catalog/product_attribute_api');
105
+ $attributeData = array('is_visible' => false);
106
+ $attributeApi->update('idin_require_age_verification', $attributeData);
107
+ } else {
108
+ $attributeApi = Mage::getModel('catalog/product_attribute_api');
109
+ $attributeData = array('is_visible' => true);
110
+ $attributeApi->update('idin_require_age_verification', $attributeData);
111
+ }
112
+ }
113
+
114
+ /**
115
+ * On config initialisation, add frontend classes for available services
116
+ *
117
+ * @param $event
118
+ */
119
+ public function updateAvailableServices($event)
120
+ {
121
+ /** @var Mage_Core_Model_Config_Base $config */
122
+ $config = $event->getConfig();
123
+
124
+ /** @var Mage_Core_Model_Config_Element $idinGroups */
125
+ $idinGroups = $config->getNode('sections/cmgroep_idin/groups')->children();
126
+
127
+ /** @var Mage_Core_Model_Config_Element $idinGroup */
128
+ foreach ($idinGroups as $idinGroup) {
129
+ if ($idinGroup->required_services) {
130
+ $frontendClass = 'available-idin-service';
131
+ $requiredServices = explode(',', $idinGroup->required_services);
132
+
133
+ foreach ($requiredServices as $requiredService) {
134
+ if (Mage::getStoreConfig('cmgroep_idin/services/' . $requiredService) == 0) {
135
+ $frontendClass = 'unavailable-idin-service';
136
+ break;
137
+ }
138
+ }
139
+
140
+ $idinGroup->frontend_class = $frontendClass;
141
+ }
142
+ }
143
+ }
144
+ }
app/code/community/CMGroep/Idin/Model/Entity/Setup.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_Entity_Setup extends Mage_Eav_Model_Entity_Setup
33
+ {
34
+ /**
35
+ * Adds required customer attributes
36
+ *
37
+ * @return bool
38
+ */
39
+ public function addCustomerAttributes()
40
+ {
41
+ /**
42
+ * Retrieve Customer Entity Defaults
43
+ */
44
+ $entityTypeId = $this->getEntityTypeId('customer');
45
+ $defaultAttributeSetId = $this->getDefaultAttributeSetId($entityTypeId);
46
+ $defaultAttributeGroupId = $this->getDefaultAttributeGroupId($entityTypeId, $defaultAttributeSetId);
47
+
48
+ /**
49
+ * Add iDIN attributes to Customer Entity
50
+ */
51
+ $this->addAttribute(
52
+ $entityTypeId,
53
+ 'idin_bin',
54
+ array(
55
+ 'type' => 'varchar',
56
+ 'label' => 'iDIN Bin Token',
57
+ 'required' => false,
58
+ 'visible' => false,
59
+ 'user_defined' => 0
60
+ )
61
+ );
62
+
63
+ $this->addAttribute(
64
+ $entityTypeId,
65
+ 'idin_age_verified',
66
+ array(
67
+ 'type' => 'int',
68
+ 'label' => 'iDIN Age Verified',
69
+ 'required' => false,
70
+ 'visible' => false,
71
+ 'user_defined' => 0
72
+ )
73
+ );
74
+
75
+ $this->addAttributeToGroup($entityTypeId, $defaultAttributeSetId, $defaultAttributeGroupId, 'idin_bin');
76
+
77
+ return true;
78
+ }
79
+
80
+ /**
81
+ * Adds required product attributes
82
+ *
83
+ * @return bool
84
+ */
85
+ public function addProductAttributes()
86
+ {
87
+ $entityTypeId = $this->getEntityTypeId(Mage_Catalog_Model_Product::ENTITY);
88
+
89
+ $this->addAttribute(
90
+ $entityTypeId,
91
+ 'idin_require_age_verification',
92
+ array(
93
+ 'group' => Mage::helper('cmgroep_idin')->__('iDIN'),
94
+ 'label' => Mage::helper('cmgroep_idin')->__('18+ Product'),
95
+ 'type' => 'int',
96
+ 'input' => 'boolean',
97
+ 'source_model' => 'eav/entity_attribute_source_boolean',
98
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
99
+ 'visible' => true,
100
+ 'required' => false,
101
+ 'default' => 0
102
+ )
103
+ );
104
+
105
+ return true;
106
+ }
107
+ }
app/code/community/CMGroep/Idin/Model/Observer.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_Observer
33
+ {
34
+ /**
35
+ * Checks if order requires age verification and blocks the action if so
36
+ *
37
+ * @param $event
38
+ *
39
+ * @throws Mage_Core_Exception
40
+ */
41
+ public function salesOrderPlaceBefore($event)
42
+ {
43
+ /**
44
+ * Check if age verification is still required
45
+ */
46
+ if (Mage::helper('cmgroep_idin')->ageVerificationRequired() && Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive() && Mage::helper('cmgroep_idin')->getExtensionActive()) {
47
+ Mage::throwException(Mage::helper('cmgroep_idin')->__('Can\'t place order, please verify your age in order to continue.'));
48
+ }
49
+ }
50
+ }
app/code/community/CMGroep/Idin/Model/Resource/Setup.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
33
+ {
34
+ /**
35
+ * Creates table for pending registrations
36
+ *
37
+ * @return bool
38
+ * @throws Zend_Db_Exception
39
+ */
40
+ public function createPendingRegistrationsTable()
41
+ {
42
+ $tableName = $this->getTable('cmgroep_idin/transaction');
43
+ $table = $this->getConnection()->newTable($tableName)
44
+ ->addColumn(
45
+ 'entity_id',
46
+ Varien_Db_Ddl_Table::TYPE_INTEGER,
47
+ null,
48
+ array(
49
+ 'primary' => true,
50
+ 'unsigned' => true,
51
+ 'identity' => true,
52
+ 'nullable' => false
53
+ ),
54
+ 'Entity Identifier'
55
+ )
56
+ ->addColumn(
57
+ 'transaction_date',
58
+ Varien_Db_Ddl_Table::TYPE_DATETIME,
59
+ null,
60
+ array(
61
+ 'nullable' => false
62
+ ),
63
+ 'Transaction Data'
64
+ )
65
+ ->addColumn(
66
+ 'entrance_code',
67
+ Varien_Db_Ddl_Table::TYPE_TEXT,
68
+ 40,
69
+ array(
70
+ 'nullable' => false
71
+ ),
72
+ 'Entrance Code'
73
+ )
74
+ ->addColumn(
75
+ 'transaction_id',
76
+ Varien_Db_Ddl_Table::TYPE_TEXT,
77
+ 255,
78
+ array(
79
+ 'nullable' => false
80
+ ),
81
+ 'Transaction ID'
82
+ )
83
+ ->addColumn(
84
+ 'customer_id',
85
+ Varien_Db_Ddl_Table::TYPE_INTEGER,
86
+ null,
87
+ array(
88
+ 'nullable' => true
89
+ ),
90
+ 'Customer ID for existing customers'
91
+ )
92
+ ->addColumn(
93
+ 'quote_id',
94
+ Varien_Db_Ddl_Table::TYPE_INTEGER,
95
+ null,
96
+ array(
97
+ 'nullable' => true
98
+ ),
99
+ 'Quote ID for guest checkout'
100
+ )
101
+ ->addColumn(
102
+ 'transaction_response',
103
+ Varien_Db_Ddl_Table::TYPE_TEXT,
104
+ null,
105
+ array(
106
+ 'nullable' => true
107
+ ),
108
+ 'Transaction Response'
109
+ )
110
+ ->addIndex(
111
+ $this->getConnection()->getIndexName(
112
+ $tableName,
113
+ array('entrance_code', 'transaction_id')
114
+ ),
115
+ array('entrance_code', 'transaction_id')
116
+ );
117
+
118
+ $this->getConnection()->createTable($table);
119
+
120
+ return true;
121
+ }
122
+
123
+ /**
124
+ * Adds extra column to quote table for age verification
125
+ *
126
+ * @return bool
127
+ */
128
+ public function addExtraColumnsToQuoteTable()
129
+ {
130
+ $tableName = $this->getTable('sales/quote');
131
+ $this->getConnection()->addColumn(
132
+ $tableName,
133
+ 'idin_age_verified',
134
+ array(
135
+ 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
136
+ 'length' => 1,
137
+ 'nullable' => false,
138
+ 'default' => 0,
139
+ 'comment' => 'iDIN Age Verification Status'
140
+ )
141
+ );
142
+
143
+ return true;
144
+ }
145
+ }
app/code/community/CMGroep/Idin/Model/Resource/Transaction.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_Resource_Transaction extends Mage_Core_Model_Resource_Db_Abstract
33
+ {
34
+ protected function _construct()
35
+ {
36
+ $this->_init('cmgroep_idin/transaction', 'entity_id');
37
+ }
38
+ }
app/code/community/CMGroep/Idin/Model/Resource/Transaction/Collection.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_Resource_Transaction_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
33
+ {
34
+ protected function _construct()
35
+ {
36
+ $this->_init('cmgroep_idin/transaction');
37
+ }
38
+
39
+ public function joinOrderTable()
40
+ {
41
+ $this->getSelect()
42
+ ->joinLeft(
43
+ array('order' => $this->getTable('sales/order')),
44
+ 'order.quote_id = main_table.quote_id',
45
+ array('order_increment_id' => 'increment_id')
46
+ );
47
+ }
48
+ }
app/code/community/CMGroep/Idin/Model/System/Config/Source/Mode.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_System_Config_Source_Mode
33
+ {
34
+ const GATEWAY_TEST = 'https://idin.cmtelecom.com/idin/v1.0/test';
35
+ const GATEWAY_LIVE = 'https://idin.cmtelecom.com/idin/v1.0';
36
+
37
+ const MODE_TEST = 0;
38
+ const MODE_LIVE = 1;
39
+
40
+ /**
41
+ * Options getter
42
+ *
43
+ * @return array
44
+ */
45
+ public function toOptionArray()
46
+ {
47
+ return array(
48
+ array('value' => self::MODE_TEST, 'label' => Mage::helper('cmgroep_idin')->__('Test')),
49
+ array('value' => self::MODE_LIVE, 'label' => Mage::helper('cmgroep_idin')->__('Live')),
50
+ );
51
+ }
52
+
53
+ /**
54
+ * Get options in "key-value" format
55
+ *
56
+ * @return array
57
+ */
58
+ public function toArray()
59
+ {
60
+ return array(
61
+ self::MODE_TEST => Mage::helper('cmgroep_idin')->__('Test'),
62
+ self::MODE_LIVE => Mage::helper('cmgroep_idin')->__('Live'),
63
+ );
64
+ }
65
+ }
app/code/community/CMGroep/Idin/Model/System/Config/Source/Showproductnotice.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_System_Config_Source_Showproductnotice
33
+ {
34
+ const MODE_NO = 0;
35
+ const MODE_ALWAYS = 1;
36
+ const MODE_PRODUCTS = 2;
37
+
38
+ /**
39
+ * Options getter
40
+ *
41
+ * @return array
42
+ */
43
+ public function toOptionArray()
44
+ {
45
+ return array(
46
+ array('value' => self::MODE_NO, 'label' => Mage::helper('cmgroep_idin')->__('No')),
47
+ array('value' => self::MODE_ALWAYS, 'label' => Mage::helper('cmgroep_idin')->__('Always')),
48
+ array('value' => self::MODE_PRODUCTS, 'label' => Mage::helper('cmgroep_idin')->__('Only 18+ products')),
49
+ );
50
+ }
51
+
52
+ /**
53
+ * Get options in "key-value" format
54
+ *
55
+ * @return array
56
+ */
57
+ public function toArray()
58
+ {
59
+ return array(
60
+ self::MODE_NO => Mage::helper('cmgroep_idin')->__('No'),
61
+ self::MODE_ALWAYS => Mage::helper('cmgroep_idin')->__('Always'),
62
+ self::MODE_PRODUCTS => Mage::helper('cmgroep_idin')->__('Only 18+ products'),
63
+ );
64
+ }
65
+ }
app/code/community/CMGroep/Idin/Model/System/Config/Source/Verificationrequired.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Model_System_Config_Source_Verificationrequired
33
+ {
34
+ const MODE_ALWAYS = 1;
35
+ const MODE_PRODUCTS = 2;
36
+
37
+ /**
38
+ * Options getter
39
+ *
40
+ * @return array
41
+ */
42
+ public function toOptionArray()
43
+ {
44
+ return array(
45
+ array('value' => self::MODE_ALWAYS, 'label' => Mage::helper('cmgroep_idin')->__('Always')),
46
+ array('value' => self::MODE_PRODUCTS, 'label' => Mage::helper('cmgroep_idin')->__('Only 18+ products')),
47
+ );
48
+ }
49
+
50
+ /**
51
+ * Get options in "key-value" format
52
+ *
53
+ * @return array
54
+ */
55
+ public function toArray()
56
+ {
57
+ return array(
58
+ self::MODE_ALWAYS => Mage::helper('cmgroep_idin')->__('Always'),
59
+ self::MODE_PRODUCTS => Mage::helper('cmgroep_idin')->__('Only 18+ products'),
60
+ );
61
+ }
62
+ }
app/code/community/CMGroep/Idin/Model/Transaction.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ /**
33
+ * @method int getRegistrationId()
34
+ * @method CMGroep_Idin_Model_Transaction setRegistrationId(int $value)
35
+ * @method string getTransactionDate()
36
+ * @method CMGroep_Idin_Model_Transaction setTransactionDate(string $value)
37
+ * @method string getEntranceCode()
38
+ * @method CMGroep_Idin_Model_Transaction setEntranceCode(string $value)
39
+ * @method string getTransactionId()
40
+ * @method CMGroep_Idin_Model_Transaction setTransactionId(string $value)
41
+ * @method string getCustomerId()
42
+ * @method CMGroep_Idin_Model_Transaction setCustomerId(string $value)
43
+ * @method string getQuoteId()
44
+ * @method CMGroep_Idin_Model_Transaction setQuoteId(string $value)
45
+ *
46
+ * Class CMGroep_Idin_Model_Transaction
47
+ */
48
+ class CMGroep_Idin_Model_Transaction extends Mage_Core_Model_Abstract
49
+ {
50
+ protected function _construct()
51
+ {
52
+ $this->_init('cmgroep_idin/transaction');
53
+ }
54
+
55
+ /**
56
+ * Set transaction date before save
57
+ *
58
+ * @return CMGroep_Idin_Model_Transaction
59
+ */
60
+ public function _beforeSave()
61
+ {
62
+ if ($this->isObjectNew()) {
63
+ $this->setTransactionDate(Varien_Date::now());
64
+ }
65
+
66
+ return parent::_beforeSave();
67
+ }
68
+
69
+ /**
70
+ * Set transaction response
71
+ *
72
+ * @param $value
73
+ */
74
+ public function setTransactionResponse($value)
75
+ {
76
+ /**
77
+ * Encrypt response before saving
78
+ */
79
+ $encryptedResponse = Mage::helper('core')->encrypt($value);
80
+ $this->setData('transaction_response', $encryptedResponse);
81
+ }
82
+
83
+ /**
84
+ * Retrieve transaction response
85
+ *
86
+ * @return string
87
+ */
88
+ public function getTransactionResponse()
89
+ {
90
+ /**
91
+ * Decrypt response before returning
92
+ */
93
+ $decryptedResponse = Mage::helper('core')->decrypt($this->getData('transaction_response'));
94
+
95
+ return $decryptedResponse;
96
+ }
97
+ }
app/code/community/CMGroep/Idin/controllers/Adminhtml/Idin/TransactionController.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_Adminhtml_Idin_TransactionController extends Mage_Adminhtml_Controller_Action
33
+ {
34
+ /**
35
+ * ACL
36
+ *
37
+ * @return bool
38
+ */
39
+ protected function _isAllowed()
40
+ {
41
+ return Mage::getSingleton('admin/session')->isAllowed('system/tools/idin_transaction_log');
42
+ }
43
+
44
+ /**
45
+ * Load and render layout
46
+ */
47
+ public function indexAction()
48
+ {
49
+ $this->loadLayout();
50
+ $this->renderLayout();
51
+ }
52
+
53
+ /**
54
+ * Load and render layout
55
+ */
56
+ public function detailsAction()
57
+ {
58
+ $this->loadLayout();
59
+ $this->renderLayout();
60
+ }
61
+ }
app/code/community/CMGroep/Idin/controllers/AuthController.php ADDED
@@ -0,0 +1,694 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_AuthController extends Mage_Core_Controller_Front_Action
33
+ {
34
+ /**
35
+ * Retrieves the session
36
+ *
37
+ * @return Mage_Core_Model_Session
38
+ */
39
+ protected function _getSession()
40
+ {
41
+ return Mage::getSingleton('core/session');
42
+ }
43
+
44
+ /**
45
+ * Dispatches the form request to the correct action based on the action
46
+ * picked by the user
47
+ */
48
+ public function indexAction()
49
+ {
50
+ if ($this->getRequest()->isPost()) {
51
+ if ($this->getRequest()->has('form_action') && $this->getRequest()->has('idin_issuer')) {
52
+ if ($this->getRequest()->get('idin_issuer') == '') {
53
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Please select your bank'));
54
+ $this->_redirectReferer();
55
+ return;
56
+ }
57
+
58
+ if ($this->getRequest()->getParam('form_action') == 'register') {
59
+ $this->_redirect('*/*/registration', $this->getRequest()->getParams());
60
+ return;
61
+ } else if ($this->getRequest()->getParam('form_action') == 'login') {
62
+ $this->_redirect('*/*/login', $this->getRequest()->getParams());
63
+ return;
64
+ }
65
+ }
66
+ }
67
+
68
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid action'));
69
+ $this->_redirectReferer();
70
+ }
71
+
72
+ /**
73
+ * Starts new iDIN transaction for registration and redirects the
74
+ * user to the Authentication URL of issuer
75
+ *
76
+ * @throws Exception
77
+ */
78
+ public function registrationAction()
79
+ {
80
+ $dataHelper = Mage::helper('cmgroep_idin');
81
+ $apiHelper = Mage::helper('cmgroep_idin/api');
82
+ $entranceCode = $apiHelper->generateEntranceCode();
83
+
84
+ $transaction = Mage::helper('cmgroep_idin/api_transaction')
85
+ ->start(
86
+ $this->getRequest()->getParam('idin_issuer'),
87
+ $entranceCode,
88
+ $dataHelper->getFinishRegistrationUrl()
89
+ )
90
+ ->withIdentity()
91
+ ->withName()
92
+ ->withAddress();
93
+
94
+ $transactionResponse = $transaction->execute();
95
+
96
+ /**
97
+ * Check if transaction was successful
98
+ */
99
+ if ($transactionResponse instanceof \CMGroep\Idin\Models\Error) {
100
+ $this->_getSession()->addError($transactionResponse->getMessage());
101
+ $this->_redirectReferer();
102
+ return;
103
+ }
104
+
105
+ /**
106
+ * Save transaction for reference
107
+ */
108
+ $transactionLog = Mage::getModel('cmgroep_idin/transaction')
109
+ ->setEntranceCode($entranceCode)
110
+ ->setTransactionId($transactionResponse->getTransactionId());
111
+
112
+ if ($this->getRequest()->has('checkout') && $this->getRequest()->getParam('checkout') == 1) {
113
+ $transactionLog->setQuoteId(Mage::helper('checkout/cart')->getQuote()->getId());
114
+ }
115
+
116
+ $transactionLog->save();
117
+
118
+ $this->_redirectUrl($transactionResponse->getIssuerAuthenticationUrl());
119
+ }
120
+
121
+ /**
122
+ * Registration return URL for issuers. Shows user form to finish registration.
123
+ */
124
+ public function finishAction()
125
+ {
126
+ if ($this->getRequest()->has('trxid') && $this->getRequest()->has('ec')) {
127
+ $matchingTransactionLogCollection = Mage::getResourceModel('cmgroep_idin/transaction_collection')
128
+ ->addFieldToFilter('transaction_id', $this->getRequest()->getParam('trxid'))
129
+ ->addFieldToFilter('entrance_code', $this->getRequest()->getParam('ec'))
130
+ ->setPageSize(1);
131
+
132
+ if ($matchingTransactionLogCollection->getSize() == 1 && $transactionLog = $matchingTransactionLogCollection->getFirstItem()) {
133
+
134
+ /**
135
+ * Only retrieve response the first time, consecutive requests will fetch it from the DB.
136
+ */
137
+ if (empty($transactionLog->getTransactionResponse())) {
138
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->getTransactionStatus($transactionLog->getTransactionId());
139
+
140
+ /**
141
+ * Check if transaction was successful
142
+ */
143
+ if ($transactionStatus instanceof \CMGroep\Idin\Models\Error) {
144
+ $this->_getSession()->addError($transactionStatus->getMessage());
145
+ $this->_redirect('customer/account/login');
146
+ return;
147
+ }
148
+
149
+ $transactionLog->setTransactionResponse(Mage::helper('cmgroep_idin/api')->serializeStatusResponse($transactionStatus));
150
+ $transactionLog->save();
151
+ } else {
152
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->deserializeStatusResponse($transactionLog->getTransactionResponse());
153
+ }
154
+
155
+ /**
156
+ * Check if transaction has not been cancelled
157
+ */
158
+ if ($transactionStatus->getStatus() == 'cancelled') {
159
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('The iDIN transaction has been cancelled.'));
160
+ $this->_redirect('customer/account/login');
161
+ return;
162
+ }
163
+
164
+ /**
165
+ * Check if transaction was successful
166
+ */
167
+ if ($transactionStatus->getStatus() != 'success') {
168
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('iDIN verification failed. Please try again later.'));
169
+ $this->_redirect('customer/account/login');
170
+ return;
171
+ }
172
+
173
+ /**
174
+ * Check if iDIN bin is already registered, if so
175
+ * redirect customer to login page
176
+ */
177
+ if (Mage::getResourceModel('customer/customer_collection')
178
+ ->addFieldToFilter('idin_bin', $transactionStatus->getBin())
179
+ ->getSize() > 0) {
180
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('An account with your identity already exists, please login in order to continue.'));
181
+ $this->_redirect('customer/account/login');
182
+ return;
183
+ }
184
+
185
+ $this->_getSession()->addSuccess(
186
+ Mage::helper('cmgroep_idin')->__('iDIN verification succeeded, please finish your registration.')
187
+ );
188
+
189
+ $this->loadLayout();
190
+ $this->renderLayout();
191
+ return;
192
+ }
193
+ }
194
+
195
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid data returned from iDIN issuer'));
196
+ $this->_redirect('customer/account/login');
197
+ }
198
+
199
+ /**
200
+ * Finishes registration after entering an email address
201
+ * and starts a session for the newly created user
202
+ */
203
+ public function registerAction()
204
+ {
205
+ if ($this->getRequest()->isPost() &&
206
+ $this->getRequest()->has('trxid') &&
207
+ $this->getRequest()->has('ec') && $this->getRequest()->has('email')) {
208
+ $transactionLogCollection = Mage::getResourceModel('cmgroep_idin/transaction_collection')
209
+ ->addFieldToFilter('transaction_id', $this->getRequest()->getParam('trxid'))
210
+ ->addFieldToFilter('entrance_code', $this->getRequest()->getParam('ec'))
211
+ ->setPageSize(1);
212
+
213
+ /** @var CMGroep_Idin_Model_Transaction $transactionLog */
214
+ if ($transactionLogCollection->getSize() == 1 && $transactionLog = $transactionLogCollection->getFirstItem()) {
215
+ /**
216
+ * Check if email address is available, otherwise
217
+ * return user to form
218
+ */
219
+ if (Mage::getResourceModel('customer/customer_collection')
220
+ ->addFieldToFilter('email', $this->getRequest()->getParam('email'))
221
+ ->getSize() > 0) {
222
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Emailaddress is already in use'));
223
+ $this->_redirect('*/*/finish', array('trxid' => $this->getRequest()->getParam('trxid'), 'ec' => $this->getRequest()->getParam('ec')));
224
+ return;
225
+ }
226
+
227
+ /**
228
+ * Get status of transaction
229
+ */
230
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->deserializeStatusResponse($transactionLog->getTransactionResponse());
231
+
232
+ /**
233
+ * Verify optionally specified password
234
+ */
235
+ if ($this->getRequest()->has('password') && $this->getRequest()->get('password') !== '') {
236
+ if ($this->getRequest()->get('password') != $this->getRequest()->get('password_confirm')) {
237
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Please make sure your passwords match'));
238
+ $this->_redirectReferer();
239
+ return;
240
+ }
241
+ }
242
+
243
+ /**
244
+ * Create user account and login
245
+ */
246
+ if ($customer = Mage::helper('cmgroep_idin/customer')->createCustomer($this->getRequest()->getParam('email'), $this->getRequest()->getParam('phone_number'), $this->getRequest()->getParam('password'), $transactionStatus)) {
247
+ $transactionLog->setCustomerId($customer->getId());
248
+ $transactionLog->save();
249
+
250
+ if (Mage::helper('cmgroep_idin/customer')->startSessionForCustomer($customer)) {
251
+ $this->_getSession()->addSuccess(Mage::helper('cmgroep_idin')->__('Succesfully registered with iDIN!'));
252
+
253
+ if ($transactionLog->getQuoteId()) {
254
+ /** @var Mage_Sales_Model_Quote $quoteModel */
255
+ $quoteModel = Mage::getModel('sales/quote')->load($transactionLog->getQuoteId());
256
+ $quoteModel->assignCustomer($customer);
257
+ $quoteModel->setIsActive(true);
258
+ $quoteModel->save();
259
+
260
+ $this->_getSession()->setData('idin_checkout_method', 'customer');
261
+ Mage::getSingleton('checkout/session')->loadCustomerQuote();
262
+ $this->_redirectUrl(Mage::helper('checkout/url')->getCheckoutUrl());
263
+ } else {
264
+ $this->_redirect('customer/account');
265
+ }
266
+ } else {
267
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Could not create a new customer session!'));
268
+ $this->_redirect('/');
269
+ }
270
+ } else {
271
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Failed to create a new account!'));
272
+ $this->_redirect('/');
273
+ }
274
+ }
275
+ }
276
+ }
277
+
278
+ /**
279
+ * Starts a new iDIN identity transaction and redirects user to the
280
+ * Authentication URL of issuer
281
+ */
282
+ public function loginAction()
283
+ {
284
+ $dataHelper = Mage::helper('cmgroep_idin');
285
+ $apiHelper = Mage::helper('cmgroep_idin/api');
286
+ $entranceCode = $apiHelper->generateEntranceCode();
287
+
288
+ $transactionResponse = Mage::helper('cmgroep_idin/api_transaction')
289
+ ->start($this->getRequest()->getParam('idin_issuer'), $entranceCode, $dataHelper->getAuthReturnUrl())
290
+ ->withIdentity()
291
+ ->execute();
292
+
293
+ /**
294
+ * Check if transaction was successful
295
+ */
296
+ if ($transactionResponse instanceof \CMGroep\Idin\Models\Error) {
297
+ $this->_getSession()->addError($transactionResponse->getMessage());
298
+ $this->_redirectReferer();
299
+ return;
300
+ }
301
+
302
+ $dataHelper->registerTransaction($transactionResponse->getTransactionId(), $entranceCode);
303
+
304
+ $this->_redirectUrl($transactionResponse->getIssuerAuthenticationUrl());
305
+ }
306
+
307
+ /**
308
+ * Starts a new session based on the identified customer's bin token
309
+ */
310
+ public function authAction()
311
+ {
312
+ if ($this->getRequest()->has('trxid') && $this->getRequest()->has('ec')) {
313
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->getTransactionStatus($this->getRequest()->getParam('trxid'));
314
+
315
+ /**
316
+ * Check if transaction was successful
317
+ */
318
+ if ($transactionStatus instanceof \CMGroep\Idin\Models\Error) {
319
+ $this->_getSession()->addError($transactionStatus->getMessage());
320
+ $this->_redirect('customer/account/login');
321
+ return;
322
+ }
323
+
324
+ Mage::helper('cmgroep_idin')->registerTransaction($this->getRequest()->getParam('trxid'), $this->getRequest()->getParam('ec'), $transactionStatus);
325
+
326
+ if ($transactionStatus->getStatus() == 'success') {
327
+ $idinBin = $transactionStatus->getBin();
328
+ $customerCollection = Mage::getResourceModel('customer/customer_collection')
329
+ ->addFieldToFilter('idin_bin', $idinBin)
330
+ ->setPageSize(1);
331
+
332
+ if ($customerCollection->getSize() == 1) {
333
+ $customer = $customerCollection->getFirstItem();
334
+
335
+ if (Mage::helper('cmgroep_idin/customer')->startSessionForCustomer($customer)) {
336
+ $this->_getSession()->addSuccess(Mage::helper('cmgroep_idin')->__('Succesfully logged in with iDIN!'));
337
+ $this->_redirect('customer/account');
338
+ } else {
339
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Could not create a new customer session!'));
340
+ $this->_redirect('/');
341
+ }
342
+ } else {
343
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Could not find a matching account, please make sure your account is linked with iDIN or create an account by registering with iDIN below.'));
344
+ $this->_redirect('customer/account/login');
345
+ return;
346
+ }
347
+ } elseif ($transactionStatus->getStatus() == 'cancelled') {
348
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('The iDIN transaction has been cancelled.'));
349
+ $this->_redirect('customer/account/login');
350
+ return;
351
+ } else {
352
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('iDIN transaction failed. Please try again later.'));
353
+ $this->_redirect('customer/account/login');
354
+ return;
355
+ }
356
+ }
357
+ }
358
+
359
+ /**
360
+ * Starts a new iDIN transaction for connecting an existing account
361
+ * with iDIN
362
+ */
363
+ public function connectAction()
364
+ {
365
+ if ($this->getRequest()->isPost() && $this->getRequest()->has('idin_issuer')) {
366
+ if (Mage::helper('customer')->isLoggedIn()) {
367
+ $customer = Mage::helper('customer')->getCurrentCustomer();
368
+
369
+ /**
370
+ * Check if customer is not connected to iDIN already
371
+ */
372
+ if (empty($customer->getIdinBin())) {
373
+ $dataHelper = Mage::helper('cmgroep_idin');
374
+ $apiHelper = Mage::helper('cmgroep_idin/api');
375
+ $entranceCode = $apiHelper->generateEntranceCode();
376
+
377
+ $transaction = Mage::helper('cmgroep_idin/api_transaction')
378
+ ->start($this->getRequest()->getParam('idin_issuer'), $entranceCode, $dataHelper->getConnectReturnUrl())
379
+ ->withIdentity();
380
+
381
+ $transactionResponse = $transaction->execute();
382
+
383
+ /**
384
+ * Check if transaction was successful
385
+ */
386
+ if ($transactionResponse instanceof \CMGroep\Idin\Models\Error) {
387
+ $this->_getSession()->addError($transactionResponse->getMessage());
388
+ $this->_redirectReferer();
389
+ return;
390
+ }
391
+
392
+ /**
393
+ * Log transaction referencing existing customer
394
+ */
395
+ Mage::getModel('cmgroep_idin/transaction')
396
+ ->setTransactionId($transactionResponse->getTransactionId())
397
+ ->setEntranceCode($entranceCode)
398
+ ->setCustomerId($customer->getId())
399
+ ->save();
400
+
401
+ $this->_redirectUrl($transactionResponse->getIssuerAuthenticationUrl());
402
+ return;
403
+ }
404
+ }
405
+ }
406
+
407
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid request data'));
408
+ $this->_redirectReferer();
409
+ }
410
+
411
+ /**
412
+ * Callback function for iDIN transaction
413
+ * Saves iDIN details to connect an existing account
414
+ */
415
+ public function connectFinishAction()
416
+ {
417
+ if ($this->getRequest()->has('trxid') && $this->getRequest()->has('ec')) {
418
+ $matchingTransactions = Mage::getResourceModel('cmgroep_idin/transaction_collection')
419
+ ->addFieldToFilter('transaction_id', $this->getRequest()->getParam('trxid'))
420
+ ->addFieldToFilter('entrance_code', $this->getRequest()->getParam('ec'))
421
+ ->setPageSize(1);
422
+
423
+ if ($matchingTransactions->getSize() == 1) {
424
+ /** @var CMGroep_Idin_Model_Transaction $transaction */
425
+ $transaction = $matchingTransactions->getFirstItem();
426
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->getTransactionStatus($transaction->getTransactionId());
427
+
428
+ /**
429
+ * Check if transaction was successful
430
+ */
431
+ if ($transactionStatus instanceof \CMGroep\Idin\Models\Error) {
432
+ $this->_getSession()->addError($transactionStatus->getMessage());
433
+ $this->_redirect('customer/account/index');
434
+ return;
435
+ }
436
+
437
+ Mage::helper('cmgroep_idin')->registerTransaction($transaction->getTransactionId(), $transaction->getEntranceCode(), $transactionStatus);
438
+
439
+ /**
440
+ * Check if transaction has not been cancelled
441
+ */
442
+ if ($transactionStatus->getStatus() == 'cancelled') {
443
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('The iDIN transaction has been cancelled.'));
444
+ $this->_redirect('customer/account/index');
445
+ return;
446
+ }
447
+
448
+ /**
449
+ * Check if transaction was successful
450
+ */
451
+ if ($transactionStatus->getStatus() != 'success') {
452
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('iDIN transaction failed. Please try again later.'));
453
+ $this->_redirect('customer/account/login');
454
+ return;
455
+ }
456
+
457
+ /**
458
+ * Cache Customer ID and remove transaction record
459
+ */
460
+ $registrationCustomerId = $transaction->getCustomerId();
461
+
462
+ /**
463
+ * Check if bin already exists
464
+ */
465
+ $customersWithSameBin = Mage::getResourceModel('customer/customer_collection')
466
+ ->addFieldToFilter('idin_bin', $transactionStatus->getBin())
467
+ ->count();
468
+
469
+ if ($customersWithSameBin == 0) {
470
+ $customer = Mage::getModel('customer/customer')->load($registrationCustomerId);
471
+ $customer->setIdinBin($transactionStatus->getBin());
472
+
473
+ if (Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()) {
474
+ $customer->setIdinAgeVerified($transactionStatus->getAge()->get18yOrOlder() ? 1 : 0);
475
+ }
476
+
477
+ $customer->save();
478
+
479
+ $this->_getSession()->addSuccess(Mage::helper('cmgroep_idin')->__('Succesfully connected your account with iDIN!'));
480
+ $this->_redirect('customer/account/index');
481
+ return;
482
+ } else {
483
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('A customer with the same iDIN identity already exists!'));
484
+ $this->_redirect('customer/account/index');
485
+ return;
486
+ }
487
+ }
488
+ }
489
+
490
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid request data'));
491
+ $this->_redirect('/');
492
+ }
493
+
494
+ /**
495
+ * Starts a new age verification transaction
496
+ * Supported from both the checkout as the customer's my account page
497
+ */
498
+ public function verifyAgeAction()
499
+ {
500
+ if ($this->getRequest()->isPost() && $this->getRequest()->has('idin_issuer')) {
501
+ $dataHelper = Mage::helper('cmgroep_idin');
502
+ $apiHelper = Mage::helper('cmgroep_idin/api');
503
+ $entranceCode = $apiHelper->generateEntranceCode();
504
+
505
+ $verifyAgeUrl = $dataHelper->getVerifyAgeReturnUrl();
506
+ if ($this->getRequest()->has('mode') && $this->getRequest()->getParam('mode') == 'checkout') {
507
+ $verifyAgeUrl = $dataHelper->getVerifyAgeCheckoutReturnUrl($this->getRequest()->getParam('checkout_method'));
508
+ }
509
+
510
+ /**
511
+ * Log transaction referencing existing customer or quote
512
+ */
513
+ $transactionLog = Mage::getModel('cmgroep_idin/transaction')
514
+ ->setEntranceCode($entranceCode);
515
+
516
+ if (Mage::helper('customer')->isLoggedIn()) {
517
+ $customer = Mage::helper('customer')->getCurrentCustomer();
518
+ $transactionLog->setCustomerId($customer->getId());
519
+ }
520
+
521
+ if ($this->getRequest()->get('mode') == 'checkout') {
522
+ $transactionLog->setQuoteId(Mage::helper('checkout')->getQuote()->getId());
523
+ }
524
+
525
+ if (($this->getRequest()->has('mode') && $this->getRequest()->getParam('mode') == 'checkout') ||
526
+ ($this->getRequest()->has('mode') == false && Mage::helper('customer')->isLoggedIn())) {
527
+ $transaction = Mage::helper('cmgroep_idin/api_transaction')
528
+ ->start($this->getRequest()->getParam('idin_issuer'), $entranceCode, $verifyAgeUrl)
529
+ ->withIdentity()
530
+ ->with18yOrOlder();
531
+
532
+ $transactionResponse = $transaction->execute();
533
+
534
+ /**
535
+ * Check if transaction was successful
536
+ */
537
+ if ($transactionResponse instanceof \CMGroep\Idin\Models\Error) {
538
+ $this->_getSession()->addError($transactionResponse->getMessage());
539
+ $this->_redirectReferer();
540
+ return;
541
+ }
542
+
543
+ $transactionLog->setTransactionId($transactionResponse->getTransactionId())
544
+ ->save();
545
+
546
+ $this->_redirectUrl($transactionResponse->getIssuerAuthenticationUrl());
547
+ return;
548
+ }
549
+ }
550
+
551
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid request data'));
552
+ $this->_redirectReferer();
553
+ }
554
+
555
+ /**
556
+ * Callback function for iDIN age verification transaction
557
+ * Stores the result of the transaction on the customer
558
+ */
559
+ public function verifyAgeFinishAction()
560
+ {
561
+ if ($this->getRequest()->has('trxid') && $this->getRequest()->has('ec')) {
562
+ $matchingTransactions = Mage::getResourceModel('cmgroep_idin/transaction_collection')
563
+ ->addFieldToFilter('transaction_id', $this->getRequest()->getParam('trxid'))
564
+ ->addFieldToFilter('entrance_code', $this->getRequest()->getParam('ec'))
565
+ ->setPageSize(1);
566
+
567
+ if ($matchingTransactions->getSize() == 1) {
568
+ /** @var CMGroep_Idin_Model_Transaction $transaction */
569
+ $transaction = $matchingTransactions->getFirstItem();
570
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->getTransactionStatus($transaction->getTransactionId());
571
+
572
+ /**
573
+ * Check if transaction was successful
574
+ */
575
+ if ($transactionStatus instanceof \CMGroep\Idin\Models\Error) {
576
+ $this->_getSession()->addError($transactionStatus->getMessage());
577
+ $this->_redirect('customer/account/index');
578
+ return;
579
+ }
580
+
581
+ Mage::helper('cmgroep_idin')->registerTransaction($transaction->getTransactionId(), $transaction->getEntranceCode(), $transactionStatus);
582
+
583
+ /**
584
+ * Check if transaction has not been cancelled
585
+ */
586
+ if ($transactionStatus->getStatus() == 'cancelled') {
587
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('The iDIN transaction has been cancelled.'));
588
+ $this->_redirect('customer/account/index');
589
+ return;
590
+ }
591
+
592
+ /**
593
+ * Check if transaction was successful
594
+ */
595
+ if ($transactionStatus->getStatus() != 'success') {
596
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('iDIN verification failed. Please try again later.'));
597
+ $this->_redirect('customer/account/index');
598
+ return;
599
+ }
600
+
601
+ /*
602
+ * Store result of age verification
603
+ */
604
+ $customer = Mage::getModel('customer/customer')->load($transaction->getCustomerId());
605
+ $customer->setIdinAgeVerified($transactionStatus->getAge()->get18yOrOlder() ? 1 : 0);
606
+ $customer->save();
607
+
608
+ $this->_getSession()->addSuccess(Mage::helper('cmgroep_idin')->__('Succesfully verified your age with iDIN!'));
609
+ $this->_redirect('customer/account/index');
610
+ return;
611
+ }
612
+ }
613
+
614
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid request data'));
615
+ $this->_redirect('/');
616
+ }
617
+
618
+ /**
619
+ * Callback function for iDIN age verification transaction
620
+ * Stores the result of the transaction on the current quote
621
+ * and if a customer is logged in, it's also saved for recurring visits
622
+ */
623
+ public function verifyAgeCheckoutFinishAction()
624
+ {
625
+ if ($this->getRequest()->has('trxid') && $this->getRequest()->has('ec')) {
626
+ $matchingTransactions = Mage::getResourceModel('cmgroep_idin/transaction_collection')
627
+ ->addFieldToFilter('transaction_id', $this->getRequest()->getParam('trxid'))
628
+ ->addFieldToFilter('entrance_code', $this->getRequest()->getParam('ec'))
629
+ ->setPageSize(1);
630
+
631
+ if ($matchingTransactions->getSize() == 1) {
632
+ /** @var CMGroep_Idin_Model_Transaction $transaction */
633
+ $transaction = $matchingTransactions->getFirstItem();
634
+ $transactionStatus = Mage::helper('cmgroep_idin/api')->getTransactionStatus($this->getRequest()->getParam('trxid'));
635
+
636
+ /**
637
+ * Check if transaction was successful
638
+ */
639
+ if ($transactionStatus instanceof \CMGroep\Idin\Models\Error) {
640
+ $this->_getSession()->addError($transactionStatus->getMessage());
641
+ $this->_redirectUrl(Mage::helper('checkout/url')->getCheckoutUrl());
642
+ return;
643
+ }
644
+
645
+ Mage::helper('cmgroep_idin')->registerTransaction($transaction->getTransactionId(), $transaction->getEntranceCode(), $transactionStatus);
646
+
647
+ /**
648
+ * Check if transaction has not been cancelled
649
+ */
650
+ if ($transactionStatus->getStatus() == 'cancelled') {
651
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('The iDIN transaction has been cancelled.'));
652
+ $this->_redirectUrl(Mage::helper('checkout/url')->getCheckoutUrl());
653
+ return;
654
+ }
655
+
656
+ /**
657
+ * Check if transaction was not successful
658
+ */
659
+ if ($transactionStatus->getStatus() != 'success') {
660
+ $this->_getSession()->addNotice(Mage::helper('cmgroep_idin')->__('iDIN verification failed. Please try again later.'));
661
+ $this->_redirectUrl(Mage::helper('checkout/url')->getCheckoutUrl());
662
+ return;
663
+ }
664
+
665
+ /**
666
+ * If customer was logged in during checkout, save verification for recurring visits
667
+ */
668
+ if ($transaction->getCustomerId() !== null) {
669
+ $customer = Mage::getModel('customer/customer')->load($transaction->getCustomerId());
670
+ $customer->setIdinAgeVerified($transactionStatus->getAge()->get18yOrOlder() ? 1 : 0);
671
+ $customer->save();
672
+ }
673
+
674
+ /**
675
+ * Save verification result on quote
676
+ */
677
+ if ($transaction->getQuoteId() !== null) {
678
+ /** @var Mage_Sales_Model_Quote $quote */
679
+ $quote = Mage::getModel('sales/quote')->load($transaction->getQuoteId());
680
+ $quote->setIdinAgeVerified($transactionStatus->getAge()->get18yOrOlder() ? 1 : 0);
681
+ $quote->save();
682
+ }
683
+
684
+ $this->_getSession()->addSuccess(Mage::helper('cmgroep_idin')->__('Succesfully verified your age with iDIN!'));
685
+ $this->_getSession()->setData('idin_checkout_method', $this->getRequest()->getParam('checkout_method'));
686
+ $this->_redirectUrl(Mage::helper('checkout/url')->getCheckoutUrl());
687
+ return;
688
+ }
689
+ }
690
+
691
+ $this->_getSession()->addError(Mage::helper('cmgroep_idin')->__('Invalid request data'));
692
+ return $this->_redirect('/');
693
+ }
694
+ }
app/code/community/CMGroep/Idin/controllers/OnepageController.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ class CMGroep_Idin_OnepageController extends Mage_Core_Controller_Front_Action
33
+ {
34
+ /**
35
+ * Get one page checkout model
36
+ *
37
+ * @return Mage_Checkout_Model_Type_Onepage
38
+ */
39
+ public function getOnepage()
40
+ {
41
+ return Mage::getSingleton('checkout/type_onepage');
42
+ }
43
+
44
+ /**
45
+ * Verifies if the age has been verified successfully and updates the
46
+ * step data
47
+ *
48
+ * @return Zend_Controller_Response_Abstract
49
+ */
50
+ public function verifyAction()
51
+ {
52
+ if (Mage::helper('cmgroep_idin')->ageVerificationRequired() == false) {
53
+ $this->getOnepage()->getCheckout()
54
+ ->setStepData('age_verification', 'complete', true)
55
+ ->setStepData('age_verification', 'allow', true);
56
+
57
+ $result = array('goto_section' => 'billing', 'allow_sections' => array('age_verification'));
58
+ } else {
59
+ $result = array('error' => 1, 'message' => Mage::helper('cmgroep_idin')->__('Please verify your age'));
60
+ }
61
+
62
+ $this->getResponse()->setHeader('Content-type', 'application/json', true);
63
+ return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
64
+ }
65
+ }
app/code/community/CMGroep/Idin/etc/adminhtml.xml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2016 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ -->
33
+ <config>
34
+ <acl>
35
+ <resources>
36
+ <admin>
37
+ <children>
38
+ <system>
39
+ <children>
40
+ <tools>
41
+ <children>
42
+ <idin_transaction_log translate="label">
43
+ <title>iDIN Transaction Log</title>
44
+ <sort_order>100</sort_order>
45
+ </idin_transaction_log>
46
+ </children>
47
+ </tools>
48
+ <config>
49
+ <children>
50
+ <cmgroep_idin>
51
+ <title>CMGroep iDIN</title>
52
+ <sort_order>100</sort_order>
53
+ </cmgroep_idin>
54
+ </children>
55
+ </config>
56
+ </children>
57
+ </system>
58
+ </children>
59
+ </admin>
60
+ </resources>
61
+ </acl>
62
+ <menu>
63
+ <system>
64
+ <children>
65
+ <tools>
66
+ <children>
67
+ <idin_transaction_log translate="title">
68
+ <title>iDIN Transaction Log</title>
69
+ <sort_order>100</sort_order>
70
+ <action>adminhtml/idin_transaction/index</action>
71
+ </idin_transaction_log>
72
+ </children>
73
+ </tools>
74
+ </children>
75
+ </system>
76
+ </menu>
77
+ </config>
app/code/community/CMGroep/Idin/etc/config.xml ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2016 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ -->
33
+ <config>
34
+ <modules>
35
+ <CMGroep_Idin>
36
+ <version>1.0.0</version>
37
+ </CMGroep_Idin>
38
+ </modules>
39
+ <global>
40
+ <models>
41
+ <cmgroep_idin>
42
+ <class>CMGroep_Idin_Model</class>
43
+ <resourceModel>cmgroep_idin_resource</resourceModel>
44
+ </cmgroep_idin>
45
+ <cmgroep_idin_resource>
46
+ <class>CMGroep_Idin_Model_Resource</class>
47
+ <entities>
48
+ <transaction>
49
+ <table>cmgroep_idin_transaction</table>
50
+ </transaction>
51
+ </entities>
52
+ </cmgroep_idin_resource>
53
+ </models>
54
+ <blocks>
55
+ <cmgroep_idin>
56
+ <class>CMGroep_Idin_Block</class>
57
+ </cmgroep_idin>
58
+ <checkout>
59
+ <rewrite>
60
+ <onepage>CMGroep_Idin_Block_Checkout_Onepage</onepage>
61
+ </rewrite>
62
+ </checkout>
63
+ </blocks>
64
+ <helpers>
65
+ <cmgroep_idin>
66
+ <class>CMGroep_Idin_Helper</class>
67
+ </cmgroep_idin>
68
+ </helpers>
69
+ <resources>
70
+ <cmgroep_idin_setup>
71
+ <setup>
72
+ <module>CMGroep_Idin</module>
73
+ <class>CMGroep_Idin_Model_Resource_Setup</class>
74
+ </setup>
75
+ </cmgroep_idin_setup>
76
+ <cmgroep_idin_entity_setup>
77
+ <setup>
78
+ <module>CMGroep_Idin</module>
79
+ <class>CMGroep_Idin_Model_Entity_Setup</class>
80
+ </setup>
81
+ </cmgroep_idin_entity_setup>
82
+ </resources>
83
+ <template>
84
+ <email>
85
+ <cmgroep_idin_email_confirmation>
86
+ <label>iDIN Registration Confirmation</label>
87
+ <type>html</type>
88
+ <file>cmgroep/idin/registration_confirmation.html</file>
89
+ </cmgroep_idin_email_confirmation>
90
+ </email>
91
+ </template>
92
+ </global>
93
+ <frontend>
94
+ <translate>
95
+ <modules>
96
+ <cmgroep_idin>
97
+ <files>
98
+ <default>CMGroep_Idin.csv</default>
99
+ </files>
100
+ </cmgroep_idin>
101
+ </modules>
102
+ </translate>
103
+ <events>
104
+ <sales_order_place_before>
105
+ <observers>
106
+ <cmgroep_idin>
107
+ <type>model</type>
108
+ <class>CMGroep_Idin_Model_Observer</class>
109
+ <method>salesOrderPlaceBefore</method>
110
+ </cmgroep_idin>
111
+ </observers>
112
+ </sales_order_place_before>
113
+ </events>
114
+ <layout>
115
+ <updates>
116
+ <cmgroep_idin>
117
+ <file>cmgroep_idin.xml</file>
118
+ </cmgroep_idin>
119
+ </updates>
120
+ </layout>
121
+ <routers>
122
+ <idin>
123
+ <use>standard</use>
124
+ <args>
125
+ <frontName>idin</frontName>
126
+ <module>CMGroep_Idin</module>
127
+ </args>
128
+ </idin>
129
+ </routers>
130
+ </frontend>
131
+ <adminhtml>
132
+ <translate>
133
+ <modules>
134
+ <cmgroep_idin>
135
+ <files>
136
+ <default>CMGroep_Idin.csv</default>
137
+ </files>
138
+ </cmgroep_idin>
139
+ </modules>
140
+ </translate>
141
+ <layout>
142
+ <updates>
143
+ <cmgroep_idin>
144
+ <file>cmgroep_idin.xml</file>
145
+ </cmgroep_idin>
146
+ </updates>
147
+ </layout>
148
+ <events>
149
+ <adminhtml_init_system_config>
150
+ <observers>
151
+ <cmgroep_idin>
152
+ <type>model</type>
153
+ <class>CMGroep_Idin_Model_Adminhtml_Observer</class>
154
+ <method>updateAvailableServices</method>
155
+ </cmgroep_idin>
156
+ </observers>
157
+ </adminhtml_init_system_config>
158
+ <admin_system_config_changed_section_cmgroep_idin>
159
+ <observers>
160
+ <cmgroep_idin>
161
+ <type>model</type>
162
+ <class>CMGroep_Idin_Model_Adminhtml_Observer</class>
163
+ <method>processConfigurationChanges</method>
164
+ </cmgroep_idin>
165
+ </observers>
166
+ </admin_system_config_changed_section_cmgroep_idin>
167
+ </events>
168
+ </adminhtml>
169
+ <admin>
170
+ <routers>
171
+ <adminhtml>
172
+ <args>
173
+ <modules>
174
+ <idin before="Mage_Adminhtml">CMGroep_Idin_Adminhtml</idin>
175
+ </modules>
176
+ </args>
177
+ </adminhtml>
178
+ </routers>
179
+ </admin>
180
+ <default>
181
+ <cmgroep_idin>
182
+ <age_verification>
183
+ <save_verification_result>1</save_verification_result>
184
+ </age_verification>
185
+ </cmgroep_idin>
186
+ </default>
187
+ </config>
app/code/community/CMGroep/Idin/etc/system.xml ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2016 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ -->
33
+ <config>
34
+ <sections>
35
+ <cmgroep_idin translate="label">
36
+ <tab>service</tab>
37
+ <label>CM iDIN</label>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ <sort_order>100</sort_order>
42
+
43
+ <groups>
44
+ <support translate="label">
45
+ <label>Contact &amp; Support</label>
46
+ <expanded>1</expanded>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
+ <sort_order>10</sort_order>
51
+
52
+ <fields>
53
+ <content>
54
+ <frontend_model>cmgroep_idin/adminhtml_system_config_support</frontend_model>
55
+ <sort_order>10</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ </content>
60
+ </fields>
61
+ </support>
62
+ <common translate="label">
63
+ <label>Common settings</label>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>0</show_in_store>
67
+ <sort_order>20</sort_order>
68
+
69
+ <fields>
70
+ <active translate="label">
71
+ <label>Active</label>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ <show_in_default>1</show_in_default>
75
+ <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
+ <sort_order>10</sort_order>
78
+ </active>
79
+ <mode translate="label">
80
+ <label>Mode</label>
81
+ <frontend_type>select</frontend_type>
82
+ <source_model>cmgroep_idin/system_config_source_mode</source_model>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>0</show_in_website>
85
+ <show_in_store>0</show_in_store>
86
+ <sort_order>20</sort_order>
87
+ </mode>
88
+ <merchant_token translate="label">
89
+ <label>Merchant Token</label>
90
+ <frontend_type>text</frontend_type>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>0</show_in_store>
94
+ <sort_order>30</sort_order>
95
+ </merchant_token>
96
+ </fields>
97
+ </common>
98
+ <registration translate="label">
99
+ <label>Registration with iDIN</label>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ <sort_order>30</sort_order>
104
+ <required_services>name,address</required_services>
105
+
106
+ <fields>
107
+ <active translate="label">
108
+ <label>Active</label>
109
+ <frontend_type>select</frontend_type>
110
+ <source_model>adminhtml/system_config_source_yesno</source_model>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>1</show_in_store>
114
+ <sort_order>10</sort_order>
115
+ </active>
116
+ <email_confirmation_template translate="label">
117
+ <label>Email Confirmation Template</label>
118
+ <frontend_type>select</frontend_type>
119
+ <source_model>adminhtml/system_config_source_email_template</source_model>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ <sort_order>20</sort_order>
124
+
125
+ <depends>
126
+ <active>1</active>
127
+ </depends>
128
+ </email_confirmation_template>
129
+ </fields>
130
+ </registration>
131
+ <login translate="label">
132
+ <label>Login with iDIN</label>
133
+ <show_in_default>1</show_in_default>
134
+ <show_in_website>1</show_in_website>
135
+ <show_in_store>1</show_in_store>
136
+ <sort_order>40</sort_order>
137
+ <required_services>identity</required_services>
138
+
139
+ <fields>
140
+ <active translate="label comment">
141
+ <label>Active</label>
142
+ <comment><![CDATA[Please note: every login action will result in a transaction with iDIN. There is a possibility this could lead to higher costs.]]></comment>
143
+ <frontend_type>select</frontend_type>
144
+ <source_model>adminhtml/system_config_source_yesno</source_model>
145
+ <show_in_default>1</show_in_default>
146
+ <show_in_website>1</show_in_website>
147
+ <show_in_store>1</show_in_store>
148
+ <sort_order>10</sort_order>
149
+ </active>
150
+ </fields>
151
+ </login>
152
+ <age_verification translate="label">
153
+ <label>18+ Age Verification with iDIN</label>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>1</show_in_website>
156
+ <show_in_store>1</show_in_store>
157
+ <sort_order>50</sort_order>
158
+ <required_services>18y_or_older</required_services>
159
+
160
+ <fields>
161
+ <active translate="label">
162
+ <label>Active</label>
163
+ <frontend_type>select</frontend_type>
164
+ <source_model>adminhtml/system_config_source_yesno</source_model>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+ <sort_order>10</sort_order>
169
+ </active>
170
+ <required translate="label">
171
+ <label>Age Verification Required</label>
172
+ <frontend_type>select</frontend_type>
173
+ <source_model>cmgroep_idin/system_config_source_verificationrequired</source_model>
174
+ <show_in_default>1</show_in_default>
175
+ <show_in_website>1</show_in_website>
176
+ <show_in_store>1</show_in_store>
177
+ <sort_order>20</sort_order>
178
+
179
+ <depends>
180
+ <active>1</active>
181
+ </depends>
182
+ </required>
183
+ <save_verification_result translate="label comment">
184
+ <label>Save 18+ verification result</label>
185
+ <comment><![CDATA[When set to &quot;No&quot;, the customer has to verify their age on every checkout.]]></comment>
186
+ <frontend_type>select</frontend_type>
187
+ <source_model>adminhtml/system_config_source_yesno</source_model>
188
+ <show_in_default>1</show_in_default>
189
+ <show_in_website>1</show_in_website>
190
+ <show_in_store>1</show_in_store>
191
+ <sort_order>25</sort_order>
192
+
193
+ <depends>
194
+ <active>1</active>
195
+ </depends>
196
+ </save_verification_result>
197
+ <show_product_notice translate="label">
198
+ <label>Show notice on product page</label>
199
+ <frontend_type>select</frontend_type>
200
+ <source_model>cmgroep_idin/system_config_source_showproductnotice</source_model>
201
+ <show_in_default>1</show_in_default>
202
+ <show_in_website>1</show_in_website>
203
+ <show_in_store>1</show_in_store>
204
+ <sort_order>26</sort_order>
205
+
206
+ <depends>
207
+ <active>1</active>
208
+ </depends>
209
+ </show_product_notice>
210
+ <product_notice translate="label">
211
+ <label>Product page notice</label>
212
+ <validate>required-entry</validate>
213
+ <frontend_type>textarea</frontend_type>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ <sort_order>27</sort_order>
218
+
219
+ <depends>
220
+ <active>1</active>
221
+ <show_product_notice separator=",">1,2</show_product_notice>
222
+ </depends>
223
+ </product_notice>
224
+ <show_cart_notice translate="label">
225
+ <label>Show shopping cart notice</label>
226
+ <frontend_type>select</frontend_type>
227
+ <source_model>adminhtml/system_config_source_yesno</source_model>
228
+ <show_in_default>1</show_in_default>
229
+ <show_in_website>1</show_in_website>
230
+ <show_in_store>1</show_in_store>
231
+ <sort_order>30</sort_order>
232
+
233
+ <depends>
234
+ <active>1</active>
235
+ </depends>
236
+ </show_cart_notice>
237
+ <cart_notice translate="label">
238
+ <label>Shopping cart notice</label>
239
+ <validate>required-entry</validate>
240
+ <frontend_type>textarea</frontend_type>
241
+ <show_in_default>1</show_in_default>
242
+ <show_in_website>1</show_in_website>
243
+ <show_in_store>1</show_in_store>
244
+ <sort_order>40</sort_order>
245
+
246
+ <depends>
247
+ <active>1</active>
248
+ <show_cart_notice>1</show_cart_notice>
249
+ </depends>
250
+ </cart_notice>
251
+ </fields>
252
+ </age_verification>
253
+ </groups>
254
+ </cmgroep_idin>
255
+ </sections>
256
+ </config>
app/code/community/CMGroep/Idin/sql/cmgroep_idin_entity_setup/install-0.1.0.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ /* @var $installer CMGroep_Idin_Model_Entity_Setup */
33
+ $installer = $this;
34
+
35
+ $installer->startSetup();
36
+ $installer->addCustomerAttributes();
37
+ $installer->addProductAttributes();
38
+ $installer->endSetup();
app/code/community/CMGroep/Idin/sql/cmgroep_idin_setup/install-0.1.0.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+
32
+ /* @var $installer CMGroep_Idin_Model_Resource_Setup */
33
+ $installer = $this;
34
+
35
+ $installer->startSetup();
36
+ $installer->createPendingRegistrationsTable();
37
+ $installer->addExtraColumnsToQuoteTable();
38
+ $installer->endSetup();
app/design/adminhtml/base/default/layout/cmgroep_idin.xml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2016 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ -->
33
+ <layout version="0.1.0">
34
+
35
+ <adminhtml_idin_transaction_index>
36
+ <reference name="content">
37
+ <block type="cmgroep_idin/adminhtml_idin_transaction"
38
+ name="idin.transaction.grid"
39
+ as="idin_transaction_grid"/>
40
+ </reference>
41
+ </adminhtml_idin_transaction_index>
42
+
43
+ <adminhtml_idin_transaction_details>
44
+ <reference name="content">
45
+ <block type="cmgroep_idin/adminhtml_idin_transaction_details"
46
+ name="idin.transaction.details"
47
+ as="idin_transaction_details"/>
48
+ </reference>
49
+ </adminhtml_idin_transaction_details>
50
+
51
+ <adminhtml_sales_order_view>
52
+ <reference name="sales_order_tabs">
53
+ <action method="addTab">
54
+ <name>idin_transactions</name>
55
+ <block>cmgroep_idin/adminhtml_sales_order_view_tab_idin</block>
56
+ </action>
57
+ </reference>
58
+ </adminhtml_sales_order_view>
59
+
60
+ <adminhtml_customer_edit>
61
+ <reference name="customer_edit_tabs">
62
+ <action method="addTabAfter">
63
+ <name>idin_transactions</name>
64
+ <block>cmgroep_idin/adminhtml_customer_edit_tab_idin</block>
65
+ <after>tags</after>
66
+ </action>
67
+ </reference>
68
+ <reference name="customer_edit_tab_view">
69
+ <block type="cmgroep_idin/adminhtml_customer_edit_tab_view_idin"
70
+ name="idin.info"
71
+ alias="idin_info"
72
+ template="cm/idin/customer/tab/view/idin.phtml"
73
+ before="-"></block>
74
+ </reference>
75
+ </adminhtml_customer_edit>
76
+
77
+ </layout>
app/design/adminhtml/base/default/template/cm/idin/customer/tab/view/idin.phtml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+
33
+ <div class="entry-edit customer-details-idin">
34
+ <div class="entry-edit-head">
35
+ <h4 class="icon-head head-customer-view"><?php echo $this->__('iDIN') ?></h4>
36
+ </div>
37
+ <fieldset>
38
+ <table cellspacing="2" class="box-left">
39
+ <tr>
40
+ <td class="idin-cell">
41
+ <img class="logo-idin" src="<?php echo $this->getSkinUrl('cm/idin/images/logos/iDIN.svg'); ?>" alt="<?php echo $this->__('iDIN'); ?>">
42
+ </td>
43
+ <td class="idin-details">
44
+ <?php if ($this->getCustomerIdinConnected()): ?>
45
+ <strong>- <?php echo $this->__('iDIN login is enabled for this customer.'); ?></strong><br />
46
+ <?php endif; ?>
47
+ <?php if ($this->getCustomerAgeVerified()): ?>
48
+ <strong>- <?php echo $this->__('The customer has verified it&apos;s age through iDIN.'); ?></strong>
49
+ <?php endif; ?>
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </fieldset>
54
+ </div>
app/design/adminhtml/base/default/template/cm/idin/system/config/support.phtml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+
33
+ <div class="cmgroep_idin_support">
34
+ <div class="row support-header">
35
+ <div class="col-70">
36
+ <h1><?php echo $this->__('Support'); ?></h1>
37
+ <p><?php echo $this->__('This module is being developed by Epartment E-commerce for CM Groep. Depending on your question you should contact Epartment E-commerce or CM Groep.') ?></p>
38
+ </div>
39
+ <div class="col-30 logo-idin-wrapper">
40
+ <img src="<?php echo $this->getSkinUrl('cm/idin/images/logos/iDIN.svg') ?>" alt="<?php echo $this->__('iDIN'); ?>" class="logo-idin">
41
+ </div>
42
+ </div>
43
+ <div class="row contact-details">
44
+ <div class="col-50">
45
+ <h5><?php echo $this->__('Common settings and account details'); ?></h5>
46
+ <img src="<?php echo $this->getSkinUrl('cm/idin/images/logos/CM.svg') ?>" alt="<?php echo $this->__('CM Groep'); ?>" class="logo-cm">
47
+ <p><?php echo $this->__('If you need help by filling out your account details or settings up common settings, please contact CM Groep.'); ?></p>
48
+ <p>
49
+ <?php echo $this->__('Phone:'); ?> +31 (0) 76 - 572 70 00<br/>
50
+ <?php echo $this->__('Email:'); ?> <a href="mailto:info@cm.nl" target="_blank"><?php echo $this->__('info@cm.nl') ?></a><br/>
51
+ <?php echo $this->__('Support:');?> <a href="https://www.cm.nl/support" target="_blank">Support portal</a>
52
+ </p>
53
+ </div>
54
+ <div class="col-50">
55
+ <h5><?php echo $this->__('Module support and advanced configuration'); ?></h5>
56
+ <img src="<?php echo $this->getSkinUrl('cm/idin/images/logos/Epartment.svg') ?>" alt="<?php echo $this->__('Epartment E-commerce'); ?>" class="logo-epartment">
57
+ <p><?php echo $this->__('If you&apos;re experiencing issues or need help with advanced topics, please contact Epartment E-commerce.'); ?></p>
58
+ <p>
59
+ <?php echo $this->__('Support:'); ?> <a href="http://epartment.freshdesk.com/support/tickets/new" target="_blank"><?php echo $this->__('Create a support ticket'); ?></a><br/>
60
+ <?php echo $this->__('Email:'); ?> <a href="mailto:support@epartment.nl" target="_blank"><?php echo $this->__('support@epartment.nl'); ?></a><br/>
61
+ <?php echo $this->__('Documentation:'); ?> <a href="#"><?php echo $this->__('iDIN extension documentation'); ?></a><br/>
62
+ </p>
63
+ </div>
64
+ </div>
65
+ <b class="extension-version"><?php echo $this->__('Extension version:') ?> <?php echo $this->getExtensionVersion(); ?></b>
66
+ </div>
app/design/adminhtml/base/default/template/cm/idin/transaction/response.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+
33
+ <div class="response">
34
+ <pre><?php echo $this->getFormattedResponse(); ?></pre>
35
+ </div>
app/design/frontend/base/default/layout/cmgroep_idin.xml ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2016 CM Groep
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ * @category CMGroep
27
+ * @package Idin
28
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
29
+ * @copyright 2016-2017 CM Groep
30
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
31
+ */
32
+ -->
33
+ <layout version="0.1.0">
34
+
35
+ <idin_base>
36
+ <reference name="head">
37
+ <action method="addCss">
38
+ <file>cm/idin/css/styles.css</file>
39
+ </action>
40
+ </reference>
41
+ </idin_base>
42
+
43
+ <customer_account_login>
44
+ <update handle="idin_base"/>
45
+ <reference name="content">
46
+ <block type="cmgroep_idin/customer_account_login_idin" template="cmgroep/idin/register_login.phtml"
47
+ name="customer.account.login.idin"
48
+ as="customer_account_login_idin"
49
+ before="customer_form_login"/>
50
+ </reference>
51
+ </customer_account_login>
52
+
53
+ <customer_account_create>
54
+ <update handle="idin_base"/>
55
+ <reference name="content">
56
+ <block type="cmgroep_idin/customer_account_login_idin" template="cmgroep/idin/register_login.phtml"
57
+ name="customer.account.register.idin"
58
+ as="customer_account_register_idin"
59
+ before="customer_form_register">
60
+ <action method="setIsRegistration">
61
+ <registration>1</registration>
62
+ </action>
63
+ </block>
64
+ </reference>
65
+ </customer_account_create>
66
+
67
+ <idin_auth_finish>
68
+ <update handle="page_one_column"/>
69
+ <update handle="idin_base"/>
70
+ <reference name="content">
71
+ <block type="cmgroep_idin/customer_account_registration_finish"
72
+ template="cmgroep/idin/registration/finish.phtml"
73
+ name="customer.account.registration.finish"
74
+ as="customer_account_registration_finish"/>
75
+ </reference>
76
+ </idin_auth_finish>
77
+
78
+ <customer_idin_info>
79
+ <update handle="idin_base"/>
80
+ <reference name="customer_account_dashboard">
81
+ <block type="cmgroep_idin/customer_account_info"
82
+ template="cmgroep/idin/customer/info.phtml"
83
+ name="customer.idin.info" as="idin_info">
84
+ <action method="setChild">
85
+ <name>info</name>
86
+ <block>customer_account_dashboard_info</block>
87
+ </action>
88
+ </block>
89
+ <action method="setChild">
90
+ <name>info</name>
91
+ <block>customer.idin.info</block>
92
+ </action>
93
+ </reference>
94
+ </customer_idin_info>
95
+
96
+ <customer_account_index>
97
+ <update handle="customer_idin_info"/>
98
+ </customer_account_index>
99
+
100
+ <checkout_cart_index>
101
+ <update handle="idin_base"/>
102
+ <reference name="content">
103
+ <block type="cmgroep_idin/checkout_cart_notice"
104
+ template="cmgroep/idin/checkout/cart/notice.phtml"
105
+ name="idin.cart.notice"
106
+ as="idin_cart_notice"
107
+ before="-"/>
108
+ </reference>
109
+ </checkout_cart_index>
110
+
111
+ <checkout_onepage_index>
112
+ <update handle="idin_base"/>
113
+ <reference name="checkout.onepage.login.before">
114
+ <block type="cmgroep_idin/customer_account_login_idin" template="cmgroep/idin/register_login.phtml"
115
+ name="customer.account.login.idin"
116
+ as="customer_account_login_idin"
117
+ before="-">
118
+ <action method="setIsCheckout">
119
+ <checkout>1</checkout>
120
+ </action>
121
+ </block>
122
+ </reference>
123
+ <reference name="checkout.onepage">
124
+ <block type="cmgroep_idin/checkout_onepage_verification"
125
+ template="cmgroep/idin/checkout/onepage/age_verification.phtml"
126
+ name="age_verification"/>
127
+ </reference>
128
+ <reference name="checkout.progress">
129
+ <action method="setTemplate" ifconfig="cmgroep_idin/common/active">
130
+ <template>cmgroep/idin/checkout/onepage/progress.phtml</template>
131
+ </action>
132
+ <block type="checkout/onepage_progress"
133
+ template="cmgroep/idin/checkout/onepage/progress/age_verification.phtml"
134
+ name="age_verification.progress"/>
135
+ </reference>
136
+ <reference name="content">
137
+ <block type="cmgroep_idin/checkout_onepage_js"
138
+ template="cmgroep/idin/checkout/onepage.phtml"
139
+ name="checkout.onepage.idin.js"
140
+ as="checkout_onepage_idin_js" after="-"></block>
141
+ </reference>
142
+ </checkout_onepage_index>
143
+
144
+ <checkout_onepage_progress>
145
+ <reference name="root">
146
+ <action method="setTemplate" ifconfig="cmgroep_idin/age_verification/active">
147
+ <template>cmgroep/idin/checkout/onepage/progress.phtml</template>
148
+ </action>
149
+ </reference>
150
+ </checkout_onepage_progress>
151
+
152
+ <checkout_onepage_progress_age_verification>
153
+ <remove name="right"/>
154
+ <remove name="left"/>
155
+
156
+ <block type="checkout/onepage_progress"
157
+ name="root"
158
+ output="toHtml"
159
+ template="cmgroep/idin/checkout/onepage/progress/age_verification.phtml">
160
+ <action method="setInfoTemplate">
161
+ <method></method>
162
+ <template></template>
163
+ </action>
164
+ </block>
165
+ </checkout_onepage_progress_age_verification>
166
+
167
+ <!-- Remove login method from OSC when logged in -->
168
+ <customer_logged_in>
169
+ <remove name="checkout.login.idin.osc" />
170
+ </customer_logged_in>
171
+
172
+ <onestepcheckout_index_index>
173
+ <update handle="idin_base"/>
174
+ <reference name="content">
175
+ <block type="cmgroep_idin/customer_account_login_idin" template="cmgroep/idin/register_login.phtml"
176
+ name="checkout.login.idin.osc"
177
+ as="checkout_login_idin"
178
+ before="-">
179
+ <action method="setIsCheckout">
180
+ <checkout>1</checkout>
181
+ </action>
182
+ </block>
183
+ </reference>
184
+ <reference name="before_body_end">
185
+ <block type="cmgroep_idin/checkout_thirdparty_onestepcheckout_checkout" name="onestepcheckout.idin.checkout"
186
+ as="onestepcheckout_idin_checkout"
187
+ template="cmgroep/idin/checkout/third_party/onestepcheckout/checkout.phtml">
188
+ <block type="cmgroep_idin/customer_account_login_idin" template="cmgroep/idin/register_login.phtml"
189
+ name="customer.account.login.idin"
190
+ as="customer_account_login_idin"
191
+ before="-">
192
+ <action method="setIsCheckout">
193
+ <checkout>1</checkout>
194
+ </action>
195
+ </block>
196
+ </block>
197
+ <block type="cmgroep_idin/checkout_thirdparty_onestepcheckout_js" name="onestepcheckout.idin.js"
198
+ as="onestepcheckout_idin_js" template="cmgroep/idin/checkout/third_party/onestepcheckout/js.phtml"/>
199
+ </reference>
200
+ </onestepcheckout_index_index>
201
+
202
+ <!-- Product View Layout updates -->
203
+
204
+ <PRODUCT_TYPE_simple>
205
+ <update handle="idin_base"/>
206
+ <reference name="product.info.simple.extra">
207
+ <block type="cmgroep_idin/catalog_product_notice"
208
+ template="cmgroep/idin/catalog/product/notice.phtml"
209
+ name="idin.product.notice"
210
+ as="idin_product_notice"
211
+ before="-"/>
212
+ </reference>
213
+ </PRODUCT_TYPE_simple>
214
+
215
+ <PRODUCT_TYPE_configurable>
216
+ <update handle="idin_base"/>
217
+ <reference name="product.info.container1">
218
+ <block type="cmgroep_idin/catalog_product_notice"
219
+ template="cmgroep/idin/catalog/product/notice.phtml"
220
+ name="idin.product.notice"
221
+ as="idin_product_notice"
222
+ before="-"/>
223
+ </reference>
224
+ </PRODUCT_TYPE_configurable>
225
+
226
+ <PRODUCT_TYPE_grouped>
227
+ <update handle="idin_base"/>
228
+ <reference name="product.info.container1">
229
+ <block type="cmgroep_idin/catalog_product_notice"
230
+ template="cmgroep/idin/catalog/product/notice.phtml"
231
+ name="idin.product.notice"
232
+ as="idin_product_notice"
233
+ before="-"/>
234
+ </reference>
235
+ </PRODUCT_TYPE_grouped>
236
+
237
+ <PRODUCT_TYPE_bundle>
238
+ <update handle="idin_base"/>
239
+ <reference name="product.info.container1">
240
+ <block type="cmgroep_idin/catalog_product_notice"
241
+ template="cmgroep/idin/catalog/product/notice.phtml"
242
+ name="idin.product.notice"
243
+ as="idin_product_notice"
244
+ before="-"/>
245
+ </reference>
246
+ </PRODUCT_TYPE_bundle>
247
+
248
+ <PRODUCT_TYPE_virtual>
249
+ <update handle="idin_base"/>
250
+ <reference name="product.info.container1">
251
+ <block type="cmgroep_idin/catalog_product_notice"
252
+ template="cmgroep/idin/catalog/product/notice.phtml"
253
+ name="idin.product.notice"
254
+ as="idin_product_notice"
255
+ before="-"/>
256
+ </reference>
257
+ </PRODUCT_TYPE_virtual>
258
+
259
+ <PRODUCT_TYPE_downloadable>
260
+ <update handle="idin_base"/>
261
+ <reference name="product.info.container1">
262
+ <block type="cmgroep_idin/catalog_product_notice"
263
+ template="cmgroep/idin/catalog/product/notice.phtml"
264
+ name="idin.product.notice"
265
+ as="idin_product_notice"
266
+ before="-"/>
267
+ </reference>
268
+ </PRODUCT_TYPE_downloadable>
269
+
270
+ </layout>
app/design/frontend/base/default/template/cmgroep/idin/catalog/product/notice.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <div class="product-idin-notice">
33
+ <div class="idin-logo"></div>
34
+ <span><?php echo $this->getProductNotice(); ?></span>
35
+ </div>
app/design/frontend/base/default/template/cmgroep/idin/checkout/cart/notice.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <div class="cart-idin-notice">
33
+ <div class="idin-logo"></div>
34
+ <span><?php echo $this->getCartNotice(); ?></span>
35
+ </div>
app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('cm/idin/js/opcheckout_idin.js'); ?>"></script>
33
+ <script type="text/javascript">
34
+ var accordion = new Accordion('checkoutSteps', '.step-title', true);
35
+ <?php if ($this->getActiveStep()): ?>
36
+ accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
37
+ <?php if ($this->getActiveStep() == 'age_verification'): ?>
38
+ accordion.closeSection('opc-billing');
39
+ <?php endif; ?>
40
+ <?php endif ?>
41
+ var checkout = new IdinCheckout(accordion,{
42
+ progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
43
+ review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
44
+ saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
45
+ failure: '<?php echo $this->getUrl('checkout/cart') ?>'}, '<?php echo $this->getCheckoutMethod(); ?>'
46
+ );
47
+ </script>
app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/age_verification.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <form id="co-idin-age-verification" action="<?php echo $this->getVerifyAgeUrl(); ?>" method="post">
33
+ <input type="hidden" id="checkout_method" name="checkout_method" value="<?php if ($this->isCustomerLoggedIn()): ?>customer<?php endif;?>">
34
+ <div class="fieldset checkout-step idin-age-verification">
35
+ <div class="idin-logo"></div>
36
+ <?php if ($this->isAgeVerificationRequired()): ?>
37
+ <div class="idin-details">
38
+ <p><?php echo $this->__('In order to continue, you need to verify your age through iDIN.'); ?></p>
39
+ <div class="verify-action">
40
+ <?php echo $this->getIssuerSelectHtml(); ?>
41
+ <button type="button" onclick="ageVerification.start();" class="button"><?php echo $this->__('Verify age with iDIN') ?></button>
42
+ </div>
43
+ </div>
44
+ <?php else: ?>
45
+ <div class="idin-details">
46
+ <p><?php echo $this->__('Your age has been verified, you can continue to checkout.'); ?></p>
47
+ </div>
48
+ <?php endif; ?>
49
+ </div>
50
+ <div class="buttons-set" id="age_verification-buttons-container">
51
+ <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Continue')) ?>" class="button" onclick="ageVerification.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
52
+ <span class="please-wait" id="age_verification-please-wait" style="display:none;">
53
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo Mage::helper('core')->quoteEscape($this->__('Loading next step...')) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Loading next step...')) ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
54
+ </span>
55
+ </div>
56
+ </form>
57
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('cm/idin/js/age_verification.js') ?>"></script>
58
+ <script type="text/javascript">
59
+ var ageVerification = new IdinAgeVerification('co-idin-age-verification', '<?php echo $this->getUrl('idin/onepage/verify') ?>');
60
+ </script>
app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/progress.phtml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <div class="block block-progress opc-block-progress">
33
+ <div class="block-title">
34
+ <strong><span><?php echo $this->__('Your Checkout Progress') ?></span></strong>
35
+ </div>
36
+ <div class="block-content">
37
+ <dl>
38
+ <?php if (Mage::helper('cmgroep_idin')->ageVerificationRequired(true) && Mage::helper('cmgroep_idin')->getIdinAgeVerificationActive()): ?>
39
+ <?php if ($this->getCheckout()->getStepData('age_verification', 'is_show')): ?>
40
+ <div id="age_verification-progress-opcheckout">
41
+ <?php echo $this->getChildHtml('age_verification.progress') ?>
42
+ </div>
43
+ <?php endif; ?>
44
+ <?php endif; ?>
45
+
46
+ <?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?>
47
+ <div id="billing-progress-opcheckout">
48
+ <?php echo $this->getChildHtml('billing.progress') ?>
49
+ </div>
50
+ <?php endif; ?>
51
+
52
+ <?php if ($this->getCheckout()->getStepData('shipping', 'is_show')): ?>
53
+ <div id="shipping-progress-opcheckout">
54
+ <?php echo $this->getChildHtml('shipping.progress') ?>
55
+ </div>
56
+ <?php endif; ?>
57
+
58
+ <?php if ($this->getCheckout()->getStepData('shipping_method', 'is_show')): ?>
59
+ <div id="shipping_method-progress-opcheckout">
60
+ <?php echo $this->getChildHtml('shippingmethod.progress') ?>
61
+ </div>
62
+ <?php endif; ?>
63
+
64
+ <?php if ($this->getCheckout()->getStepData('payment', 'is_show')): ?>
65
+ <div id="payment-progress-opcheckout">
66
+ <?php echo $this->getChildHtml('payment.progress') ?>
67
+ </div>
68
+ <?php endif; ?>
69
+ </dl>
70
+ </div>
71
+ </div>
72
+
app/design/frontend/base/default/template/cmgroep/idin/checkout/onepage/progress/age_verification.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <?php if ($this->getCheckout()->getStepData('age_verification', 'complete')): ?>
33
+ <dt class="complete">
34
+ <?php echo $this->__('Age Verification') ?>
35
+ </dt>
36
+ <dd class="complete">
37
+ <?php echo $this->__('Your age has been verified!'); ?>
38
+ </dd>
39
+ <?php else: ?>
40
+ <dt>
41
+ <?php echo $this->__('Age Verification') ?>
42
+ </dt>
43
+ <?php endif; ?>
44
+
app/design/frontend/base/default/template/cmgroep/idin/checkout/third_party/onestepcheckout/checkout.phtml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <?php if (Mage::helper('customer')->isLoggedIn() == false): ?>
33
+ <div id="idin-onestepcheckout-login" style="display: none;">
34
+ <div id="idin-onestepcheckout-login-wrapper" style="display: none;">
35
+ <?php echo $this->getChildHtml('customer_account_login_idin'); ?>
36
+ </div>
37
+ </div>
38
+ <?php endif; ?>
39
+ <div class="checkout-step idin-age-verification onestepcheckout" style="display: none;" id="idin-onestepcheckout-age-verification">
40
+ <form action="<?php echo $this->getVerifyAgeUrl() ?>" method="post" id="idin-onestepcheckout-form">
41
+ <div class="idin-logo"></div>
42
+ <?php if ($this->isAgeVerificationRequired()): ?>
43
+ <div class="idin-details">
44
+ <p><?php echo $this->__('In order to continue, you need to verify your age through iDIN.'); ?></p>
45
+ <div class="select-bank">
46
+ <div class="form-group">
47
+ <label for=""><?php echo $this->__('Select your bank') ?></label>
48
+ <?php echo $this->getIssuerSelectHtml(); ?>
49
+ </div>
50
+ </div>
51
+ <div class="verify-action">
52
+ <button type="button" onclick="idinOneStepCheckout.start();" class="button"><?php echo $this->__('Verify age with iDIN') ?></button>
53
+ <?php if (Mage::helper('customer')->isLoggedIn() == false): ?>
54
+ <br/><br/>
55
+ <a href="#" onclick="idinOneStepCheckout.toggleLogin();"><?php echo $this->__('Login or register with iDIN'); ?></a>
56
+ <?php endif; ?>
57
+ </div>
58
+ </div>
59
+ <?php else: ?>
60
+ <div class="idin-details age-verified">
61
+ <p>
62
+ <?php echo $this->__('Your age has been verified, you can continue to checkout.'); ?>
63
+ <button type="button" onclick="idinOneStepCheckout.toggleLogin();" class="button"><?php echo $this->__('Login with iDIN'); ?></button>
64
+ </p>
65
+ </div>
66
+ <?php endif; ?>
67
+ </form>
68
+ </div>
app/design/frontend/base/default/template/cmgroep/idin/checkout/third_party/onestepcheckout/js.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('cm/idin/js/onestepcheckout_idin.js'); ?>"></script>
33
+ <script type="text/javascript">
34
+ var idinOneStepCheckout = new IdinOneStepCheckout('idin-onestepcheckout-age-verification', 'idin-onestepcheckout-login', 'idin-onestepcheckout-form', $$('.checkoutcontainer')[0], <?php echo $this->isAgeVerificationRequired() ? '1' : '0' ?>);
35
+ </script>
app/design/frontend/base/default/template/cmgroep/idin/core/issuer_select.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2017 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <select name="idin_issuer" id="idin_issuer_select" class="select cmgroep__idin__select required-entry">
33
+ <option value=""><?php echo $this->__('Select your bank'); ?></option>
34
+ <?php foreach ($this->getIssuers() as $issuerCountry => $issuers): ?>
35
+ <optgroup label="<?php echo $issuerCountry ?>">
36
+ <?php foreach ($issuers as $issuer): ?>
37
+ <option value="<?php echo $issuer['issuer_id']; ?>"><?php echo $issuer['issuer_name']; ?></option>
38
+ <?php endforeach; ?>
39
+ </optgroup>
40
+ <?php endforeach; ?>
41
+ </select>
app/design/frontend/base/default/template/cmgroep/idin/customer/info.phtml ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <?php if ($this->shouldShow()): ?>
33
+ <?php if ($this->isIdinLoginEnabled()): ?>
34
+ <div class="customer-account-idin-info <?php if ($this->customerHasIdin()): ?>idin-connected<?php endif; ?>">
35
+ <div class="idin-logo"></div>
36
+ <div class="idin-details">
37
+ <?php if ($this->customerHasIdin()): ?>
38
+ <span><?php echo $this->__('Your account is connected with iDIN!'); ?></span>
39
+ <?php elseif ($this->isIdinLoginEnabled()): ?>
40
+ <span>
41
+ <b><?php echo $this->__('Connect with iDIN'); ?></b><br/>
42
+ <?php echo $this->__('Connect your account with iDIN and benefit from faster login.'); ?>
43
+ </span>
44
+ <div class="action-wrapper">
45
+ <form action="<?php echo $this->getConnectWithIdinUrl(); ?>" method="post">
46
+ <?php echo $this->getIssuerSelectHtml(); ?>
47
+ <button type="submit" class="button"><?php echo $this->__('Connect with iDIN') ?></button>
48
+ </form>
49
+ </div>
50
+ <?php endif; ?>
51
+ </div>
52
+ </div>
53
+ <?php endif; ?>
54
+ <?php if ($this->isIdinAgeVerificationEnabled()): ?>
55
+ <div class="customer-account-idin-info <?php if ($this->customerHasVerifiedAge()): ?>age-verified<?php endif; ?>">
56
+ <div class="idin-logo"></div>
57
+ <div class="idin-details">
58
+ <div class="age-verification">
59
+ <?php if ($this->customerHasVerifiedAge()): ?>
60
+ <span><?php echo $this->__('Your age has been verified through iDIN.'); ?></span>
61
+ <?php else: ?>
62
+ <span>
63
+ <b><?php echo $this->__('Verify your age with iDIN'); ?></b><br/>
64
+ <?php echo $this->__('Your age has not yet been verified through iDIN or you&apos;re not at least 18 years of age'); ?>
65
+ </span>
66
+ <div class="action-wrapper">
67
+ <form action="<?php echo $this->getVerifyAgeWithIdinUrl(); ?>" method="post">
68
+ <?php echo $this->getIssuerSelectHtml(); ?>
69
+ <button type="submit" class="button"><?php echo $this->__('Verify age with iDIN') ?></button>
70
+ </form>
71
+ </div>
72
+ <?php endif; ?>
73
+ </div>
74
+ </div>
75
+ <?php endif; ?>
76
+ </div>
77
+ <?php endif; ?>
78
+
79
+ <?php /* Re-add original customer account info */ ?>
80
+ <?php echo $this->getChildHtml('info'); ?>
app/design/frontend/base/default/template/cmgroep/idin/register_login.phtml ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <div class="account-login idin <?php if ($this->getIsCheckout()): ?>account-login-checkout<?php endif; ?>">
33
+ <?php if ($this->getIsCheckout() == false): ?>
34
+ <div class="page-title">
35
+ <?php if ($this->getIsRegistration() || ($this->registrationEnabled() && $this->loginEnabled() == false)): ?>
36
+ <h1><?php echo $this->__('Create an Account with iDIN'); ?></h1>
37
+ <?php elseif ($this->registrationEnabled() == false && $this->loginEnabled()): ?>
38
+ <h1><?php echo $this->__('Login with iDIN'); ?></h1>
39
+ <?php else: ?>
40
+ <h1><?php echo $this->__('Login or Create an Account with iDIN'); ?></h1>
41
+ <?php endif; ?>
42
+ </div>
43
+ <?php endif; ?>
44
+ <form action="<?php echo $this->getFormAction(); ?>" method="post" class="idin-login-panel" id="idin-login-form">
45
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>">
46
+ <?php if ($this->getIsCheckout()): ?>
47
+ <input type="hidden" name="checkout" value="1">
48
+ <?php endif; ?>
49
+ <div class="info">
50
+ <div class="idin-logo"></div>
51
+ <div class="introduction">
52
+ <p class="introduction-text"><?php echo $this->__('iDIN is a secure way of identifying yourself with the merchant. It enables quick registration and login through your bank.') ?>
53
+ <br/>
54
+ <a href="https://www.idin.nl/consumenten/" target="_blank" class="what-is-idin"><?php echo $this->__('What is iDIN?'); ?></a>
55
+ </p>
56
+ </div>
57
+ </div>
58
+ <div class="select-issuer">
59
+ <div class="form-group">
60
+ <label for="idin_issuer_select"><?php echo $this->__('Select your bank') ?></label>
61
+ <?php echo $this->getIssuerSelectHtml(); ?>
62
+ </div>
63
+ </div>
64
+ <div class="actions">
65
+ <div class="action-wrapper">
66
+ <?php if ($this->registrationEnabled()): ?>
67
+ <button type="submit" class="button register" name="form_action" value="register" title="<?php echo $this->__('Register with iDIN'); ?>"><span><span><?php echo $this->__('Register with iDIN'); ?></span></span></button>
68
+ <?php endif; ?>
69
+ <?php if ($this->getIsRegistration() != 1): ?>
70
+ <?php if ($this->loginEnabled()): ?>
71
+ <button type="submit" class="button login" name="form_action" value="login" title="<?php echo $this->__('Login with iDIN'); ?>"><span><span><?php echo $this->__('Login with iDIN'); ?></span></span></button>
72
+ <?php endif; ?>
73
+ <?php endif; ?>
74
+ </div>
75
+ </div>
76
+ </form>
77
+ <script type="text/javascript">
78
+ var idinForm = new VarienForm('idin-login-form');
79
+ </script>
80
+ </div>
app/design/frontend/base/default/template/cmgroep/idin/registration/finish.phtml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2016 CM Groep
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * @category CMGroep
26
+ * @package Idin
27
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
28
+ * @copyright 2016-2017 CM Groep
29
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
30
+ */
31
+ ?>
32
+ <div class="finish-registration idin">
33
+ <div class="page-title">
34
+ <h1><?php echo $this->__('Finish your registration'); ?></h1>
35
+ </div>
36
+ <form action="<?php echo $this->getFormAction() ?>" id="idin-finish-form" method="post" class="idin-login-panel">
37
+ <input type="hidden" name="trxid" value="<?php echo $this->getTransactionId() ?>">
38
+ <input type="hidden" name="ec" value="<?php echo $this->getEntranceCode() ?>">
39
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>">
40
+ <div class="info">
41
+ <div class="idin-logo"></div>
42
+ <div class="introduction">
43
+ <p><?php echo $this->__('Registration with iDIN is almost complete. Please enter your email address in order to finish your registration.') ?></p>
44
+ </div>
45
+ </div>
46
+ <div class="finish-form">
47
+ <div class="form-group">
48
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address'); ?></label>
49
+ <input type="text" name="email" id="email_address" placeholder="<?php echo $this->__('Please enter your email address') ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Email Address')) ?>" class="cmgroep__idin__input validate-email required-entry" />
50
+ </div>
51
+ <div class="clearfix"></div>
52
+ <div class="form-group">
53
+ <label for="phone_number" class="required"><em>*</em><?php echo $this->__('Phone Number'); ?></label>
54
+ <input type="text" name="phone_number" id="phone_number" placeholder="<?php echo $this->__('Please enter your phone number') ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Phone Number')) ?>" class="cmgroep__idin__input required-entry" />
55
+ </div>
56
+ <div class="form-group">
57
+ <label for="enable_password"><input type="checkbox" id="enable_password" name="enable_password" onclick="$('password_wrapper').toggle();"> <?php echo $this->__('Enable login with password'); ?></label>
58
+ </div>
59
+ <div class="password-wrapper" id="password_wrapper" style="display: none;">
60
+ <div class="clearfix"></div>
61
+ <div class="form-group">
62
+ <label for="password"><?php echo $this->__('Optional password'); ?></label>
63
+ <input type="password" name="password" id="password" placeholder="<?php echo $this->__('Optionally specify a password') ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Optionally specify a password')) ?>" class="cmgroep__idin__input validate-password" />
64
+ </div>
65
+ <div class="clearfix"></div>
66
+ <div class="form-group">
67
+ <label for="password_confirm"><?php echo $this->__('Repeat password'); ?></label>
68
+ <input type="password" name="password_confirm" id="password_confirm" placeholder="<?php echo $this->__('If specified, please confirm your password') ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('If specified, please confirm your password')) ?>" class="cmgroep__idin__input" />
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="actions">
73
+ <div class="action-wrapper">
74
+ <button type="submit" class="button register" title="<?php echo $this->__('Login with iDIN'); ?>"><span><span><?php echo $this->__('Complete Registration'); ?></span></span></button>
75
+ <button type="button" onclick="window.location = '<?php echo $this->getUrl('customer/account/login') ?>'" class="button danger" title="<?php echo $this->__('Cancel Registration'); ?>"><span><span><?php echo $this->__('Cancel Registration'); ?></span></span></button>
76
+ </div>
77
+ </div>
78
+ </form>
79
+ <script type="text/javascript">
80
+ var idinForm = new VarienForm('idin-finish-form');
81
+ </script>
82
+ </div>
app/etc/modules/CMGroep_Idin.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <CMGroep_Idin>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Customer />
9
+ </depends>
10
+ </CMGroep_Idin>
11
+ </modules>
12
+ </config>
app/locale/en_US/template/email/cmgroep/idin/registration_confirmation.html ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject Welcome, {{var customer.name}}! @-->
2
+ <!--@vars
3
+ {"store url=\"\"":"Store Url",
4
+ "var logo_url":"Email Logo Image Url",
5
+ "htmlescape var=$customer.name":"Customer Name",
6
+ "store url=\"customer/account/\"":"Customer Account Url",
7
+ "var customer.email":"Customer Email",
8
+ "htmlescape var=$customer.password":"Customer Password"}
9
+ @-->
10
+
11
+ <!--@styles
12
+ @-->
13
+
14
+ {{template config_path="design/email/header"}}
15
+ {{inlinecss file="email-inline.css"}}
16
+
17
+ <table cellpadding="0" cellspacing="0" border="0">
18
+ <tr>
19
+ <td class="action-content">
20
+ <h1>Welcome to {{var store.getFrontendName()}}.</h1>
21
+ <p>Thanks for registering with iDIN. To log in when visiting our site just click <a href="{{store url="customer/account/"}}">Login</a>, pick your bank and benefit from quick login.</p>
22
+ <p>When you log in to your account, you will be able to do the following:</p>
23
+ <ul>
24
+ <li>Proceed through checkout faster when making a purchase</li>
25
+ <li>Check the status of orders</li>
26
+ <li>View past orders</li>
27
+ <li>Make changes to your account information</li>
28
+ <li>Store alternative addresses (for shipping to multiple family members and friends!)</li>
29
+ </ul>
30
+ <p>
31
+ If you have any questions, please feel free to contact us at
32
+ <a href="mailto:{{var store_email}}">{{var store_email}}</a>
33
+ {{depend store_phone}} or by phone at <a href="tel:{{var phone}}">{{var store_phone}}</a>{{/depend}}.
34
+ </p>
35
+ </td>
36
+ </tr>
37
+ </table>
38
+
39
+ {{template config_path="design/email/footer"}}
app/locale/nl_NL/CMGroep_Idin.csv ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "18+ Age Verification with iDIN","18+ leeftijd verificatie met iDIN"
2
+ "18+ Product","18+ Product"
3
+ "A customer with the same iDIN identity already exists!","Een klant met dezelfde iDIN identiteit bestaat al!"
4
+ "Active","Actief"
5
+ "Age Verification","Leeftijd Verificatie"
6
+ "Age Verification Required","Leeftijd Verificatie Verplicht"
7
+ "Always","Altijd"
8
+ "Can\'t place order, please verify your age in order to continue.","Kan bestelling niet plaatsen, verifieer uw leeftijd in om verder te gaan."
9
+ "Common settings","Algemene instellingen"
10
+ "Common settings and account details","Algemene instellingen en accountgegevens"
11
+ "Complete Registration","Voltooi registratie"
12
+ "Connect with iDIN","Registreer met iDIN"
13
+ "Connect your account with iDIN and benefit from faster login.","Registreer met iDIN en profiteer van een snellere login."
14
+ "Continue","Doorgaan"
15
+ "Could not create a new customer session!","Kan geen nieuwe klant sessie maken!"
16
+ "Could not find a matching account, please make sure your account is linked with iDIN.","Kan een bijpassende account vinden, zorg ervoor dat uw account is gekoppeld aan iDIN."
17
+ "Create a support ticket","Maak een support ticket"
18
+ "Create an Account with iDIN","Creeer een account met iDIN"
19
+ "Customer #","Klant #"
20
+ "Date","Datum"
21
+ "Details for transaction %s","Details van transactie %s"
22
+ "Documentation:","Documentatie:"
23
+ "Email Address","E-mailadres"
24
+ "Email Confirmation Template","E-mail Bevestiging Template"
25
+ "Email:","E-mail:"
26
+ "Emailaddress is already in use","Emailadres is al in gebruik"
27
+ "Entrance Code","Entrance Code"
28
+ "Epartment E-commerce","Epartment E-commerce"
29
+ "Failed to create a new account!","Niet in geslaagd om een ​​nieuwe account aan te maken!"
30
+ "Finish your registration","Voltooi uw registratie"
31
+ "If you need help by filling out your account details or settings up common settings, please contact CM Groep.","Als u hulp nodig heeft bij het invullen van uw accountgegevens of algemene instellingen, neem dan contact op met CM Groep."
32
+ "If you&apos;re experiencing issues or need help with advanced topics, please contact Epartment E-commerce.","Als u (installatie) problemen ondervindt of hulp nodig heeft met specifieke Magento onderwerpen, neem dan contact Epartment E-commerce."
33
+ "If you're experiencing issues or need help with advanced topics, please contact Epartment E-commerce.",""
34
+ "In order to continue, you need to verify your age through iDIN.","Om door te gaan moet u uw leeftijd middels iDIN verifieren."
35
+ "Invalid action","Ongeldige actie"
36
+ "Invalid data returned from iDIN issuer","Ongeldige gegevens terug van iDIN"
37
+ "Invalid request data","Ongeldig data verzoek"
38
+ "Live","Live"
39
+ "Loading next step...","Volgende stap laden ..."
40
+ "Login or Create an Account with iDIN","Inloggen of een account aanmaken met iDIN"
41
+ "Login or register with iDIN","Inloggen of registreren met iDIN"
42
+ "Login with iDIN","Inloggen met iDIN"
43
+ "Merchant Token","Merchant Token"
44
+ "Mode","Modus"
45
+ "Module support and advanced configuration","Module ondersteuning en geavanceerde configuratie"
46
+ "Only 18+ products","Alleen 18+ producten"
47
+ "Order #","Bestelling #"
48
+ "Phone Number","Telefoonnummer"
49
+ "Phone:","Telefoon:"
50
+ "Please enter your email address","Vul uw e-mailadres in"
51
+ "Please enter your phone number","Vul uw telefoonnummer in"
52
+ "Please note: every login action will result in a transaction with iDIN. There is a possibility this could lead to higher costs.","Let op: elke login actie zal resulteren in een transactie met iDIN. Dit kan leiden tot hogere kosten."
53
+ "Please select your bank","Selecteer uw bank"
54
+ "Please verify your age","Verifiëer uw leeftijd"
55
+ "Register with iDIN","Registreren met iDIN"
56
+ "Registration with iDIN","Registratie met iDIN"
57
+ "Registration with iDIN is almost complete. Please enter your email address in order to finish your registration.","Registratie met iDIN is bijna compleet. Vul uw e-mailadres in om uw registratie te voltooien."
58
+ "Save 18+ verification result","18+ verificatie resultaat opslaan"
59
+ "Select your bank","Selecteer uw bank"
60
+ "Shopping cart notice","Winkelmand opmerking"
61
+ "Show shopping cart notice","Toon winkelmand bericht"
62
+ "Succesfully connected your account with iDIN!","Succesvol verbonden met uw account via iDIN!"
63
+ "Succesfully logged in with iDIN!","Succesvol ingelogd met iDIN!"
64
+ "Succesfully registered with iDIN!","Succesvol geregistreerd bij iDIN!"
65
+ "Succesfully verified your age with iDIN!","Uw leeftijd is succesvol geverifiëerd met iDIN!"
66
+ "Support","Ondersteuning"
67
+ "Support:","Ondersteuning:"
68
+ "Test","Test"
69
+ "This module is being developed by Epartment E-commerce for CM Groep. Depending on your question you should contact Epartment E-commerce or CM Groep.","Deze module wordt ontwikkeld door Epartment E-commerce voor CM Groep. Afhankelijk van uw vraag kunt u contact opnemen Epartment E-commerce of CM Groep."
70
+ "Transaction #","Transactie #"
71
+ "Transaction Date","Transactie datum"
72
+ "Transaction ID","Transactie ID"
73
+ "Transaction Information","Transactie informatie"
74
+ "Transaction Response","Transactie antwoord"
75
+ "Verify age with iDIN","Verifiëer uw leeftijd via iDIN"
76
+ "Verify your age with iDIN","Verifiëer uw leeftijd via iDIN"
77
+ "What is iDIN?","Wat is iDIN?"
78
+ "Your Checkout Progress","Uw kassa voortgang"
79
+ "Your account is connected with iDIN!","Uw account is verbonden met iDIN!"
80
+ "Your age has been verified through iDIN.","Uw leeftijd is geverifiëerd via iDIN."
81
+ "Your age has been verified!","Uw leeftijd is geverifiëerd!"
82
+ "Your age has been verified, you can continue to checkout.","Uw leeftijd is geverifiëerd. U kunt verder gaan met afrekenen."
83
+ "Your age has not yet been verified through iDIN or you&apos;re not at least 18 years of age","Uw leeftijd is nog niet geverifiëerd via iDIN of u bent nog geen 18 jaar of ouder"
84
+ "iDIN","iDIN"
85
+ "iDIN Transaction Log","iDIN Transactie Log"
86
+ "iDIN Transactions","iDIN Transacties"
87
+ "iDIN extension documentation","iDIN extensie documentatie"
88
+ "iDIN is a secure way of identifying yourself with the merchant. It enables quick registration and login through your bank.","iDIN is een veilige manier om u te identificeren voor de verkoper. Het zorgt voor een snelle registratie en login via uw bank."
89
+ "iDIN verification failed or canceled. Please try again later.","iDIN verificatie is mislukt of geannuleerd. Probeer het later opnieuw."
90
+ "iDIN verification succeeded, please finish your registration.","iDIN verificatie is gelukt, voltooi uw registratie."
91
+ "When set to &quot;No&quot;, the customer has to verify their age on every checkout.","Indien deze instelling op &quot;Nee&quot; staat, dient de klant bij elk bestelling opnieuw zijn/haar leeftijd te verifiëren."
92
+ "Cancel Registration","Registratie annuleren"
93
+ "Optional password","Optioneel wachtwoord"
94
+ "Repeat password","Herhaal wachtwoord"
95
+ "Optionally specify a password","Optioneel wachtwoord"
96
+ "If specified, please confirm your password","Optioneel wachtwoord bevestigen"
97
+ "Enable login with password","Inloggen met wachtwoord inschakelen"
98
+ "Show notice on product page","Toon bericht op productpagina"
99
+ "Product page notice","Productpagina bericht"
100
+ "Extension version:","Extensie versie:"
101
+ "The iDIN transaction has been cancelled.","De iDIN transactie is geannuleerd."
102
+ "iDIN transaction failed. Please try again later.","iDIN transactie mislukt. Probeer het later opnieuw."
103
+ "iDIN verification failed. Please try again later.","iDIN leeftijdsverificatie mislukt. Probeer het later opnieuw."
lib/CMGroep/Idin/autoload.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * iDIN API
5
+ *
6
+ * CMGroep iDIN API
7
+ *
8
+ * OpenAPI spec version: 1.0.0
9
+ *
10
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+
25
+ /**
26
+ * An example of a project-specific implementation.
27
+ *
28
+ * After registering this autoload function with SPL, the following line
29
+ * would cause the function to attempt to load the \CMGroep\Idin\Baz\Qux class
30
+ * from /path/to/project/src/Baz/Qux.php:
31
+ *
32
+ * new \CMGroep\Idin\Baz\Qux;
33
+ *
34
+ * @param string $class The fully-qualified class name.
35
+ *
36
+ * @return void
37
+ */
38
+ spl_autoload_register(function ($class) {
39
+
40
+ // project-specific namespace prefix
41
+ $prefix = 'CMGroep\\Idin\\';
42
+
43
+ // base directory for the namespace prefix
44
+ $base_dir = __DIR__ . '/src/';
45
+
46
+ // does the class use the namespace prefix?
47
+ $len = strlen($prefix);
48
+ if (strncmp($prefix, $class, $len) !== 0) {
49
+ // no, move to the next registered autoloader
50
+ return;
51
+ }
52
+
53
+ // get the relative class name
54
+ $relative_class = substr($class, $len);
55
+
56
+ // replace the namespace prefix with the base directory, replace namespace
57
+ // separators with directory separators in the relative class name, append
58
+ // with .php
59
+ $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
60
+
61
+ // if the file exists, require it
62
+ if (file_exists($file)) {
63
+ require $file;
64
+ }
65
+ });
lib/CMGroep/Idin/src/Api/IdinApi.php ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IdinApi
4
+ * PHP version 5
5
+ *
6
+ * @category Class
7
+ * @package CMGroep\Idin
8
+ * @author http://github.com/swagger-api/swagger-codegen
9
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
10
+ * @link https://github.com/swagger-api/swagger-codegen
11
+ */
12
+
13
+ /**
14
+ * iDIN API
15
+ *
16
+ * CMGroep iDIN API
17
+ *
18
+ * OpenAPI spec version: 1.0.0
19
+ *
20
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
21
+ *
22
+ * Licensed under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License.
24
+ * You may obtain a copy of the License at
25
+ *
26
+ * http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software
29
+ * distributed under the License is distributed on an "AS IS" BASIS,
30
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ * See the License for the specific language governing permissions and
32
+ * limitations under the License.
33
+ */
34
+
35
+ /**
36
+ * NOTE: This class is auto generated by the swagger code generator program.
37
+ * https://github.com/swagger-api/swagger-codegen
38
+ * Do not edit the class manually.
39
+ */
40
+
41
+ namespace CMGroep\Idin\Api;
42
+
43
+ use \CMGroep\Idin\Configuration;
44
+ use \CMGroep\Idin\ApiClient;
45
+ use \CMGroep\Idin\ApiException;
46
+ use \CMGroep\Idin\ObjectSerializer;
47
+
48
+ /**
49
+ * IdinApi Class Doc Comment
50
+ *
51
+ * @category Class
52
+ * @package CMGroep\Idin
53
+ * @author http://github.com/swagger-api/swagger-codegen
54
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
55
+ * @link https://github.com/swagger-api/swagger-codegen
56
+ */
57
+ class IdinApi
58
+ {
59
+
60
+ /**
61
+ * API Client
62
+ *
63
+ * @var \CMGroep\Idin\ApiClient instance of the ApiClient
64
+ */
65
+ protected $apiClient;
66
+
67
+ /**
68
+ * Constructor
69
+ *
70
+ * @param \CMGroep\Idin\ApiClient|null $apiClient The api client to use
71
+ */
72
+ public function __construct(\CMGroep\Idin\ApiClient $apiClient = null)
73
+ {
74
+ if ($apiClient == null) {
75
+ $apiClient = new ApiClient();
76
+ $apiClient->getConfig()->setHost('https://idin-staging.cmhosting.nl/prod/idin/v1.0');
77
+ }
78
+
79
+ $this->apiClient = $apiClient;
80
+ }
81
+
82
+ /**
83
+ * Get API client
84
+ *
85
+ * @return \CMGroep\Idin\ApiClient get the API client
86
+ */
87
+ public function getApiClient()
88
+ {
89
+ return $this->apiClient;
90
+ }
91
+
92
+ /**
93
+ * Set the API client
94
+ *
95
+ * @param \CMGroep\Idin\ApiClient $apiClient set the API client
96
+ *
97
+ * @return IdinApi
98
+ */
99
+ public function setApiClient(\CMGroep\Idin\ApiClient $apiClient)
100
+ {
101
+ $this->apiClient = $apiClient;
102
+ return $this;
103
+ }
104
+
105
+ /**
106
+ * Operation directoryPost
107
+ *
108
+ * Retrieve issuer directory
109
+ *
110
+ * @param \CMGroep\Idin\Models\DirectoryRequest $merchant_token (optional)
111
+ * @return \CMGroep\Idin\Models\DirectoryResponse[]
112
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
113
+ */
114
+ public function directoryPost($merchant_token = null)
115
+ {
116
+ list($response) = $this->directoryPostWithHttpInfo($merchant_token);
117
+ return $response;
118
+ }
119
+
120
+ /**
121
+ * Operation directoryPostWithHttpInfo
122
+ *
123
+ * Retrieve issuer directory
124
+ *
125
+ * @param \CMGroep\Idin\Models\DirectoryRequest $merchant_token (optional)
126
+ * @return Array of \CMGroep\Idin\Models\DirectoryResponse[], HTTP status code, HTTP response headers (array of strings)
127
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
128
+ */
129
+ public function directoryPostWithHttpInfo($merchant_token = null)
130
+ {
131
+ // parse inputs
132
+ $resourcePath = "/directory";
133
+ $httpBody = '';
134
+ $queryParams = array();
135
+ $headerParams = array();
136
+ $formParams = array();
137
+ $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));
138
+ if (!is_null($_header_accept)) {
139
+ $headerParams['Accept'] = $_header_accept;
140
+ }
141
+ $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
142
+
143
+ // default format to json
144
+ $resourcePath = str_replace("{format}", "json", $resourcePath);
145
+
146
+ // body params
147
+ $_tempBody = null;
148
+ if (isset($merchant_token)) {
149
+ $_tempBody = $merchant_token;
150
+ }
151
+
152
+ // for model (json/xml)
153
+ if (isset($_tempBody)) {
154
+ $httpBody = $_tempBody; // $_tempBody is the method argument, if present
155
+ } elseif (count($formParams) > 0) {
156
+ $httpBody = $formParams; // for HTTP post (form)
157
+ }
158
+ // make the API Call
159
+ try {
160
+ list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
161
+ $resourcePath,
162
+ 'POST',
163
+ $queryParams,
164
+ $httpBody,
165
+ $headerParams,
166
+ '\CMGroep\Idin\Models\DirectoryResponse[]',
167
+ '/directory'
168
+ );
169
+
170
+ return array($this->apiClient->getSerializer()->deserialize($response, '\CMGroep\Idin\Models\DirectoryResponse[]', $httpHeader), $statusCode, $httpHeader);
171
+ } catch (ApiException $e) {
172
+ switch ($e->getCode()) {
173
+ case 200:
174
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\DirectoryResponse[]', $e->getResponseHeaders());
175
+ $e->setResponseObject($data);
176
+ break;
177
+ default:
178
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\Error', $e->getResponseHeaders());
179
+ $e->setResponseObject($data);
180
+ break;
181
+ }
182
+
183
+ throw $e;
184
+ }
185
+ }
186
+
187
+ /**
188
+ * Operation merchantsMerchantTokenGet
189
+ *
190
+ * Retrieve merchant details
191
+ *
192
+ * @param string $merchant_token Merchant Token (required)
193
+ * @return \CMGroep\Idin\Models\MerchantResponse
194
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
195
+ */
196
+ public function merchantsMerchantTokenGet($merchant_token)
197
+ {
198
+ list($response) = $this->merchantsMerchantTokenGetWithHttpInfo($merchant_token);
199
+ return $response;
200
+ }
201
+
202
+ /**
203
+ * Operation merchantsMerchantTokenGetWithHttpInfo
204
+ *
205
+ * Retrieve merchant details
206
+ *
207
+ * @param string $merchant_token Merchant Token (required)
208
+ * @return Array of \CMGroep\Idin\Models\MerchantResponse, HTTP status code, HTTP response headers (array of strings)
209
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
210
+ */
211
+ public function merchantsMerchantTokenGetWithHttpInfo($merchant_token)
212
+ {
213
+ // verify the required parameter 'merchant_token' is set
214
+ if ($merchant_token === null) {
215
+ throw new \InvalidArgumentException('Missing the required parameter $merchant_token when calling merchantsMerchantTokenGet');
216
+ }
217
+ // parse inputs
218
+ $resourcePath = "/merchants/{merchant_token}";
219
+ $httpBody = '';
220
+ $queryParams = array();
221
+ $headerParams = array();
222
+ $formParams = array();
223
+ $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));
224
+ if (!is_null($_header_accept)) {
225
+ $headerParams['Accept'] = $_header_accept;
226
+ }
227
+ $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
228
+
229
+ // path params
230
+ if ($merchant_token !== null) {
231
+ $resourcePath = str_replace(
232
+ "{" . "merchant_token" . "}",
233
+ $this->apiClient->getSerializer()->toPathValue($merchant_token),
234
+ $resourcePath
235
+ );
236
+ }
237
+ // default format to json
238
+ $resourcePath = str_replace("{format}", "json", $resourcePath);
239
+
240
+
241
+ // for model (json/xml)
242
+ if (isset($_tempBody)) {
243
+ $httpBody = $_tempBody; // $_tempBody is the method argument, if present
244
+ } elseif (count($formParams) > 0) {
245
+ $httpBody = $formParams; // for HTTP post (form)
246
+ }
247
+ // make the API Call
248
+ try {
249
+ list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
250
+ $resourcePath,
251
+ 'GET',
252
+ $queryParams,
253
+ $httpBody,
254
+ $headerParams,
255
+ '\CMGroep\Idin\Models\MerchantResponse',
256
+ '/merchants/{merchant_token}'
257
+ );
258
+
259
+ return array($this->apiClient->getSerializer()->deserialize($response, '\CMGroep\Idin\Models\MerchantResponse', $httpHeader), $statusCode, $httpHeader);
260
+ } catch (ApiException $e) {
261
+ switch ($e->getCode()) {
262
+ case 200:
263
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\MerchantResponse', $e->getResponseHeaders());
264
+ $e->setResponseObject($data);
265
+ break;
266
+ default:
267
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\Error', $e->getResponseHeaders());
268
+ $e->setResponseObject($data);
269
+ break;
270
+ }
271
+
272
+ throw $e;
273
+ }
274
+ }
275
+
276
+ /**
277
+ * Operation statusPost
278
+ *
279
+ * Retrieve the status of a transaction
280
+ *
281
+ * @param \CMGroep\Idin\Models\StatusRequest $merchant_token (optional)
282
+ * @return \CMGroep\Idin\Models\StatusResponse
283
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
284
+ */
285
+ public function statusPost($merchant_token = null)
286
+ {
287
+ list($response) = $this->statusPostWithHttpInfo($merchant_token);
288
+ return $response;
289
+ }
290
+
291
+ /**
292
+ * Operation statusPostWithHttpInfo
293
+ *
294
+ * Retrieve the status of a transaction
295
+ *
296
+ * @param \CMGroep\Idin\Models\StatusRequest $merchant_token (optional)
297
+ * @return Array of \CMGroep\Idin\Models\StatusResponse, HTTP status code, HTTP response headers (array of strings)
298
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
299
+ */
300
+ public function statusPostWithHttpInfo($merchant_token = null)
301
+ {
302
+ // parse inputs
303
+ $resourcePath = "/status";
304
+ $httpBody = '';
305
+ $queryParams = array();
306
+ $headerParams = array();
307
+ $formParams = array();
308
+ $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));
309
+ if (!is_null($_header_accept)) {
310
+ $headerParams['Accept'] = $_header_accept;
311
+ }
312
+ $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
313
+
314
+ // default format to json
315
+ $resourcePath = str_replace("{format}", "json", $resourcePath);
316
+
317
+ // body params
318
+ $_tempBody = null;
319
+ if (isset($merchant_token)) {
320
+ $_tempBody = $merchant_token;
321
+ }
322
+
323
+ // for model (json/xml)
324
+ if (isset($_tempBody)) {
325
+ $httpBody = $_tempBody; // $_tempBody is the method argument, if present
326
+ } elseif (count($formParams) > 0) {
327
+ $httpBody = $formParams; // for HTTP post (form)
328
+ }
329
+ // make the API Call
330
+ try {
331
+ list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
332
+ $resourcePath,
333
+ 'POST',
334
+ $queryParams,
335
+ $httpBody,
336
+ $headerParams,
337
+ '\CMGroep\Idin\Models\StatusResponse',
338
+ '/status'
339
+ );
340
+
341
+ return array($this->apiClient->getSerializer()->deserialize($response, '\CMGroep\Idin\Models\StatusResponse', $httpHeader), $statusCode, $httpHeader);
342
+ } catch (ApiException $e) {
343
+ switch ($e->getCode()) {
344
+ case 200:
345
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\StatusResponse', $e->getResponseHeaders());
346
+ $e->setResponseObject($data);
347
+ break;
348
+ default:
349
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\Error', $e->getResponseHeaders());
350
+ $e->setResponseObject($data);
351
+ break;
352
+ }
353
+
354
+ throw $e;
355
+ }
356
+ }
357
+
358
+ /**
359
+ * Operation transactionPost
360
+ *
361
+ * Start a new iDIN transaction
362
+ *
363
+ * @param \CMGroep\Idin\Models\TransactionRequest $merchant_token (optional)
364
+ * @return \CMGroep\Idin\Models\TransactionResponse
365
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
366
+ */
367
+ public function transactionPost($merchant_token = null)
368
+ {
369
+ list($response) = $this->transactionPostWithHttpInfo($merchant_token);
370
+ return $response;
371
+ }
372
+
373
+ /**
374
+ * Operation transactionPostWithHttpInfo
375
+ *
376
+ * Start a new iDIN transaction
377
+ *
378
+ * @param \CMGroep\Idin\Models\TransactionRequest $merchant_token (optional)
379
+ * @return Array of \CMGroep\Idin\Models\TransactionResponse, HTTP status code, HTTP response headers (array of strings)
380
+ * @throws \CMGroep\Idin\ApiException on non-2xx response
381
+ */
382
+ public function transactionPostWithHttpInfo($merchant_token = null)
383
+ {
384
+ // parse inputs
385
+ $resourcePath = "/transaction";
386
+ $httpBody = '';
387
+ $queryParams = array();
388
+ $headerParams = array();
389
+ $formParams = array();
390
+ $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));
391
+ if (!is_null($_header_accept)) {
392
+ $headerParams['Accept'] = $_header_accept;
393
+ }
394
+ $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
395
+
396
+ // default format to json
397
+ $resourcePath = str_replace("{format}", "json", $resourcePath);
398
+
399
+ // body params
400
+ $_tempBody = null;
401
+ if (isset($merchant_token)) {
402
+ $_tempBody = $merchant_token;
403
+ }
404
+
405
+ // for model (json/xml)
406
+ if (isset($_tempBody)) {
407
+ $httpBody = $_tempBody; // $_tempBody is the method argument, if present
408
+ } elseif (count($formParams) > 0) {
409
+ $httpBody = $formParams; // for HTTP post (form)
410
+ }
411
+ // make the API Call
412
+ try {
413
+ list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
414
+ $resourcePath,
415
+ 'POST',
416
+ $queryParams,
417
+ $httpBody,
418
+ $headerParams,
419
+ '\CMGroep\Idin\Models\TransactionResponse',
420
+ '/transaction'
421
+ );
422
+
423
+ return array($this->apiClient->getSerializer()->deserialize($response, '\CMGroep\Idin\Models\TransactionResponse', $httpHeader), $statusCode, $httpHeader);
424
+ } catch (ApiException $e) {
425
+ switch ($e->getCode()) {
426
+ case 200:
427
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\TransactionResponse', $e->getResponseHeaders());
428
+ $e->setResponseObject($data);
429
+ break;
430
+ default:
431
+ $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\CMGroep\Idin\Models\Error', $e->getResponseHeaders());
432
+ $e->setResponseObject($data);
433
+ break;
434
+ }
435
+
436
+ throw $e;
437
+ }
438
+ }
439
+
440
+ }
lib/CMGroep/Idin/src/ApiClient.php ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * ApiClient
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin;
43
+
44
+ /**
45
+ * ApiClient Class Doc Comment
46
+ *
47
+ * @category Class
48
+ * @package CMGroep\Idin
49
+ * @author http://github.com/swagger-api/swagger-codegen
50
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
51
+ * @link https://github.com/swagger-api/swagger-codegen
52
+ */
53
+ class ApiClient
54
+ {
55
+
56
+ public static $PATCH = "PATCH";
57
+ public static $POST = "POST";
58
+ public static $GET = "GET";
59
+ public static $HEAD = "HEAD";
60
+ public static $OPTIONS = "OPTIONS";
61
+ public static $PUT = "PUT";
62
+ public static $DELETE = "DELETE";
63
+
64
+ /**
65
+ * Configuration
66
+ *
67
+ * @var Configuration
68
+ */
69
+ protected $config;
70
+
71
+ /**
72
+ * Object Serializer
73
+ *
74
+ * @var ObjectSerializer
75
+ */
76
+ protected $serializer;
77
+
78
+ /**
79
+ * Constructor of the class
80
+ *
81
+ * @param Configuration $config config for this ApiClient
82
+ */
83
+ public function __construct(\CMGroep\Idin\Configuration $config = null)
84
+ {
85
+ if ($config == null) {
86
+ $config = Configuration::getDefaultConfiguration();
87
+ }
88
+
89
+ $this->config = $config;
90
+ $this->serializer = new ObjectSerializer();
91
+ }
92
+
93
+ /**
94
+ * Get the config
95
+ *
96
+ * @return Configuration
97
+ */
98
+ public function getConfig()
99
+ {
100
+ return $this->config;
101
+ }
102
+
103
+ /**
104
+ * Get the serializer
105
+ *
106
+ * @return ObjectSerializer
107
+ */
108
+ public function getSerializer()
109
+ {
110
+ return $this->serializer;
111
+ }
112
+
113
+ /**
114
+ * Get API key (with prefix if set)
115
+ *
116
+ * @param string $apiKeyIdentifier name of apikey
117
+ *
118
+ * @return string API key with the prefix
119
+ */
120
+ public function getApiKeyWithPrefix($apiKeyIdentifier)
121
+ {
122
+ $prefix = $this->config->getApiKeyPrefix($apiKeyIdentifier);
123
+ $apiKey = $this->config->getApiKey($apiKeyIdentifier);
124
+
125
+ if (!isset($apiKey)) {
126
+ return null;
127
+ }
128
+
129
+ if (isset($prefix)) {
130
+ $keyWithPrefix = $prefix." ".$apiKey;
131
+ } else {
132
+ $keyWithPrefix = $apiKey;
133
+ }
134
+
135
+ return $keyWithPrefix;
136
+ }
137
+
138
+ /**
139
+ * Make the HTTP call (Sync)
140
+ *
141
+ * @param string $resourcePath path to method endpoint
142
+ * @param string $method method to call
143
+ * @param array $queryParams parameters to be place in query URL
144
+ * @param array $postData parameters to be placed in POST body
145
+ * @param array $headerParams parameters to be place in request header
146
+ * @param string $responseType expected response type of the endpoint
147
+ * @param string $endpointPath path to method endpoint before expanding parameters
148
+ *
149
+ * @throws \CMGroep\Idin\ApiException on a non 2xx response
150
+ * @return mixed
151
+ */
152
+ public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null, $endpointPath = null)
153
+ {
154
+
155
+ $headers = array();
156
+
157
+ // construct the http header
158
+ $headerParams = array_merge(
159
+ (array)$this->config->getDefaultHeaders(),
160
+ (array)$headerParams
161
+ );
162
+
163
+ foreach ($headerParams as $key => $val) {
164
+ $headers[] = "$key: $val";
165
+ }
166
+
167
+ // form data
168
+ if ($postData and in_array('Content-Type: application/x-www-form-urlencoded', $headers)) {
169
+ $postData = http_build_query($postData);
170
+ } elseif ((is_object($postData) or is_array($postData)) and !in_array('Content-Type: multipart/form-data', $headers)) { // json model
171
+ $postData = json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($postData));
172
+ }
173
+
174
+ $url = $this->config->getHost() . $resourcePath;
175
+
176
+ $curl = curl_init();
177
+ // set timeout, if needed
178
+ if ($this->config->getCurlTimeout() != 0) {
179
+ curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout());
180
+ }
181
+ // return the result on success, rather than just true
182
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
183
+
184
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
185
+
186
+ // disable SSL verification, if needed
187
+ if ($this->config->getSSLVerification() == false) {
188
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
189
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
190
+ }
191
+
192
+ if (!empty($queryParams)) {
193
+ $url = ($url . '?' . http_build_query($queryParams));
194
+ }
195
+
196
+ if ($method == self::$POST) {
197
+ curl_setopt($curl, CURLOPT_POST, true);
198
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
199
+ } elseif ($method == self::$HEAD) {
200
+ curl_setopt($curl, CURLOPT_NOBODY, true);
201
+ } elseif ($method == self::$OPTIONS) {
202
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "OPTIONS");
203
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
204
+ } elseif ($method == self::$PATCH) {
205
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH");
206
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
207
+ } elseif ($method == self::$PUT) {
208
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
209
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
210
+ } elseif ($method == self::$DELETE) {
211
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
212
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
213
+ } elseif ($method != self::$GET) {
214
+ throw new \CMGroep\Idin\ApiException('Method ' . $method . ' is not recognized.');
215
+ }
216
+ curl_setopt($curl, CURLOPT_URL, $url);
217
+
218
+ // Set user agent
219
+ curl_setopt($curl, CURLOPT_USERAGENT, $this->config->getUserAgent());
220
+
221
+ // debugging for curl
222
+ if ($this->config->getDebug()) {
223
+ error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
224
+
225
+ curl_setopt($curl, CURLOPT_VERBOSE, 1);
226
+ curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a'));
227
+ } else {
228
+ curl_setopt($curl, CURLOPT_VERBOSE, 0);
229
+ }
230
+
231
+ // obtain the HTTP response headers
232
+ curl_setopt($curl, CURLOPT_HEADER, 1);
233
+
234
+ // Make the request
235
+ $response = curl_exec($curl);
236
+ $http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
237
+ $http_header = $this->httpParseHeaders(substr($response, 0, $http_header_size));
238
+ $http_body = substr($response, $http_header_size);
239
+ $response_info = curl_getinfo($curl);
240
+
241
+ // debug HTTP response body
242
+ if ($this->config->getDebug()) {
243
+ error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
244
+ }
245
+
246
+ // Handle the response
247
+ if ($response_info['http_code'] == 0) {
248
+ $curl_error_message = curl_error($curl);
249
+
250
+ // curl_exec can sometimes fail but still return a blank message from curl_error().
251
+ if (!empty($curl_error_message)) {
252
+ $error_message = "API call to $url failed: $curl_error_message";
253
+ } else {
254
+ $error_message = "API call to $url failed, but for an unknown reason. " .
255
+ "This could happen if you are disconnected from the network.";
256
+ }
257
+
258
+ $exception = new ApiException($error_message, 0, null, null);
259
+ $exception->setResponseObject($response_info);
260
+ throw $exception;
261
+ } elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299) {
262
+ // return raw body if response is a file
263
+ if ($responseType == '\SplFileObject' || $responseType == 'string') {
264
+ return array($http_body, $response_info['http_code'], $http_header);
265
+ }
266
+
267
+ $data = json_decode($http_body);
268
+ if (json_last_error() > 0) { // if response is a string
269
+ $data = $http_body;
270
+ }
271
+ } else {
272
+ $data = json_decode($http_body);
273
+ if (json_last_error() > 0) { // if response is a string
274
+ $data = $http_body;
275
+ }
276
+
277
+ throw new \CMGroep\Idin\ApiException(
278
+ "[".$response_info['http_code']."] Error connecting to the API ($url)",
279
+ $response_info['http_code'],
280
+ $http_header,
281
+ $data
282
+ );
283
+ }
284
+ return array($data, $response_info['http_code'], $http_header);
285
+ }
286
+
287
+ /**
288
+ * Return the header 'Accept' based on an array of Accept provided
289
+ *
290
+ * @param string[] $accept Array of header
291
+ *
292
+ * @return string Accept (e.g. application/json)
293
+ */
294
+ public function selectHeaderAccept($accept)
295
+ {
296
+ if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) {
297
+ return null;
298
+ } elseif (preg_grep("/application\/json/i", $accept)) {
299
+ return 'application/json';
300
+ } else {
301
+ return implode(',', $accept);
302
+ }
303
+ }
304
+
305
+ /**
306
+ * Return the content type based on an array of content-type provided
307
+ *
308
+ * @param string[] $content_type Array fo content-type
309
+ *
310
+ * @return string Content-Type (e.g. application/json)
311
+ */
312
+ public function selectHeaderContentType($content_type)
313
+ {
314
+ if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) {
315
+ return 'application/json';
316
+ } elseif (preg_grep("/application\/json/i", $content_type)) {
317
+ return 'application/json';
318
+ } else {
319
+ return implode(',', $content_type);
320
+ }
321
+ }
322
+
323
+ /**
324
+ * Return an array of HTTP response headers
325
+ *
326
+ * @param string $raw_headers A string of raw HTTP response headers
327
+ *
328
+ * @return string[] Array of HTTP response heaers
329
+ */
330
+ protected function httpParseHeaders($raw_headers)
331
+ {
332
+ // ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986
333
+ $headers = array();
334
+ $key = '';
335
+
336
+ foreach (explode("\n", $raw_headers) as $h) {
337
+ $h = explode(':', $h, 2);
338
+
339
+ if (isset($h[1])) {
340
+ if (!isset($headers[$h[0]])) {
341
+ $headers[$h[0]] = trim($h[1]);
342
+ } elseif (is_array($headers[$h[0]])) {
343
+ $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
344
+ } else {
345
+ $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
346
+ }
347
+
348
+ $key = $h[0];
349
+ } else {
350
+ if (substr($h[0], 0, 1) == "\t") {
351
+ $headers[$key] .= "\r\n\t".trim($h[0]);
352
+ } elseif (!$key) {
353
+ $headers[0] = trim($h[0]);
354
+ }
355
+ trim($h[0]);
356
+ }
357
+ }
358
+
359
+ return $headers;
360
+ }
361
+ }
lib/CMGroep/Idin/src/ApiException.php ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * ApiException
4
+ * PHP version 5
5
+ *
6
+ * @category Class
7
+ * @package CMGroep\Idin
8
+ * @author http://github.com/swagger-api/swagger-codegen
9
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
10
+ * @link https://github.com/swagger-api/swagger-codegen
11
+ */
12
+
13
+ /**
14
+ * iDIN API
15
+ *
16
+ * CMGroep iDIN API
17
+ *
18
+ * OpenAPI spec version: 1.0.0
19
+ *
20
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
21
+ *
22
+ * Licensed under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License.
24
+ * You may obtain a copy of the License at
25
+ *
26
+ * http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software
29
+ * distributed under the License is distributed on an "AS IS" BASIS,
30
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ * See the License for the specific language governing permissions and
32
+ * limitations under the License.
33
+ */
34
+
35
+ /**
36
+ * NOTE: This class is auto generated by the swagger code generator program.
37
+ * https://github.com/swagger-api/swagger-codegen
38
+ * Do not edit the class manually.
39
+ */
40
+
41
+ namespace CMGroep\Idin;
42
+
43
+ use \Exception;
44
+
45
+ /**
46
+ * ApiException Class Doc Comment
47
+ *
48
+ * @category Class
49
+ * @package CMGroep\Idin
50
+ * @author http://github.com/swagger-api/swagger-codegen
51
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
52
+ * @link https://github.com/swagger-api/swagger-codegen
53
+ */
54
+ class ApiException extends Exception
55
+ {
56
+
57
+ /**
58
+ * The HTTP body of the server response either as Json or string.
59
+ *
60
+ * @var mixed
61
+ */
62
+ protected $responseBody;
63
+
64
+ /**
65
+ * The HTTP header of the server response.
66
+ *
67
+ * @var string[]
68
+ */
69
+ protected $responseHeaders;
70
+
71
+ /**
72
+ * The deserialized response object
73
+ *
74
+ * @var $responseObject;
75
+ */
76
+ protected $responseObject;
77
+
78
+ /**
79
+ * Constructor
80
+ *
81
+ * @param string $message Error message
82
+ * @param int $code HTTP status code
83
+ * @param string $responseHeaders HTTP response header
84
+ * @param mixed $responseBody HTTP body of the server response either as Json or string
85
+ */
86
+ public function __construct($message = "", $code = 0, $responseHeaders = null, $responseBody = null)
87
+ {
88
+ parent::__construct($message, $code);
89
+ $this->responseHeaders = $responseHeaders;
90
+ $this->responseBody = $responseBody;
91
+ }
92
+
93
+ /**
94
+ * Gets the HTTP response header
95
+ *
96
+ * @return string HTTP response header
97
+ */
98
+ public function getResponseHeaders()
99
+ {
100
+ return $this->responseHeaders;
101
+ }
102
+
103
+ /**
104
+ * Gets the HTTP body of the server response either as Json or string
105
+ *
106
+ * @return mixed HTTP body of the server response either as Json or string
107
+ */
108
+ public function getResponseBody()
109
+ {
110
+ return $this->responseBody;
111
+ }
112
+
113
+ /**
114
+ * Sets the deseralized response object (during deserialization)
115
+ *
116
+ * @param mixed $obj Deserialized response object
117
+ *
118
+ * @return void
119
+ */
120
+ public function setResponseObject($obj)
121
+ {
122
+ $this->responseObject = $obj;
123
+ }
124
+
125
+ /**
126
+ * Gets the deseralized response object (during deserialization)
127
+ *
128
+ * @return mixed the deserialized response object
129
+ */
130
+ public function getResponseObject()
131
+ {
132
+ return $this->responseObject;
133
+ }
134
+ }
lib/CMGroep/Idin/src/Configuration.php ADDED
@@ -0,0 +1,531 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Configuration
4
+ * PHP version 5
5
+ *
6
+ * @category Class
7
+ * @package CMGroep\Idin
8
+ * @author http://github.com/swagger-api/swagger-codegen
9
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
10
+ * @link https://github.com/swagger-api/swagger-codegen
11
+ */
12
+
13
+ /**
14
+ * iDIN API
15
+ *
16
+ * CMGroep iDIN API
17
+ *
18
+ * OpenAPI spec version: 1.0.0
19
+ *
20
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
21
+ *
22
+ * Licensed under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License.
24
+ * You may obtain a copy of the License at
25
+ *
26
+ * http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software
29
+ * distributed under the License is distributed on an "AS IS" BASIS,
30
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ * See the License for the specific language governing permissions and
32
+ * limitations under the License.
33
+ */
34
+
35
+ /**
36
+ * NOTE: This class is auto generated by the swagger code generator program.
37
+ * https://github.com/swagger-api/swagger-codegen
38
+ * Do not edit the class manually.
39
+ */
40
+
41
+ namespace CMGroep\Idin;
42
+
43
+ /**
44
+ * Configuration Class Doc Comment
45
+ * PHP version 5
46
+ *
47
+ * @category Class
48
+ * @package CMGroep\Idin
49
+ * @author http://github.com/swagger-api/swagger-codegen
50
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
51
+ * @link https://github.com/swagger-api/swagger-codegen
52
+ */
53
+ class Configuration
54
+ {
55
+
56
+ private static $defaultConfiguration = null;
57
+
58
+ /**
59
+ * Associate array to store API key(s)
60
+ *
61
+ * @var string[]
62
+ */
63
+ protected $apiKeys = array();
64
+
65
+ /**
66
+ * Associate array to store API prefix (e.g. Bearer)
67
+ *
68
+ * @var string[]
69
+ */
70
+ protected $apiKeyPrefixes = array();
71
+
72
+ /**
73
+ * Access token for OAuth
74
+ *
75
+ * @var string
76
+ */
77
+ protected $accessToken = '';
78
+
79
+ /**
80
+ * Username for HTTP basic authentication
81
+ *
82
+ * @var string
83
+ */
84
+ protected $username = '';
85
+
86
+ /**
87
+ * Password for HTTP basic authentication
88
+ *
89
+ * @var string
90
+ */
91
+ protected $password = '';
92
+
93
+ /**
94
+ * The default instance of ApiClient
95
+ *
96
+ * @var \CMGroep\Idin\ApiClient
97
+ */
98
+ protected $defaultHeaders = array();
99
+
100
+ /**
101
+ * The host
102
+ *
103
+ * @var string
104
+ */
105
+ protected $host = 'https://idin-staging.cmhosting.nl/prod/idin/v1.0';
106
+
107
+ /**
108
+ * Timeout (second) of the HTTP request, by default set to 0, no timeout
109
+ *
110
+ * @var string
111
+ */
112
+ protected $curlTimeout = 0;
113
+
114
+ /**
115
+ * User agent of the HTTP request, set to "PHP-Swagger" by default
116
+ *
117
+ * @var string
118
+ */
119
+ protected $userAgent = "Swagger-Codegen/1.0.0/php";
120
+
121
+ /**
122
+ * Debug switch (default set to false)
123
+ *
124
+ * @var bool
125
+ */
126
+ protected $debug = false;
127
+
128
+ /**
129
+ * Debug file location (log to STDOUT by default)
130
+ *
131
+ * @var string
132
+ */
133
+ protected $debugFile = 'php://output';
134
+
135
+ /**
136
+ * Debug file location (log to STDOUT by default)
137
+ *
138
+ * @var string
139
+ */
140
+ protected $tempFolderPath;
141
+
142
+ /**
143
+ * Indicates if SSL verification should be enabled or disabled.
144
+ *
145
+ * This is useful if the host uses a self-signed SSL certificate.
146
+ *
147
+ * @var boolean True if the certificate should be validated, false otherwise.
148
+ */
149
+ protected $sslVerification = true;
150
+
151
+ /**
152
+ * Constructor
153
+ */
154
+ public function __construct()
155
+ {
156
+ $this->tempFolderPath = sys_get_temp_dir();
157
+ }
158
+
159
+ /**
160
+ * Sets API key
161
+ *
162
+ * @param string $apiKeyIdentifier API key identifier (authentication scheme)
163
+ * @param string $key API key or token
164
+ *
165
+ * @return Configuration
166
+ */
167
+ public function setApiKey($apiKeyIdentifier, $key)
168
+ {
169
+ $this->apiKeys[$apiKeyIdentifier] = $key;
170
+ return $this;
171
+ }
172
+
173
+ /**
174
+ * Gets API key
175
+ *
176
+ * @param string $apiKeyIdentifier API key identifier (authentication scheme)
177
+ *
178
+ * @return string API key or token
179
+ */
180
+ public function getApiKey($apiKeyIdentifier)
181
+ {
182
+ return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
183
+ }
184
+
185
+ /**
186
+ * Sets the prefix for API key (e.g. Bearer)
187
+ *
188
+ * @param string $apiKeyIdentifier API key identifier (authentication scheme)
189
+ * @param string $prefix API key prefix, e.g. Bearer
190
+ *
191
+ * @return Configuration
192
+ */
193
+ public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
194
+ {
195
+ $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
196
+ return $this;
197
+ }
198
+
199
+ /**
200
+ * Gets API key prefix
201
+ *
202
+ * @param string $apiKeyIdentifier API key identifier (authentication scheme)
203
+ *
204
+ * @return string
205
+ */
206
+ public function getApiKeyPrefix($apiKeyIdentifier)
207
+ {
208
+ return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
209
+ }
210
+
211
+ /**
212
+ * Sets the access token for OAuth
213
+ *
214
+ * @param string $accessToken Token for OAuth
215
+ *
216
+ * @return Configuration
217
+ */
218
+ public function setAccessToken($accessToken)
219
+ {
220
+ $this->accessToken = $accessToken;
221
+ return $this;
222
+ }
223
+
224
+ /**
225
+ * Gets the access token for OAuth
226
+ *
227
+ * @return string Access token for OAuth
228
+ */
229
+ public function getAccessToken()
230
+ {
231
+ return $this->accessToken;
232
+ }
233
+
234
+ /**
235
+ * Sets the username for HTTP basic authentication
236
+ *
237
+ * @param string $username Username for HTTP basic authentication
238
+ *
239
+ * @return Configuration
240
+ */
241
+ public function setUsername($username)
242
+ {
243
+ $this->username = $username;
244
+ return $this;
245
+ }
246
+
247
+ /**
248
+ * Gets the username for HTTP basic authentication
249
+ *
250
+ * @return string Username for HTTP basic authentication
251
+ */
252
+ public function getUsername()
253
+ {
254
+ return $this->username;
255
+ }
256
+
257
+ /**
258
+ * Sets the password for HTTP basic authentication
259
+ *
260
+ * @param string $password Password for HTTP basic authentication
261
+ *
262
+ * @return Configuration
263
+ */
264
+ public function setPassword($password)
265
+ {
266
+ $this->password = $password;
267
+ return $this;
268
+ }
269
+
270
+ /**
271
+ * Gets the password for HTTP basic authentication
272
+ *
273
+ * @return string Password for HTTP basic authentication
274
+ */
275
+ public function getPassword()
276
+ {
277
+ return $this->password;
278
+ }
279
+
280
+ /**
281
+ * Adds a default header
282
+ *
283
+ * @param string $headerName header name (e.g. Token)
284
+ * @param string $headerValue header value (e.g. 1z8wp3)
285
+ *
286
+ * @return ApiClient
287
+ */
288
+ public function addDefaultHeader($headerName, $headerValue)
289
+ {
290
+ if (!is_string($headerName)) {
291
+ throw new \InvalidArgumentException('Header name must be a string.');
292
+ }
293
+
294
+ $this->defaultHeaders[$headerName] = $headerValue;
295
+ return $this;
296
+ }
297
+
298
+ /**
299
+ * Gets the default header
300
+ *
301
+ * @return array An array of default header(s)
302
+ */
303
+ public function getDefaultHeaders()
304
+ {
305
+ return $this->defaultHeaders;
306
+ }
307
+
308
+ /**
309
+ * Deletes a default header
310
+ *
311
+ * @param string $headerName the header to delete
312
+ *
313
+ * @return Configuration
314
+ */
315
+ public function deleteDefaultHeader($headerName)
316
+ {
317
+ unset($this->defaultHeaders[$headerName]);
318
+ }
319
+
320
+ /**
321
+ * Sets the host
322
+ *
323
+ * @param string $host Host
324
+ *
325
+ * @return Configuration
326
+ */
327
+ public function setHost($host)
328
+ {
329
+ $this->host = $host;
330
+ return $this;
331
+ }
332
+
333
+ /**
334
+ * Gets the host
335
+ *
336
+ * @return string Host
337
+ */
338
+ public function getHost()
339
+ {
340
+ return $this->host;
341
+ }
342
+
343
+ /**
344
+ * Sets the user agent of the api client
345
+ *
346
+ * @param string $userAgent the user agent of the api client
347
+ *
348
+ * @return ApiClient
349
+ */
350
+ public function setUserAgent($userAgent)
351
+ {
352
+ if (!is_string($userAgent)) {
353
+ throw new \InvalidArgumentException('User-agent must be a string.');
354
+ }
355
+
356
+ $this->userAgent = $userAgent;
357
+ return $this;
358
+ }
359
+
360
+ /**
361
+ * Gets the user agent of the api client
362
+ *
363
+ * @return string user agent
364
+ */
365
+ public function getUserAgent()
366
+ {
367
+ return $this->userAgent;
368
+ }
369
+
370
+ /**
371
+ * Sets the HTTP timeout value
372
+ *
373
+ * @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
374
+ *
375
+ * @return ApiClient
376
+ */
377
+ public function setCurlTimeout($seconds)
378
+ {
379
+ if (!is_numeric($seconds) || $seconds < 0) {
380
+ throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.');
381
+ }
382
+
383
+ $this->curlTimeout = $seconds;
384
+ return $this;
385
+ }
386
+
387
+ /**
388
+ * Gets the HTTP timeout value
389
+ *
390
+ * @return string HTTP timeout value
391
+ */
392
+ public function getCurlTimeout()
393
+ {
394
+ return $this->curlTimeout;
395
+ }
396
+
397
+ /**
398
+ * Sets debug flag
399
+ *
400
+ * @param bool $debug Debug flag
401
+ *
402
+ * @return Configuration
403
+ */
404
+ public function setDebug($debug)
405
+ {
406
+ $this->debug = $debug;
407
+ return $this;
408
+ }
409
+
410
+ /**
411
+ * Gets the debug flag
412
+ *
413
+ * @return bool
414
+ */
415
+ public function getDebug()
416
+ {
417
+ return $this->debug;
418
+ }
419
+
420
+ /**
421
+ * Sets the debug file
422
+ *
423
+ * @param string $debugFile Debug file
424
+ *
425
+ * @return Configuration
426
+ */
427
+ public function setDebugFile($debugFile)
428
+ {
429
+ $this->debugFile = $debugFile;
430
+ return $this;
431
+ }
432
+
433
+ /**
434
+ * Gets the debug file
435
+ *
436
+ * @return string
437
+ */
438
+ public function getDebugFile()
439
+ {
440
+ return $this->debugFile;
441
+ }
442
+
443
+ /**
444
+ * Sets the temp folder path
445
+ *
446
+ * @param string $tempFolderPath Temp folder path
447
+ *
448
+ * @return Configuration
449
+ */
450
+ public function setTempFolderPath($tempFolderPath)
451
+ {
452
+ $this->tempFolderPath = $tempFolderPath;
453
+ return $this;
454
+ }
455
+
456
+ /**
457
+ * Gets the temp folder path
458
+ *
459
+ * @return string Temp folder path
460
+ */
461
+ public function getTempFolderPath()
462
+ {
463
+ return $this->tempFolderPath;
464
+ }
465
+
466
+ /**
467
+ * Sets if SSL verification should be enabled or disabled
468
+ *
469
+ * @param boolean $sslVerification True if the certificate should be validated, false otherwise
470
+ *
471
+ * @return Configuration
472
+ */
473
+ public function setSSLVerification($sslVerification)
474
+ {
475
+ $this->sslVerification = $sslVerification;
476
+ return $this;
477
+ }
478
+
479
+ /**
480
+ * Gets if SSL verification should be enabled or disabled
481
+ *
482
+ * @return boolean True if the certificate should be validated, false otherwise
483
+ */
484
+ public function getSSLVerification()
485
+ {
486
+ return $this->sslVerification;
487
+ }
488
+
489
+ /**
490
+ * Gets the default configuration instance
491
+ *
492
+ * @return Configuration
493
+ */
494
+ public static function getDefaultConfiguration()
495
+ {
496
+ if (self::$defaultConfiguration == null) {
497
+ self::$defaultConfiguration = new Configuration();
498
+ }
499
+
500
+ return self::$defaultConfiguration;
501
+ }
502
+
503
+ /**
504
+ * Sets the detault configuration instance
505
+ *
506
+ * @param Configuration $config An instance of the Configuration Object
507
+ *
508
+ * @return void
509
+ */
510
+ public static function setDefaultConfiguration(Configuration $config)
511
+ {
512
+ self::$defaultConfiguration = $config;
513
+ }
514
+
515
+ /**
516
+ * Gets the essential information for debugging
517
+ *
518
+ * @return string The report for debugging
519
+ */
520
+ public static function toDebugReport()
521
+ {
522
+ $report = 'PHP SDK (CMGroep\Idin) Debug Report:' . PHP_EOL;
523
+ $report .= ' OS: ' . php_uname() . PHP_EOL;
524
+ $report .= ' PHP Version: ' . phpversion() . PHP_EOL;
525
+ $report .= ' OpenAPI Spec Version: 1.0.0' . PHP_EOL;
526
+ $report .= ' SDK Package Version: 1.0.0' . PHP_EOL;
527
+ $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
528
+
529
+ return $report;
530
+ }
531
+ }
lib/CMGroep/Idin/src/Models/BaseRequest.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * BaseRequest
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * BaseRequest Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class BaseRequest implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'BaseRequest';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'merchant_token' => 'string'
70
+ );
71
+
72
+ public static function swaggerTypes()
73
+ {
74
+ return self::$swaggerTypes;
75
+ }
76
+
77
+ /**
78
+ * Array of attributes where the key is the local name, and the value is the original name
79
+ * @var string[]
80
+ */
81
+ protected static $attributeMap = array(
82
+ 'merchant_token' => 'merchant_token'
83
+ );
84
+
85
+ public static function attributeMap()
86
+ {
87
+ return self::$attributeMap;
88
+ }
89
+
90
+ /**
91
+ * Array of attributes to setter functions (for deserialization of responses)
92
+ * @var string[]
93
+ */
94
+ protected static $setters = array(
95
+ 'merchant_token' => 'setMerchantToken'
96
+ );
97
+
98
+ public static function setters()
99
+ {
100
+ return self::$setters;
101
+ }
102
+
103
+ /**
104
+ * Array of attributes to getter functions (for serialization of requests)
105
+ * @var string[]
106
+ */
107
+ protected static $getters = array(
108
+ 'merchant_token' => 'getMerchantToken'
109
+ );
110
+
111
+ public static function getters()
112
+ {
113
+ return self::$getters;
114
+ }
115
+
116
+
117
+
118
+
119
+
120
+ /**
121
+ * Associative array for storing property values
122
+ * @var mixed[]
123
+ */
124
+ protected $container = array();
125
+
126
+ /**
127
+ * Constructor
128
+ * @param mixed[] $data Associated array of property value initalizing the model
129
+ */
130
+ public function __construct(array $data = null)
131
+ {
132
+ $this->container['merchant_token'] = isset($data['merchant_token']) ? $data['merchant_token'] : null;
133
+
134
+ // Initialize discriminator property with the model name.
135
+ $discrimintor = array_search('baseRequest', self::$attributeMap);
136
+ $this->container[$discrimintor] = static::$swaggerModelName;
137
+ }
138
+
139
+ /**
140
+ * show all the invalid properties with reasons.
141
+ *
142
+ * @return array invalid properties with reasons
143
+ */
144
+ public function listInvalidProperties()
145
+ {
146
+ $invalid_properties = array();
147
+ if ($this->container['merchant_token'] === null) {
148
+ $invalid_properties[] = "'merchant_token' can't be null";
149
+ }
150
+ return $invalid_properties;
151
+ }
152
+
153
+ /**
154
+ * validate all the properties in the model
155
+ * return true if all passed
156
+ *
157
+ * @return bool True if all properteis are valid
158
+ */
159
+ public function valid()
160
+ {
161
+ if ($this->container['merchant_token'] === null) {
162
+ return false;
163
+ }
164
+ return true;
165
+ }
166
+
167
+
168
+ /**
169
+ * Gets merchant_token
170
+ * @return string
171
+ */
172
+ public function getMerchantToken()
173
+ {
174
+ return $this->container['merchant_token'];
175
+ }
176
+
177
+ /**
178
+ * Sets merchant_token
179
+ * @param string $merchant_token Security Token of the merchant
180
+ * @return $this
181
+ */
182
+ public function setMerchantToken($merchant_token)
183
+ {
184
+ $this->container['merchant_token'] = $merchant_token;
185
+
186
+ return $this;
187
+ }
188
+ /**
189
+ * Returns true if offset exists. False otherwise.
190
+ * @param integer $offset Offset
191
+ * @return boolean
192
+ */
193
+ public function offsetExists($offset)
194
+ {
195
+ return isset($this->container[$offset]);
196
+ }
197
+
198
+ /**
199
+ * Gets offset.
200
+ * @param integer $offset Offset
201
+ * @return mixed
202
+ */
203
+ public function offsetGet($offset)
204
+ {
205
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
206
+ }
207
+
208
+ /**
209
+ * Sets value based on offset.
210
+ * @param integer $offset Offset
211
+ * @param mixed $value Value to be set
212
+ * @return void
213
+ */
214
+ public function offsetSet($offset, $value)
215
+ {
216
+ if (is_null($offset)) {
217
+ $this->container[] = $value;
218
+ } else {
219
+ $this->container[$offset] = $value;
220
+ }
221
+ }
222
+
223
+ /**
224
+ * Unsets offset.
225
+ * @param integer $offset Offset
226
+ * @return void
227
+ */
228
+ public function offsetUnset($offset)
229
+ {
230
+ unset($this->container[$offset]);
231
+ }
232
+
233
+ /**
234
+ * Gets the string presentation of the object
235
+ * @return string
236
+ */
237
+ public function __toString()
238
+ {
239
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
240
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
241
+ }
242
+
243
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
244
+ }
245
+ }
246
+
247
+
lib/CMGroep/Idin/src/Models/DirectoryRequest.php ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DirectoryRequest
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * DirectoryRequest Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class DirectoryRequest extends BaseRequest implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'DirectoryRequest';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+
70
+ );
71
+
72
+ public static function swaggerTypes()
73
+ {
74
+ return self::$swaggerTypes + parent::swaggerTypes();
75
+ }
76
+
77
+ /**
78
+ * Array of attributes where the key is the local name, and the value is the original name
79
+ * @var string[]
80
+ */
81
+ protected static $attributeMap = array(
82
+
83
+ );
84
+
85
+ public static function attributeMap()
86
+ {
87
+ return parent::attributeMap() + self::$attributeMap;
88
+ }
89
+
90
+ /**
91
+ * Array of attributes to setter functions (for deserialization of responses)
92
+ * @var string[]
93
+ */
94
+ protected static $setters = array(
95
+
96
+ );
97
+
98
+ public static function setters()
99
+ {
100
+ return parent::setters() + self::$setters;
101
+ }
102
+
103
+ /**
104
+ * Array of attributes to getter functions (for serialization of requests)
105
+ * @var string[]
106
+ */
107
+ protected static $getters = array(
108
+
109
+ );
110
+
111
+ public static function getters()
112
+ {
113
+ return parent::getters() + self::$getters;
114
+ }
115
+
116
+
117
+
118
+
119
+
120
+ /**
121
+ * Associative array for storing property values
122
+ * @var mixed[]
123
+ */
124
+ protected $container = array();
125
+
126
+ /**
127
+ * Constructor
128
+ * @param mixed[] $data Associated array of property value initalizing the model
129
+ */
130
+ public function __construct(array $data = null)
131
+ {
132
+ parent::__construct($data);
133
+
134
+ }
135
+
136
+ /**
137
+ * show all the invalid properties with reasons.
138
+ *
139
+ * @return array invalid properties with reasons
140
+ */
141
+ public function listInvalidProperties()
142
+ {
143
+ $invalid_properties = array();
144
+ return $invalid_properties;
145
+ }
146
+
147
+ /**
148
+ * validate all the properties in the model
149
+ * return true if all passed
150
+ *
151
+ * @return bool True if all properteis are valid
152
+ */
153
+ public function valid()
154
+ {
155
+ return true;
156
+ }
157
+
158
+ /**
159
+ * Returns true if offset exists. False otherwise.
160
+ * @param integer $offset Offset
161
+ * @return boolean
162
+ */
163
+ public function offsetExists($offset)
164
+ {
165
+ return isset($this->container[$offset]);
166
+ }
167
+
168
+ /**
169
+ * Gets offset.
170
+ * @param integer $offset Offset
171
+ * @return mixed
172
+ */
173
+ public function offsetGet($offset)
174
+ {
175
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
176
+ }
177
+
178
+ /**
179
+ * Sets value based on offset.
180
+ * @param integer $offset Offset
181
+ * @param mixed $value Value to be set
182
+ * @return void
183
+ */
184
+ public function offsetSet($offset, $value)
185
+ {
186
+ if (is_null($offset)) {
187
+ $this->container[] = $value;
188
+ } else {
189
+ $this->container[$offset] = $value;
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Unsets offset.
195
+ * @param integer $offset Offset
196
+ * @return void
197
+ */
198
+ public function offsetUnset($offset)
199
+ {
200
+ unset($this->container[$offset]);
201
+ }
202
+
203
+ /**
204
+ * Gets the string presentation of the object
205
+ * @return string
206
+ */
207
+ public function __toString()
208
+ {
209
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
210
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
211
+ }
212
+
213
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
214
+ }
215
+ }
216
+
217
+
lib/CMGroep/Idin/src/Models/DirectoryResponse.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * DirectoryResponse
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * DirectoryResponse Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class DirectoryResponse implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'DirectoryResponse';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'country' => 'string',
70
+ 'issuers' => '\CMGroep\Idin\Models\Issuer[]'
71
+ );
72
+
73
+ public static function swaggerTypes()
74
+ {
75
+ return self::$swaggerTypes;
76
+ }
77
+
78
+ /**
79
+ * Array of attributes where the key is the local name, and the value is the original name
80
+ * @var string[]
81
+ */
82
+ protected static $attributeMap = array(
83
+ 'country' => 'country',
84
+ 'issuers' => 'issuers'
85
+ );
86
+
87
+ public static function attributeMap()
88
+ {
89
+ return self::$attributeMap;
90
+ }
91
+
92
+ /**
93
+ * Array of attributes to setter functions (for deserialization of responses)
94
+ * @var string[]
95
+ */
96
+ protected static $setters = array(
97
+ 'country' => 'setCountry',
98
+ 'issuers' => 'setIssuers'
99
+ );
100
+
101
+ public static function setters()
102
+ {
103
+ return self::$setters;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to getter functions (for serialization of requests)
108
+ * @var string[]
109
+ */
110
+ protected static $getters = array(
111
+ 'country' => 'getCountry',
112
+ 'issuers' => 'getIssuers'
113
+ );
114
+
115
+ public static function getters()
116
+ {
117
+ return self::$getters;
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Associative array for storing property values
126
+ * @var mixed[]
127
+ */
128
+ protected $container = array();
129
+
130
+ /**
131
+ * Constructor
132
+ * @param mixed[] $data Associated array of property value initalizing the model
133
+ */
134
+ public function __construct(array $data = null)
135
+ {
136
+ $this->container['country'] = isset($data['country']) ? $data['country'] : null;
137
+ $this->container['issuers'] = isset($data['issuers']) ? $data['issuers'] : null;
138
+ }
139
+
140
+ /**
141
+ * show all the invalid properties with reasons.
142
+ *
143
+ * @return array invalid properties with reasons
144
+ */
145
+ public function listInvalidProperties()
146
+ {
147
+ $invalid_properties = array();
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ return true;
160
+ }
161
+
162
+
163
+ /**
164
+ * Gets country
165
+ * @return string
166
+ */
167
+ public function getCountry()
168
+ {
169
+ return $this->container['country'];
170
+ }
171
+
172
+ /**
173
+ * Sets country
174
+ * @param string $country Country of the issuer
175
+ * @return $this
176
+ */
177
+ public function setCountry($country)
178
+ {
179
+ $this->container['country'] = $country;
180
+
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * Gets issuers
186
+ * @return \CMGroep\Idin\Models\Issuer[]
187
+ */
188
+ public function getIssuers()
189
+ {
190
+ return $this->container['issuers'];
191
+ }
192
+
193
+ /**
194
+ * Sets issuers
195
+ * @param \CMGroep\Idin\Models\Issuer[] $issuers An array of issuers
196
+ * @return $this
197
+ */
198
+ public function setIssuers($issuers)
199
+ {
200
+ $this->container['issuers'] = $issuers;
201
+
202
+ return $this;
203
+ }
204
+ /**
205
+ * Returns true if offset exists. False otherwise.
206
+ * @param integer $offset Offset
207
+ * @return boolean
208
+ */
209
+ public function offsetExists($offset)
210
+ {
211
+ return isset($this->container[$offset]);
212
+ }
213
+
214
+ /**
215
+ * Gets offset.
216
+ * @param integer $offset Offset
217
+ * @return mixed
218
+ */
219
+ public function offsetGet($offset)
220
+ {
221
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
222
+ }
223
+
224
+ /**
225
+ * Sets value based on offset.
226
+ * @param integer $offset Offset
227
+ * @param mixed $value Value to be set
228
+ * @return void
229
+ */
230
+ public function offsetSet($offset, $value)
231
+ {
232
+ if (is_null($offset)) {
233
+ $this->container[] = $value;
234
+ } else {
235
+ $this->container[$offset] = $value;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Unsets offset.
241
+ * @param integer $offset Offset
242
+ * @return void
243
+ */
244
+ public function offsetUnset($offset)
245
+ {
246
+ unset($this->container[$offset]);
247
+ }
248
+
249
+ /**
250
+ * Gets the string presentation of the object
251
+ * @return string
252
+ */
253
+ public function __toString()
254
+ {
255
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
256
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
257
+ }
258
+
259
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
260
+ }
261
+ }
262
+
263
+
lib/CMGroep/Idin/src/Models/Error.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Error
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * Error Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class Error implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'Error';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'status' => 'int',
70
+ 'message' => 'string',
71
+ 'code' => 'int'
72
+ );
73
+
74
+ public static function swaggerTypes()
75
+ {
76
+ return self::$swaggerTypes;
77
+ }
78
+
79
+ /**
80
+ * Array of attributes where the key is the local name, and the value is the original name
81
+ * @var string[]
82
+ */
83
+ protected static $attributeMap = array(
84
+ 'status' => 'status',
85
+ 'message' => 'message',
86
+ 'code' => 'code'
87
+ );
88
+
89
+ public static function attributeMap()
90
+ {
91
+ return self::$attributeMap;
92
+ }
93
+
94
+ /**
95
+ * Array of attributes to setter functions (for deserialization of responses)
96
+ * @var string[]
97
+ */
98
+ protected static $setters = array(
99
+ 'status' => 'setStatus',
100
+ 'message' => 'setMessage',
101
+ 'code' => 'setCode'
102
+ );
103
+
104
+ public static function setters()
105
+ {
106
+ return self::$setters;
107
+ }
108
+
109
+ /**
110
+ * Array of attributes to getter functions (for serialization of requests)
111
+ * @var string[]
112
+ */
113
+ protected static $getters = array(
114
+ 'status' => 'getStatus',
115
+ 'message' => 'getMessage',
116
+ 'code' => 'getCode'
117
+ );
118
+
119
+ public static function getters()
120
+ {
121
+ return self::$getters;
122
+ }
123
+
124
+
125
+
126
+
127
+
128
+ /**
129
+ * Associative array for storing property values
130
+ * @var mixed[]
131
+ */
132
+ protected $container = array();
133
+
134
+ /**
135
+ * Constructor
136
+ * @param mixed[] $data Associated array of property value initalizing the model
137
+ */
138
+ public function __construct(array $data = null)
139
+ {
140
+ $this->container['status'] = isset($data['status']) ? $data['status'] : null;
141
+ $this->container['message'] = isset($data['message']) ? $data['message'] : null;
142
+ $this->container['code'] = isset($data['code']) ? $data['code'] : null;
143
+ }
144
+
145
+ /**
146
+ * show all the invalid properties with reasons.
147
+ *
148
+ * @return array invalid properties with reasons
149
+ */
150
+ public function listInvalidProperties()
151
+ {
152
+ $invalid_properties = array();
153
+ return $invalid_properties;
154
+ }
155
+
156
+ /**
157
+ * validate all the properties in the model
158
+ * return true if all passed
159
+ *
160
+ * @return bool True if all properteis are valid
161
+ */
162
+ public function valid()
163
+ {
164
+ return true;
165
+ }
166
+
167
+
168
+ /**
169
+ * Gets status
170
+ * @return int
171
+ */
172
+ public function getStatus()
173
+ {
174
+ return $this->container['status'];
175
+ }
176
+
177
+ /**
178
+ * Sets status
179
+ * @param int $status
180
+ * @return $this
181
+ */
182
+ public function setStatus($status)
183
+ {
184
+ $this->container['status'] = $status;
185
+
186
+ return $this;
187
+ }
188
+
189
+ /**
190
+ * Gets message
191
+ * @return string
192
+ */
193
+ public function getMessage()
194
+ {
195
+ return $this->container['message'];
196
+ }
197
+
198
+ /**
199
+ * Sets message
200
+ * @param string $message
201
+ * @return $this
202
+ */
203
+ public function setMessage($message)
204
+ {
205
+ $this->container['message'] = $message;
206
+
207
+ return $this;
208
+ }
209
+
210
+ /**
211
+ * Gets code
212
+ * @return int
213
+ */
214
+ public function getCode()
215
+ {
216
+ return $this->container['code'];
217
+ }
218
+
219
+ /**
220
+ * Sets code
221
+ * @param int $code
222
+ * @return $this
223
+ */
224
+ public function setCode($code)
225
+ {
226
+ $this->container['code'] = $code;
227
+
228
+ return $this;
229
+ }
230
+ /**
231
+ * Returns true if offset exists. False otherwise.
232
+ * @param integer $offset Offset
233
+ * @return boolean
234
+ */
235
+ public function offsetExists($offset)
236
+ {
237
+ return isset($this->container[$offset]);
238
+ }
239
+
240
+ /**
241
+ * Gets offset.
242
+ * @param integer $offset Offset
243
+ * @return mixed
244
+ */
245
+ public function offsetGet($offset)
246
+ {
247
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
248
+ }
249
+
250
+ /**
251
+ * Sets value based on offset.
252
+ * @param integer $offset Offset
253
+ * @param mixed $value Value to be set
254
+ * @return void
255
+ */
256
+ public function offsetSet($offset, $value)
257
+ {
258
+ if (is_null($offset)) {
259
+ $this->container[] = $value;
260
+ } else {
261
+ $this->container[$offset] = $value;
262
+ }
263
+ }
264
+
265
+ /**
266
+ * Unsets offset.
267
+ * @param integer $offset Offset
268
+ * @return void
269
+ */
270
+ public function offsetUnset($offset)
271
+ {
272
+ unset($this->container[$offset]);
273
+ }
274
+
275
+ /**
276
+ * Gets the string presentation of the object
277
+ * @return string
278
+ */
279
+ public function __toString()
280
+ {
281
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
282
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
283
+ }
284
+
285
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
286
+ }
287
+ }
288
+
289
+
lib/CMGroep/Idin/src/Models/IdentityAddress.php ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IdentityAddress
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * IdentityAddress Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class IdentityAddress implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'IdentityAddress';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'street' => 'string',
70
+ 'house_number' => 'string',
71
+ 'house_number_suffix' => 'string',
72
+ 'postal_code' => 'string',
73
+ 'city' => 'string',
74
+ 'country' => 'string'
75
+ );
76
+
77
+ public static function swaggerTypes()
78
+ {
79
+ return self::$swaggerTypes;
80
+ }
81
+
82
+ /**
83
+ * Array of attributes where the key is the local name, and the value is the original name
84
+ * @var string[]
85
+ */
86
+ protected static $attributeMap = array(
87
+ 'street' => 'street',
88
+ 'house_number' => 'house_number',
89
+ 'house_number_suffix' => 'house_number_suffix',
90
+ 'postal_code' => 'postal_code',
91
+ 'city' => 'city',
92
+ 'country' => 'country'
93
+ );
94
+
95
+ public static function attributeMap()
96
+ {
97
+ return self::$attributeMap;
98
+ }
99
+
100
+ /**
101
+ * Array of attributes to setter functions (for deserialization of responses)
102
+ * @var string[]
103
+ */
104
+ protected static $setters = array(
105
+ 'street' => 'setStreet',
106
+ 'house_number' => 'setHouseNumber',
107
+ 'house_number_suffix' => 'setHouseNumberSuffix',
108
+ 'postal_code' => 'setPostalCode',
109
+ 'city' => 'setCity',
110
+ 'country' => 'setCountry'
111
+ );
112
+
113
+ public static function setters()
114
+ {
115
+ return self::$setters;
116
+ }
117
+
118
+ /**
119
+ * Array of attributes to getter functions (for serialization of requests)
120
+ * @var string[]
121
+ */
122
+ protected static $getters = array(
123
+ 'street' => 'getStreet',
124
+ 'house_number' => 'getHouseNumber',
125
+ 'house_number_suffix' => 'getHouseNumberSuffix',
126
+ 'postal_code' => 'getPostalCode',
127
+ 'city' => 'getCity',
128
+ 'country' => 'getCountry'
129
+ );
130
+
131
+ public static function getters()
132
+ {
133
+ return self::$getters;
134
+ }
135
+
136
+
137
+
138
+
139
+
140
+ /**
141
+ * Associative array for storing property values
142
+ * @var mixed[]
143
+ */
144
+ protected $container = array();
145
+
146
+ /**
147
+ * Constructor
148
+ * @param mixed[] $data Associated array of property value initalizing the model
149
+ */
150
+ public function __construct(array $data = null)
151
+ {
152
+ $this->container['street'] = isset($data['street']) ? $data['street'] : null;
153
+ $this->container['house_number'] = isset($data['house_number']) ? $data['house_number'] : null;
154
+ $this->container['house_number_suffix'] = isset($data['house_number_suffix']) ? $data['house_number_suffix'] : null;
155
+ $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null;
156
+ $this->container['city'] = isset($data['city']) ? $data['city'] : null;
157
+ $this->container['country'] = isset($data['country']) ? $data['country'] : null;
158
+ }
159
+
160
+ /**
161
+ * show all the invalid properties with reasons.
162
+ *
163
+ * @return array invalid properties with reasons
164
+ */
165
+ public function listInvalidProperties()
166
+ {
167
+ $invalid_properties = array();
168
+ return $invalid_properties;
169
+ }
170
+
171
+ /**
172
+ * validate all the properties in the model
173
+ * return true if all passed
174
+ *
175
+ * @return bool True if all properteis are valid
176
+ */
177
+ public function valid()
178
+ {
179
+ return true;
180
+ }
181
+
182
+
183
+ /**
184
+ * Gets street
185
+ * @return string
186
+ */
187
+ public function getStreet()
188
+ {
189
+ return $this->container['street'];
190
+ }
191
+
192
+ /**
193
+ * Sets street
194
+ * @param string $street The street of the person's address
195
+ * @return $this
196
+ */
197
+ public function setStreet($street)
198
+ {
199
+ $this->container['street'] = $street;
200
+
201
+ return $this;
202
+ }
203
+
204
+ /**
205
+ * Gets house_number
206
+ * @return string
207
+ */
208
+ public function getHouseNumber()
209
+ {
210
+ return $this->container['house_number'];
211
+ }
212
+
213
+ /**
214
+ * Sets house_number
215
+ * @param string $house_number The house number of the person's address
216
+ * @return $this
217
+ */
218
+ public function setHouseNumber($house_number)
219
+ {
220
+ $this->container['house_number'] = $house_number;
221
+
222
+ return $this;
223
+ }
224
+
225
+ /**
226
+ * Gets house_number_suffix
227
+ * @return string
228
+ */
229
+ public function getHouseNumberSuffix()
230
+ {
231
+ return $this->container['house_number_suffix'];
232
+ }
233
+
234
+ /**
235
+ * Sets house_number_suffix
236
+ * @param string $house_number_suffix The suffix of the house number
237
+ * @return $this
238
+ */
239
+ public function setHouseNumberSuffix($house_number_suffix)
240
+ {
241
+ $this->container['house_number_suffix'] = $house_number_suffix;
242
+
243
+ return $this;
244
+ }
245
+
246
+ /**
247
+ * Gets postal_code
248
+ * @return string
249
+ */
250
+ public function getPostalCode()
251
+ {
252
+ return $this->container['postal_code'];
253
+ }
254
+
255
+ /**
256
+ * Sets postal_code
257
+ * @param string $postal_code The postal code of the person's address
258
+ * @return $this
259
+ */
260
+ public function setPostalCode($postal_code)
261
+ {
262
+ $this->container['postal_code'] = $postal_code;
263
+
264
+ return $this;
265
+ }
266
+
267
+ /**
268
+ * Gets city
269
+ * @return string
270
+ */
271
+ public function getCity()
272
+ {
273
+ return $this->container['city'];
274
+ }
275
+
276
+ /**
277
+ * Sets city
278
+ * @param string $city The city of the person's address
279
+ * @return $this
280
+ */
281
+ public function setCity($city)
282
+ {
283
+ $this->container['city'] = $city;
284
+
285
+ return $this;
286
+ }
287
+
288
+ /**
289
+ * Gets country
290
+ * @return string
291
+ */
292
+ public function getCountry()
293
+ {
294
+ return $this->container['country'];
295
+ }
296
+
297
+ /**
298
+ * Sets country
299
+ * @param string $country The country of the person's address
300
+ * @return $this
301
+ */
302
+ public function setCountry($country)
303
+ {
304
+ $this->container['country'] = $country;
305
+
306
+ return $this;
307
+ }
308
+ /**
309
+ * Returns true if offset exists. False otherwise.
310
+ * @param integer $offset Offset
311
+ * @return boolean
312
+ */
313
+ public function offsetExists($offset)
314
+ {
315
+ return isset($this->container[$offset]);
316
+ }
317
+
318
+ /**
319
+ * Gets offset.
320
+ * @param integer $offset Offset
321
+ * @return mixed
322
+ */
323
+ public function offsetGet($offset)
324
+ {
325
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
326
+ }
327
+
328
+ /**
329
+ * Sets value based on offset.
330
+ * @param integer $offset Offset
331
+ * @param mixed $value Value to be set
332
+ * @return void
333
+ */
334
+ public function offsetSet($offset, $value)
335
+ {
336
+ if (is_null($offset)) {
337
+ $this->container[] = $value;
338
+ } else {
339
+ $this->container[$offset] = $value;
340
+ }
341
+ }
342
+
343
+ /**
344
+ * Unsets offset.
345
+ * @param integer $offset Offset
346
+ * @return void
347
+ */
348
+ public function offsetUnset($offset)
349
+ {
350
+ unset($this->container[$offset]);
351
+ }
352
+
353
+ /**
354
+ * Gets the string presentation of the object
355
+ * @return string
356
+ */
357
+ public function __toString()
358
+ {
359
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
360
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
361
+ }
362
+
363
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
364
+ }
365
+ }
366
+
367
+
lib/CMGroep/Idin/src/Models/IdentityAge.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IdentityAge
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * IdentityAge Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class IdentityAge implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'IdentityAge';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'date_of_birth' => 'string',
70
+ '_18y_or_older' => 'bool'
71
+ );
72
+
73
+ public static function swaggerTypes()
74
+ {
75
+ return self::$swaggerTypes;
76
+ }
77
+
78
+ /**
79
+ * Array of attributes where the key is the local name, and the value is the original name
80
+ * @var string[]
81
+ */
82
+ protected static $attributeMap = array(
83
+ 'date_of_birth' => 'date_of_birth',
84
+ '_18y_or_older' => '18y_or_older'
85
+ );
86
+
87
+ public static function attributeMap()
88
+ {
89
+ return self::$attributeMap;
90
+ }
91
+
92
+ /**
93
+ * Array of attributes to setter functions (for deserialization of responses)
94
+ * @var string[]
95
+ */
96
+ protected static $setters = array(
97
+ 'date_of_birth' => 'setDateOfBirth',
98
+ '_18y_or_older' => 'set18yOrOlder'
99
+ );
100
+
101
+ public static function setters()
102
+ {
103
+ return self::$setters;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to getter functions (for serialization of requests)
108
+ * @var string[]
109
+ */
110
+ protected static $getters = array(
111
+ 'date_of_birth' => 'getDateOfBirth',
112
+ '_18y_or_older' => 'get18yOrOlder'
113
+ );
114
+
115
+ public static function getters()
116
+ {
117
+ return self::$getters;
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Associative array for storing property values
126
+ * @var mixed[]
127
+ */
128
+ protected $container = array();
129
+
130
+ /**
131
+ * Constructor
132
+ * @param mixed[] $data Associated array of property value initalizing the model
133
+ */
134
+ public function __construct(array $data = null)
135
+ {
136
+ $this->container['date_of_birth'] = isset($data['date_of_birth']) ? $data['date_of_birth'] : null;
137
+ $this->container['_18y_or_older'] = isset($data['_18y_or_older']) ? $data['_18y_or_older'] : null;
138
+ }
139
+
140
+ /**
141
+ * show all the invalid properties with reasons.
142
+ *
143
+ * @return array invalid properties with reasons
144
+ */
145
+ public function listInvalidProperties()
146
+ {
147
+ $invalid_properties = array();
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ return true;
160
+ }
161
+
162
+
163
+ /**
164
+ * Gets date_of_birth
165
+ * @return string
166
+ */
167
+ public function getDateOfBirth()
168
+ {
169
+ return $this->container['date_of_birth'];
170
+ }
171
+
172
+ /**
173
+ * Sets date_of_birth
174
+ * @param string $date_of_birth Date of birth of the person
175
+ * @return $this
176
+ */
177
+ public function setDateOfBirth($date_of_birth)
178
+ {
179
+ $this->container['date_of_birth'] = $date_of_birth;
180
+
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * Gets _18y_or_older
186
+ * @return bool
187
+ */
188
+ public function get18yOrOlder()
189
+ {
190
+ return $this->container['_18y_or_older'];
191
+ }
192
+
193
+ /**
194
+ * Sets _18y_or_older
195
+ * @param bool $_18y_or_older true whether the person is 18 years or older
196
+ * @return $this
197
+ */
198
+ public function set18yOrOlder($_18y_or_older)
199
+ {
200
+ $this->container['_18y_or_older'] = $_18y_or_older;
201
+
202
+ return $this;
203
+ }
204
+ /**
205
+ * Returns true if offset exists. False otherwise.
206
+ * @param integer $offset Offset
207
+ * @return boolean
208
+ */
209
+ public function offsetExists($offset)
210
+ {
211
+ return isset($this->container[$offset]);
212
+ }
213
+
214
+ /**
215
+ * Gets offset.
216
+ * @param integer $offset Offset
217
+ * @return mixed
218
+ */
219
+ public function offsetGet($offset)
220
+ {
221
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
222
+ }
223
+
224
+ /**
225
+ * Sets value based on offset.
226
+ * @param integer $offset Offset
227
+ * @param mixed $value Value to be set
228
+ * @return void
229
+ */
230
+ public function offsetSet($offset, $value)
231
+ {
232
+ if (is_null($offset)) {
233
+ $this->container[] = $value;
234
+ } else {
235
+ $this->container[$offset] = $value;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Unsets offset.
241
+ * @param integer $offset Offset
242
+ * @return void
243
+ */
244
+ public function offsetUnset($offset)
245
+ {
246
+ unset($this->container[$offset]);
247
+ }
248
+
249
+ /**
250
+ * Gets the string presentation of the object
251
+ * @return string
252
+ */
253
+ public function __toString()
254
+ {
255
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
256
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
257
+ }
258
+
259
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
260
+ }
261
+ }
262
+
263
+
lib/CMGroep/Idin/src/Models/IdentityBase.php ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IdentityBase
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * IdentityBase Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class IdentityBase implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'IdentityBase';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'gender' => 'string',
70
+ 'initials' => 'string',
71
+ 'last_name' => 'string',
72
+ 'last_name_prefix' => 'string'
73
+ );
74
+
75
+ public static function swaggerTypes()
76
+ {
77
+ return self::$swaggerTypes;
78
+ }
79
+
80
+ /**
81
+ * Array of attributes where the key is the local name, and the value is the original name
82
+ * @var string[]
83
+ */
84
+ protected static $attributeMap = array(
85
+ 'gender' => 'gender',
86
+ 'initials' => 'initials',
87
+ 'last_name' => 'last_name',
88
+ 'last_name_prefix' => 'last_name_prefix'
89
+ );
90
+
91
+ public static function attributeMap()
92
+ {
93
+ return self::$attributeMap;
94
+ }
95
+
96
+ /**
97
+ * Array of attributes to setter functions (for deserialization of responses)
98
+ * @var string[]
99
+ */
100
+ protected static $setters = array(
101
+ 'gender' => 'setGender',
102
+ 'initials' => 'setInitials',
103
+ 'last_name' => 'setLastName',
104
+ 'last_name_prefix' => 'setLastNamePrefix'
105
+ );
106
+
107
+ public static function setters()
108
+ {
109
+ return self::$setters;
110
+ }
111
+
112
+ /**
113
+ * Array of attributes to getter functions (for serialization of requests)
114
+ * @var string[]
115
+ */
116
+ protected static $getters = array(
117
+ 'gender' => 'getGender',
118
+ 'initials' => 'getInitials',
119
+ 'last_name' => 'getLastName',
120
+ 'last_name_prefix' => 'getLastNamePrefix'
121
+ );
122
+
123
+ public static function getters()
124
+ {
125
+ return self::$getters;
126
+ }
127
+
128
+
129
+
130
+
131
+
132
+ /**
133
+ * Associative array for storing property values
134
+ * @var mixed[]
135
+ */
136
+ protected $container = array();
137
+
138
+ /**
139
+ * Constructor
140
+ * @param mixed[] $data Associated array of property value initalizing the model
141
+ */
142
+ public function __construct(array $data = null)
143
+ {
144
+ $this->container['gender'] = isset($data['gender']) ? $data['gender'] : null;
145
+ $this->container['initials'] = isset($data['initials']) ? $data['initials'] : null;
146
+ $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null;
147
+ $this->container['last_name_prefix'] = isset($data['last_name_prefix']) ? $data['last_name_prefix'] : null;
148
+ }
149
+
150
+ /**
151
+ * show all the invalid properties with reasons.
152
+ *
153
+ * @return array invalid properties with reasons
154
+ */
155
+ public function listInvalidProperties()
156
+ {
157
+ $invalid_properties = array();
158
+ return $invalid_properties;
159
+ }
160
+
161
+ /**
162
+ * validate all the properties in the model
163
+ * return true if all passed
164
+ *
165
+ * @return bool True if all properteis are valid
166
+ */
167
+ public function valid()
168
+ {
169
+ return true;
170
+ }
171
+
172
+
173
+ /**
174
+ * Gets gender
175
+ * @return string
176
+ */
177
+ public function getGender()
178
+ {
179
+ return $this->container['gender'];
180
+ }
181
+
182
+ /**
183
+ * Sets gender
184
+ * @param string $gender male or female
185
+ * @return $this
186
+ */
187
+ public function setGender($gender)
188
+ {
189
+ $this->container['gender'] = $gender;
190
+
191
+ return $this;
192
+ }
193
+
194
+ /**
195
+ * Gets initials
196
+ * @return string
197
+ */
198
+ public function getInitials()
199
+ {
200
+ return $this->container['initials'];
201
+ }
202
+
203
+ /**
204
+ * Sets initials
205
+ * @param string $initials Initials of the person
206
+ * @return $this
207
+ */
208
+ public function setInitials($initials)
209
+ {
210
+ $this->container['initials'] = $initials;
211
+
212
+ return $this;
213
+ }
214
+
215
+ /**
216
+ * Gets last_name
217
+ * @return string
218
+ */
219
+ public function getLastName()
220
+ {
221
+ return $this->container['last_name'];
222
+ }
223
+
224
+ /**
225
+ * Sets last_name
226
+ * @param string $last_name The last name of the person
227
+ * @return $this
228
+ */
229
+ public function setLastName($last_name)
230
+ {
231
+ $this->container['last_name'] = $last_name;
232
+
233
+ return $this;
234
+ }
235
+
236
+ /**
237
+ * Gets last_name_prefix
238
+ * @return string
239
+ */
240
+ public function getLastNamePrefix()
241
+ {
242
+ return $this->container['last_name_prefix'];
243
+ }
244
+
245
+ /**
246
+ * Sets last_name_prefix
247
+ * @param string $last_name_prefix The prefix of the last name
248
+ * @return $this
249
+ */
250
+ public function setLastNamePrefix($last_name_prefix)
251
+ {
252
+ $this->container['last_name_prefix'] = $last_name_prefix;
253
+
254
+ return $this;
255
+ }
256
+ /**
257
+ * Returns true if offset exists. False otherwise.
258
+ * @param integer $offset Offset
259
+ * @return boolean
260
+ */
261
+ public function offsetExists($offset)
262
+ {
263
+ return isset($this->container[$offset]);
264
+ }
265
+
266
+ /**
267
+ * Gets offset.
268
+ * @param integer $offset Offset
269
+ * @return mixed
270
+ */
271
+ public function offsetGet($offset)
272
+ {
273
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
274
+ }
275
+
276
+ /**
277
+ * Sets value based on offset.
278
+ * @param integer $offset Offset
279
+ * @param mixed $value Value to be set
280
+ * @return void
281
+ */
282
+ public function offsetSet($offset, $value)
283
+ {
284
+ if (is_null($offset)) {
285
+ $this->container[] = $value;
286
+ } else {
287
+ $this->container[$offset] = $value;
288
+ }
289
+ }
290
+
291
+ /**
292
+ * Unsets offset.
293
+ * @param integer $offset Offset
294
+ * @return void
295
+ */
296
+ public function offsetUnset($offset)
297
+ {
298
+ unset($this->container[$offset]);
299
+ }
300
+
301
+ /**
302
+ * Gets the string presentation of the object
303
+ * @return string
304
+ */
305
+ public function __toString()
306
+ {
307
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
308
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
309
+ }
310
+
311
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
312
+ }
313
+ }
314
+
315
+
lib/CMGroep/Idin/src/Models/Issuer.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Issuer
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * Issuer Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class Issuer implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'Issuer';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'issuer_id' => 'string',
70
+ 'issuer_name' => 'string'
71
+ );
72
+
73
+ public static function swaggerTypes()
74
+ {
75
+ return self::$swaggerTypes;
76
+ }
77
+
78
+ /**
79
+ * Array of attributes where the key is the local name, and the value is the original name
80
+ * @var string[]
81
+ */
82
+ protected static $attributeMap = array(
83
+ 'issuer_id' => 'issuer_id',
84
+ 'issuer_name' => 'issuer_name'
85
+ );
86
+
87
+ public static function attributeMap()
88
+ {
89
+ return self::$attributeMap;
90
+ }
91
+
92
+ /**
93
+ * Array of attributes to setter functions (for deserialization of responses)
94
+ * @var string[]
95
+ */
96
+ protected static $setters = array(
97
+ 'issuer_id' => 'setIssuerId',
98
+ 'issuer_name' => 'setIssuerName'
99
+ );
100
+
101
+ public static function setters()
102
+ {
103
+ return self::$setters;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to getter functions (for serialization of requests)
108
+ * @var string[]
109
+ */
110
+ protected static $getters = array(
111
+ 'issuer_id' => 'getIssuerId',
112
+ 'issuer_name' => 'getIssuerName'
113
+ );
114
+
115
+ public static function getters()
116
+ {
117
+ return self::$getters;
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Associative array for storing property values
126
+ * @var mixed[]
127
+ */
128
+ protected $container = array();
129
+
130
+ /**
131
+ * Constructor
132
+ * @param mixed[] $data Associated array of property value initalizing the model
133
+ */
134
+ public function __construct(array $data = null)
135
+ {
136
+ $this->container['issuer_id'] = isset($data['issuer_id']) ? $data['issuer_id'] : null;
137
+ $this->container['issuer_name'] = isset($data['issuer_name']) ? $data['issuer_name'] : null;
138
+ }
139
+
140
+ /**
141
+ * show all the invalid properties with reasons.
142
+ *
143
+ * @return array invalid properties with reasons
144
+ */
145
+ public function listInvalidProperties()
146
+ {
147
+ $invalid_properties = array();
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ return true;
160
+ }
161
+
162
+
163
+ /**
164
+ * Gets issuer_id
165
+ * @return string
166
+ */
167
+ public function getIssuerId()
168
+ {
169
+ return $this->container['issuer_id'];
170
+ }
171
+
172
+ /**
173
+ * Sets issuer_id
174
+ * @param string $issuer_id ID of the issuer
175
+ * @return $this
176
+ */
177
+ public function setIssuerId($issuer_id)
178
+ {
179
+ $this->container['issuer_id'] = $issuer_id;
180
+
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * Gets issuer_name
186
+ * @return string
187
+ */
188
+ public function getIssuerName()
189
+ {
190
+ return $this->container['issuer_name'];
191
+ }
192
+
193
+ /**
194
+ * Sets issuer_name
195
+ * @param string $issuer_name Name of the issuer
196
+ * @return $this
197
+ */
198
+ public function setIssuerName($issuer_name)
199
+ {
200
+ $this->container['issuer_name'] = $issuer_name;
201
+
202
+ return $this;
203
+ }
204
+ /**
205
+ * Returns true if offset exists. False otherwise.
206
+ * @param integer $offset Offset
207
+ * @return boolean
208
+ */
209
+ public function offsetExists($offset)
210
+ {
211
+ return isset($this->container[$offset]);
212
+ }
213
+
214
+ /**
215
+ * Gets offset.
216
+ * @param integer $offset Offset
217
+ * @return mixed
218
+ */
219
+ public function offsetGet($offset)
220
+ {
221
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
222
+ }
223
+
224
+ /**
225
+ * Sets value based on offset.
226
+ * @param integer $offset Offset
227
+ * @param mixed $value Value to be set
228
+ * @return void
229
+ */
230
+ public function offsetSet($offset, $value)
231
+ {
232
+ if (is_null($offset)) {
233
+ $this->container[] = $value;
234
+ } else {
235
+ $this->container[$offset] = $value;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Unsets offset.
241
+ * @param integer $offset Offset
242
+ * @return void
243
+ */
244
+ public function offsetUnset($offset)
245
+ {
246
+ unset($this->container[$offset]);
247
+ }
248
+
249
+ /**
250
+ * Gets the string presentation of the object
251
+ * @return string
252
+ */
253
+ public function __toString()
254
+ {
255
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
256
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
257
+ }
258
+
259
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
260
+ }
261
+ }
262
+
263
+
lib/CMGroep/Idin/src/Models/MerchantResponse.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MerchantResponse
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * MerchantResponse Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class MerchantResponse implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'MerchantResponse';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'name' => 'string',
70
+ 'status' => 'string',
71
+ 'services' => '\CMGroep\Idin\Models\MerchantResponseServices',
72
+ 'balance' => '\CMGroep\Idin\Models\MerchantResponseBalance',
73
+ 'contact' => '\CMGroep\Idin\Models\MerchantResponseContact'
74
+ );
75
+
76
+ public static function swaggerTypes()
77
+ {
78
+ return self::$swaggerTypes;
79
+ }
80
+
81
+ /**
82
+ * Array of attributes where the key is the local name, and the value is the original name
83
+ * @var string[]
84
+ */
85
+ protected static $attributeMap = array(
86
+ 'name' => 'name',
87
+ 'status' => 'status',
88
+ 'services' => 'services',
89
+ 'balance' => 'balance',
90
+ 'contact' => 'contact'
91
+ );
92
+
93
+ public static function attributeMap()
94
+ {
95
+ return self::$attributeMap;
96
+ }
97
+
98
+ /**
99
+ * Array of attributes to setter functions (for deserialization of responses)
100
+ * @var string[]
101
+ */
102
+ protected static $setters = array(
103
+ 'name' => 'setName',
104
+ 'status' => 'setStatus',
105
+ 'services' => 'setServices',
106
+ 'balance' => 'setBalance',
107
+ 'contact' => 'setContact'
108
+ );
109
+
110
+ public static function setters()
111
+ {
112
+ return self::$setters;
113
+ }
114
+
115
+ /**
116
+ * Array of attributes to getter functions (for serialization of requests)
117
+ * @var string[]
118
+ */
119
+ protected static $getters = array(
120
+ 'name' => 'getName',
121
+ 'status' => 'getStatus',
122
+ 'services' => 'getServices',
123
+ 'balance' => 'getBalance',
124
+ 'contact' => 'getContact'
125
+ );
126
+
127
+ public static function getters()
128
+ {
129
+ return self::$getters;
130
+ }
131
+
132
+
133
+
134
+
135
+
136
+ /**
137
+ * Associative array for storing property values
138
+ * @var mixed[]
139
+ */
140
+ protected $container = array();
141
+
142
+ /**
143
+ * Constructor
144
+ * @param mixed[] $data Associated array of property value initalizing the model
145
+ */
146
+ public function __construct(array $data = null)
147
+ {
148
+ $this->container['name'] = isset($data['name']) ? $data['name'] : null;
149
+ $this->container['status'] = isset($data['status']) ? $data['status'] : null;
150
+ $this->container['services'] = isset($data['services']) ? $data['services'] : null;
151
+ $this->container['balance'] = isset($data['balance']) ? $data['balance'] : null;
152
+ $this->container['contact'] = isset($data['contact']) ? $data['contact'] : null;
153
+ }
154
+
155
+ /**
156
+ * show all the invalid properties with reasons.
157
+ *
158
+ * @return array invalid properties with reasons
159
+ */
160
+ public function listInvalidProperties()
161
+ {
162
+ $invalid_properties = array();
163
+ return $invalid_properties;
164
+ }
165
+
166
+ /**
167
+ * validate all the properties in the model
168
+ * return true if all passed
169
+ *
170
+ * @return bool True if all properteis are valid
171
+ */
172
+ public function valid()
173
+ {
174
+ return true;
175
+ }
176
+
177
+
178
+ /**
179
+ * Gets name
180
+ * @return string
181
+ */
182
+ public function getName()
183
+ {
184
+ return $this->container['name'];
185
+ }
186
+
187
+ /**
188
+ * Sets name
189
+ * @param string $name Name of Merchant
190
+ * @return $this
191
+ */
192
+ public function setName($name)
193
+ {
194
+ $this->container['name'] = $name;
195
+
196
+ return $this;
197
+ }
198
+
199
+ /**
200
+ * Gets status
201
+ * @return string
202
+ */
203
+ public function getStatus()
204
+ {
205
+ return $this->container['status'];
206
+ }
207
+
208
+ /**
209
+ * Sets status
210
+ * @param string $status Status of the Merchant, inactive or active
211
+ * @return $this
212
+ */
213
+ public function setStatus($status)
214
+ {
215
+ $this->container['status'] = $status;
216
+
217
+ return $this;
218
+ }
219
+
220
+ /**
221
+ * Gets services
222
+ * @return \CMGroep\Idin\Models\MerchantResponseServices
223
+ */
224
+ public function getServices()
225
+ {
226
+ return $this->container['services'];
227
+ }
228
+
229
+ /**
230
+ * Sets services
231
+ * @param \CMGroep\Idin\Models\MerchantResponseServices $services
232
+ * @return $this
233
+ */
234
+ public function setServices($services)
235
+ {
236
+ $this->container['services'] = $services;
237
+
238
+ return $this;
239
+ }
240
+
241
+ /**
242
+ * Gets balance
243
+ * @return \CMGroep\Idin\Models\MerchantResponseBalance
244
+ */
245
+ public function getBalance()
246
+ {
247
+ return $this->container['balance'];
248
+ }
249
+
250
+ /**
251
+ * Sets balance
252
+ * @param \CMGroep\Idin\Models\MerchantResponseBalance $balance
253
+ * @return $this
254
+ */
255
+ public function setBalance($balance)
256
+ {
257
+ $this->container['balance'] = $balance;
258
+
259
+ return $this;
260
+ }
261
+
262
+ /**
263
+ * Gets contact
264
+ * @return \CMGroep\Idin\Models\MerchantResponseContact
265
+ */
266
+ public function getContact()
267
+ {
268
+ return $this->container['contact'];
269
+ }
270
+
271
+ /**
272
+ * Sets contact
273
+ * @param \CMGroep\Idin\Models\MerchantResponseContact $contact
274
+ * @return $this
275
+ */
276
+ public function setContact($contact)
277
+ {
278
+ $this->container['contact'] = $contact;
279
+
280
+ return $this;
281
+ }
282
+ /**
283
+ * Returns true if offset exists. False otherwise.
284
+ * @param integer $offset Offset
285
+ * @return boolean
286
+ */
287
+ public function offsetExists($offset)
288
+ {
289
+ return isset($this->container[$offset]);
290
+ }
291
+
292
+ /**
293
+ * Gets offset.
294
+ * @param integer $offset Offset
295
+ * @return mixed
296
+ */
297
+ public function offsetGet($offset)
298
+ {
299
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
300
+ }
301
+
302
+ /**
303
+ * Sets value based on offset.
304
+ * @param integer $offset Offset
305
+ * @param mixed $value Value to be set
306
+ * @return void
307
+ */
308
+ public function offsetSet($offset, $value)
309
+ {
310
+ if (is_null($offset)) {
311
+ $this->container[] = $value;
312
+ } else {
313
+ $this->container[$offset] = $value;
314
+ }
315
+ }
316
+
317
+ /**
318
+ * Unsets offset.
319
+ * @param integer $offset Offset
320
+ * @return void
321
+ */
322
+ public function offsetUnset($offset)
323
+ {
324
+ unset($this->container[$offset]);
325
+ }
326
+
327
+ /**
328
+ * Gets the string presentation of the object
329
+ * @return string
330
+ */
331
+ public function __toString()
332
+ {
333
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
334
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
335
+ }
336
+
337
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
338
+ }
339
+ }
340
+
341
+
lib/CMGroep/Idin/src/Models/MerchantResponseBalance.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MerchantResponseBalance
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * MerchantResponseBalance Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class MerchantResponseBalance implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'MerchantResponseBalance';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'used' => 'int',
70
+ 'available' => 'int'
71
+ );
72
+
73
+ public static function swaggerTypes()
74
+ {
75
+ return self::$swaggerTypes;
76
+ }
77
+
78
+ /**
79
+ * Array of attributes where the key is the local name, and the value is the original name
80
+ * @var string[]
81
+ */
82
+ protected static $attributeMap = array(
83
+ 'used' => 'used',
84
+ 'available' => 'available'
85
+ );
86
+
87
+ public static function attributeMap()
88
+ {
89
+ return self::$attributeMap;
90
+ }
91
+
92
+ /**
93
+ * Array of attributes to setter functions (for deserialization of responses)
94
+ * @var string[]
95
+ */
96
+ protected static $setters = array(
97
+ 'used' => 'setUsed',
98
+ 'available' => 'setAvailable'
99
+ );
100
+
101
+ public static function setters()
102
+ {
103
+ return self::$setters;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to getter functions (for serialization of requests)
108
+ * @var string[]
109
+ */
110
+ protected static $getters = array(
111
+ 'used' => 'getUsed',
112
+ 'available' => 'getAvailable'
113
+ );
114
+
115
+ public static function getters()
116
+ {
117
+ return self::$getters;
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Associative array for storing property values
126
+ * @var mixed[]
127
+ */
128
+ protected $container = array();
129
+
130
+ /**
131
+ * Constructor
132
+ * @param mixed[] $data Associated array of property value initalizing the model
133
+ */
134
+ public function __construct(array $data = null)
135
+ {
136
+ $this->container['used'] = isset($data['used']) ? $data['used'] : null;
137
+ $this->container['available'] = isset($data['available']) ? $data['available'] : null;
138
+ }
139
+
140
+ /**
141
+ * show all the invalid properties with reasons.
142
+ *
143
+ * @return array invalid properties with reasons
144
+ */
145
+ public function listInvalidProperties()
146
+ {
147
+ $invalid_properties = array();
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ return true;
160
+ }
161
+
162
+
163
+ /**
164
+ * Gets used
165
+ * @return int
166
+ */
167
+ public function getUsed()
168
+ {
169
+ return $this->container['used'];
170
+ }
171
+
172
+ /**
173
+ * Sets used
174
+ * @param int $used Amount of used credits
175
+ * @return $this
176
+ */
177
+ public function setUsed($used)
178
+ {
179
+ $this->container['used'] = $used;
180
+
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * Gets available
186
+ * @return int
187
+ */
188
+ public function getAvailable()
189
+ {
190
+ return $this->container['available'];
191
+ }
192
+
193
+ /**
194
+ * Sets available
195
+ * @param int $available Amount of available credits
196
+ * @return $this
197
+ */
198
+ public function setAvailable($available)
199
+ {
200
+ $this->container['available'] = $available;
201
+
202
+ return $this;
203
+ }
204
+ /**
205
+ * Returns true if offset exists. False otherwise.
206
+ * @param integer $offset Offset
207
+ * @return boolean
208
+ */
209
+ public function offsetExists($offset)
210
+ {
211
+ return isset($this->container[$offset]);
212
+ }
213
+
214
+ /**
215
+ * Gets offset.
216
+ * @param integer $offset Offset
217
+ * @return mixed
218
+ */
219
+ public function offsetGet($offset)
220
+ {
221
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
222
+ }
223
+
224
+ /**
225
+ * Sets value based on offset.
226
+ * @param integer $offset Offset
227
+ * @param mixed $value Value to be set
228
+ * @return void
229
+ */
230
+ public function offsetSet($offset, $value)
231
+ {
232
+ if (is_null($offset)) {
233
+ $this->container[] = $value;
234
+ } else {
235
+ $this->container[$offset] = $value;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Unsets offset.
241
+ * @param integer $offset Offset
242
+ * @return void
243
+ */
244
+ public function offsetUnset($offset)
245
+ {
246
+ unset($this->container[$offset]);
247
+ }
248
+
249
+ /**
250
+ * Gets the string presentation of the object
251
+ * @return string
252
+ */
253
+ public function __toString()
254
+ {
255
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
256
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
257
+ }
258
+
259
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
260
+ }
261
+ }
262
+
263
+
lib/CMGroep/Idin/src/Models/MerchantResponseContact.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MerchantResponseContact
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * MerchantResponseContact Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class MerchantResponseContact implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'MerchantResponseContact';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'name' => 'string',
70
+ 'email' => 'string',
71
+ 'phone' => 'string'
72
+ );
73
+
74
+ public static function swaggerTypes()
75
+ {
76
+ return self::$swaggerTypes;
77
+ }
78
+
79
+ /**
80
+ * Array of attributes where the key is the local name, and the value is the original name
81
+ * @var string[]
82
+ */
83
+ protected static $attributeMap = array(
84
+ 'name' => 'name',
85
+ 'email' => 'email',
86
+ 'phone' => 'phone'
87
+ );
88
+
89
+ public static function attributeMap()
90
+ {
91
+ return self::$attributeMap;
92
+ }
93
+
94
+ /**
95
+ * Array of attributes to setter functions (for deserialization of responses)
96
+ * @var string[]
97
+ */
98
+ protected static $setters = array(
99
+ 'name' => 'setName',
100
+ 'email' => 'setEmail',
101
+ 'phone' => 'setPhone'
102
+ );
103
+
104
+ public static function setters()
105
+ {
106
+ return self::$setters;
107
+ }
108
+
109
+ /**
110
+ * Array of attributes to getter functions (for serialization of requests)
111
+ * @var string[]
112
+ */
113
+ protected static $getters = array(
114
+ 'name' => 'getName',
115
+ 'email' => 'getEmail',
116
+ 'phone' => 'getPhone'
117
+ );
118
+
119
+ public static function getters()
120
+ {
121
+ return self::$getters;
122
+ }
123
+
124
+
125
+
126
+
127
+
128
+ /**
129
+ * Associative array for storing property values
130
+ * @var mixed[]
131
+ */
132
+ protected $container = array();
133
+
134
+ /**
135
+ * Constructor
136
+ * @param mixed[] $data Associated array of property value initalizing the model
137
+ */
138
+ public function __construct(array $data = null)
139
+ {
140
+ $this->container['name'] = isset($data['name']) ? $data['name'] : null;
141
+ $this->container['email'] = isset($data['email']) ? $data['email'] : null;
142
+ $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null;
143
+ }
144
+
145
+ /**
146
+ * show all the invalid properties with reasons.
147
+ *
148
+ * @return array invalid properties with reasons
149
+ */
150
+ public function listInvalidProperties()
151
+ {
152
+ $invalid_properties = array();
153
+ return $invalid_properties;
154
+ }
155
+
156
+ /**
157
+ * validate all the properties in the model
158
+ * return true if all passed
159
+ *
160
+ * @return bool True if all properteis are valid
161
+ */
162
+ public function valid()
163
+ {
164
+ return true;
165
+ }
166
+
167
+
168
+ /**
169
+ * Gets name
170
+ * @return string
171
+ */
172
+ public function getName()
173
+ {
174
+ return $this->container['name'];
175
+ }
176
+
177
+ /**
178
+ * Sets name
179
+ * @param string $name Name of the merchant's contact person
180
+ * @return $this
181
+ */
182
+ public function setName($name)
183
+ {
184
+ $this->container['name'] = $name;
185
+
186
+ return $this;
187
+ }
188
+
189
+ /**
190
+ * Gets email
191
+ * @return string
192
+ */
193
+ public function getEmail()
194
+ {
195
+ return $this->container['email'];
196
+ }
197
+
198
+ /**
199
+ * Sets email
200
+ * @param string $email Emailaddress of the merchant's contact person
201
+ * @return $this
202
+ */
203
+ public function setEmail($email)
204
+ {
205
+ $this->container['email'] = $email;
206
+
207
+ return $this;
208
+ }
209
+
210
+ /**
211
+ * Gets phone
212
+ * @return string
213
+ */
214
+ public function getPhone()
215
+ {
216
+ return $this->container['phone'];
217
+ }
218
+
219
+ /**
220
+ * Sets phone
221
+ * @param string $phone Phone Number of the merchant's contact person
222
+ * @return $this
223
+ */
224
+ public function setPhone($phone)
225
+ {
226
+ $this->container['phone'] = $phone;
227
+
228
+ return $this;
229
+ }
230
+ /**
231
+ * Returns true if offset exists. False otherwise.
232
+ * @param integer $offset Offset
233
+ * @return boolean
234
+ */
235
+ public function offsetExists($offset)
236
+ {
237
+ return isset($this->container[$offset]);
238
+ }
239
+
240
+ /**
241
+ * Gets offset.
242
+ * @param integer $offset Offset
243
+ * @return mixed
244
+ */
245
+ public function offsetGet($offset)
246
+ {
247
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
248
+ }
249
+
250
+ /**
251
+ * Sets value based on offset.
252
+ * @param integer $offset Offset
253
+ * @param mixed $value Value to be set
254
+ * @return void
255
+ */
256
+ public function offsetSet($offset, $value)
257
+ {
258
+ if (is_null($offset)) {
259
+ $this->container[] = $value;
260
+ } else {
261
+ $this->container[$offset] = $value;
262
+ }
263
+ }
264
+
265
+ /**
266
+ * Unsets offset.
267
+ * @param integer $offset Offset
268
+ * @return void
269
+ */
270
+ public function offsetUnset($offset)
271
+ {
272
+ unset($this->container[$offset]);
273
+ }
274
+
275
+ /**
276
+ * Gets the string presentation of the object
277
+ * @return string
278
+ */
279
+ public function __toString()
280
+ {
281
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
282
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
283
+ }
284
+
285
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
286
+ }
287
+ }
288
+
289
+
lib/CMGroep/Idin/src/Models/MerchantResponseServices.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MerchantResponseServices
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * MerchantResponseServices Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class MerchantResponseServices implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'MerchantResponseServices';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'identity' => 'bool',
70
+ 'name' => 'bool',
71
+ 'address' => 'bool',
72
+ 'date_of_birth' => 'bool',
73
+ '_18y_or_older' => 'bool'
74
+ );
75
+
76
+ public static function swaggerTypes()
77
+ {
78
+ return self::$swaggerTypes;
79
+ }
80
+
81
+ /**
82
+ * Array of attributes where the key is the local name, and the value is the original name
83
+ * @var string[]
84
+ */
85
+ protected static $attributeMap = array(
86
+ 'identity' => 'identity',
87
+ 'name' => 'name',
88
+ 'address' => 'address',
89
+ 'date_of_birth' => 'date_of_birth',
90
+ '_18y_or_older' => '18y_or_older'
91
+ );
92
+
93
+ public static function attributeMap()
94
+ {
95
+ return self::$attributeMap;
96
+ }
97
+
98
+ /**
99
+ * Array of attributes to setter functions (for deserialization of responses)
100
+ * @var string[]
101
+ */
102
+ protected static $setters = array(
103
+ 'identity' => 'setIdentity',
104
+ 'name' => 'setName',
105
+ 'address' => 'setAddress',
106
+ 'date_of_birth' => 'setDateOfBirth',
107
+ '_18y_or_older' => 'set18yOrOlder'
108
+ );
109
+
110
+ public static function setters()
111
+ {
112
+ return self::$setters;
113
+ }
114
+
115
+ /**
116
+ * Array of attributes to getter functions (for serialization of requests)
117
+ * @var string[]
118
+ */
119
+ protected static $getters = array(
120
+ 'identity' => 'getIdentity',
121
+ 'name' => 'getName',
122
+ 'address' => 'getAddress',
123
+ 'date_of_birth' => 'getDateOfBirth',
124
+ '_18y_or_older' => 'get18yOrOlder'
125
+ );
126
+
127
+ public static function getters()
128
+ {
129
+ return self::$getters;
130
+ }
131
+
132
+
133
+
134
+
135
+
136
+ /**
137
+ * Associative array for storing property values
138
+ * @var mixed[]
139
+ */
140
+ protected $container = array();
141
+
142
+ /**
143
+ * Constructor
144
+ * @param mixed[] $data Associated array of property value initalizing the model
145
+ */
146
+ public function __construct(array $data = null)
147
+ {
148
+ $this->container['identity'] = isset($data['identity']) ? $data['identity'] : null;
149
+ $this->container['name'] = isset($data['name']) ? $data['name'] : null;
150
+ $this->container['address'] = isset($data['address']) ? $data['address'] : null;
151
+ $this->container['date_of_birth'] = isset($data['date_of_birth']) ? $data['date_of_birth'] : null;
152
+ $this->container['_18y_or_older'] = isset($data['_18y_or_older']) ? $data['_18y_or_older'] : null;
153
+ }
154
+
155
+ /**
156
+ * show all the invalid properties with reasons.
157
+ *
158
+ * @return array invalid properties with reasons
159
+ */
160
+ public function listInvalidProperties()
161
+ {
162
+ $invalid_properties = array();
163
+ return $invalid_properties;
164
+ }
165
+
166
+ /**
167
+ * validate all the properties in the model
168
+ * return true if all passed
169
+ *
170
+ * @return bool True if all properteis are valid
171
+ */
172
+ public function valid()
173
+ {
174
+ return true;
175
+ }
176
+
177
+
178
+ /**
179
+ * Gets identity
180
+ * @return bool
181
+ */
182
+ public function getIdentity()
183
+ {
184
+ return $this->container['identity'];
185
+ }
186
+
187
+ /**
188
+ * Sets identity
189
+ * @param bool $identity Determines if Identity service enabled
190
+ * @return $this
191
+ */
192
+ public function setIdentity($identity)
193
+ {
194
+ $this->container['identity'] = $identity;
195
+
196
+ return $this;
197
+ }
198
+
199
+ /**
200
+ * Gets name
201
+ * @return bool
202
+ */
203
+ public function getName()
204
+ {
205
+ return $this->container['name'];
206
+ }
207
+
208
+ /**
209
+ * Sets name
210
+ * @param bool $name Determines if Name service enabled
211
+ * @return $this
212
+ */
213
+ public function setName($name)
214
+ {
215
+ $this->container['name'] = $name;
216
+
217
+ return $this;
218
+ }
219
+
220
+ /**
221
+ * Gets address
222
+ * @return bool
223
+ */
224
+ public function getAddress()
225
+ {
226
+ return $this->container['address'];
227
+ }
228
+
229
+ /**
230
+ * Sets address
231
+ * @param bool $address Determines if Address service enabled
232
+ * @return $this
233
+ */
234
+ public function setAddress($address)
235
+ {
236
+ $this->container['address'] = $address;
237
+
238
+ return $this;
239
+ }
240
+
241
+ /**
242
+ * Gets date_of_birth
243
+ * @return bool
244
+ */
245
+ public function getDateOfBirth()
246
+ {
247
+ return $this->container['date_of_birth'];
248
+ }
249
+
250
+ /**
251
+ * Sets date_of_birth
252
+ * @param bool $date_of_birth Determines if Date of Birth service enabled
253
+ * @return $this
254
+ */
255
+ public function setDateOfBirth($date_of_birth)
256
+ {
257
+ $this->container['date_of_birth'] = $date_of_birth;
258
+
259
+ return $this;
260
+ }
261
+
262
+ /**
263
+ * Gets _18y_or_older
264
+ * @return bool
265
+ */
266
+ public function get18yOrOlder()
267
+ {
268
+ return $this->container['_18y_or_older'];
269
+ }
270
+
271
+ /**
272
+ * Sets _18y_or_older
273
+ * @param bool $_18y_or_older Determines if 18+ service enabled
274
+ * @return $this
275
+ */
276
+ public function set18yOrOlder($_18y_or_older)
277
+ {
278
+ $this->container['_18y_or_older'] = $_18y_or_older;
279
+
280
+ return $this;
281
+ }
282
+ /**
283
+ * Returns true if offset exists. False otherwise.
284
+ * @param integer $offset Offset
285
+ * @return boolean
286
+ */
287
+ public function offsetExists($offset)
288
+ {
289
+ return isset($this->container[$offset]);
290
+ }
291
+
292
+ /**
293
+ * Gets offset.
294
+ * @param integer $offset Offset
295
+ * @return mixed
296
+ */
297
+ public function offsetGet($offset)
298
+ {
299
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
300
+ }
301
+
302
+ /**
303
+ * Sets value based on offset.
304
+ * @param integer $offset Offset
305
+ * @param mixed $value Value to be set
306
+ * @return void
307
+ */
308
+ public function offsetSet($offset, $value)
309
+ {
310
+ if (is_null($offset)) {
311
+ $this->container[] = $value;
312
+ } else {
313
+ $this->container[$offset] = $value;
314
+ }
315
+ }
316
+
317
+ /**
318
+ * Unsets offset.
319
+ * @param integer $offset Offset
320
+ * @return void
321
+ */
322
+ public function offsetUnset($offset)
323
+ {
324
+ unset($this->container[$offset]);
325
+ }
326
+
327
+ /**
328
+ * Gets the string presentation of the object
329
+ * @return string
330
+ */
331
+ public function __toString()
332
+ {
333
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
334
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
335
+ }
336
+
337
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
338
+ }
339
+ }
340
+
341
+
lib/CMGroep/Idin/src/Models/StatusRequest.php ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * StatusRequest
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * StatusRequest Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class StatusRequest extends BaseRequest implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'StatusRequest';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'transaction_id' => 'string'
70
+ );
71
+
72
+ public static function swaggerTypes()
73
+ {
74
+ return self::$swaggerTypes + parent::swaggerTypes();
75
+ }
76
+
77
+ /**
78
+ * Array of attributes where the key is the local name, and the value is the original name
79
+ * @var string[]
80
+ */
81
+ protected static $attributeMap = array(
82
+ 'transaction_id' => 'transaction_id'
83
+ );
84
+
85
+ public static function attributeMap()
86
+ {
87
+ return parent::attributeMap() + self::$attributeMap;
88
+ }
89
+
90
+ /**
91
+ * Array of attributes to setter functions (for deserialization of responses)
92
+ * @var string[]
93
+ */
94
+ protected static $setters = array(
95
+ 'transaction_id' => 'setTransactionId'
96
+ );
97
+
98
+ public static function setters()
99
+ {
100
+ return parent::setters() + self::$setters;
101
+ }
102
+
103
+ /**
104
+ * Array of attributes to getter functions (for serialization of requests)
105
+ * @var string[]
106
+ */
107
+ protected static $getters = array(
108
+ 'transaction_id' => 'getTransactionId'
109
+ );
110
+
111
+ public static function getters()
112
+ {
113
+ return parent::getters() + self::$getters;
114
+ }
115
+
116
+
117
+
118
+
119
+
120
+ /**
121
+ * Associative array for storing property values
122
+ * @var mixed[]
123
+ */
124
+ protected $container = array();
125
+
126
+ /**
127
+ * Constructor
128
+ * @param mixed[] $data Associated array of property value initalizing the model
129
+ */
130
+ public function __construct(array $data = null)
131
+ {
132
+ parent::__construct($data);
133
+
134
+ $this->container['transaction_id'] = isset($data['transaction_id']) ? $data['transaction_id'] : null;
135
+ }
136
+
137
+ /**
138
+ * show all the invalid properties with reasons.
139
+ *
140
+ * @return array invalid properties with reasons
141
+ */
142
+ public function listInvalidProperties()
143
+ {
144
+ $invalid_properties = array();
145
+ if ($this->container['transaction_id'] === null) {
146
+ $invalid_properties[] = "'transaction_id' can't be null";
147
+ }
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ if ($this->container['transaction_id'] === null) {
160
+ return false;
161
+ }
162
+ return true;
163
+ }
164
+
165
+
166
+ /**
167
+ * Gets transaction_id
168
+ * @return string
169
+ */
170
+ public function getTransactionId()
171
+ {
172
+ return $this->container['transaction_id'];
173
+ }
174
+
175
+ /**
176
+ * Sets transaction_id
177
+ * @param string $transaction_id The transaction id the details should be requested for
178
+ * @return $this
179
+ */
180
+ public function setTransactionId($transaction_id)
181
+ {
182
+ $this->container['transaction_id'] = $transaction_id;
183
+
184
+ return $this;
185
+ }
186
+ /**
187
+ * Returns true if offset exists. False otherwise.
188
+ * @param integer $offset Offset
189
+ * @return boolean
190
+ */
191
+ public function offsetExists($offset)
192
+ {
193
+ return isset($this->container[$offset]);
194
+ }
195
+
196
+ /**
197
+ * Gets offset.
198
+ * @param integer $offset Offset
199
+ * @return mixed
200
+ */
201
+ public function offsetGet($offset)
202
+ {
203
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
204
+ }
205
+
206
+ /**
207
+ * Sets value based on offset.
208
+ * @param integer $offset Offset
209
+ * @param mixed $value Value to be set
210
+ * @return void
211
+ */
212
+ public function offsetSet($offset, $value)
213
+ {
214
+ if (is_null($offset)) {
215
+ $this->container[] = $value;
216
+ } else {
217
+ $this->container[$offset] = $value;
218
+ }
219
+ }
220
+
221
+ /**
222
+ * Unsets offset.
223
+ * @param integer $offset Offset
224
+ * @return void
225
+ */
226
+ public function offsetUnset($offset)
227
+ {
228
+ unset($this->container[$offset]);
229
+ }
230
+
231
+ /**
232
+ * Gets the string presentation of the object
233
+ * @return string
234
+ */
235
+ public function __toString()
236
+ {
237
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
238
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
239
+ }
240
+
241
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
242
+ }
243
+ }
244
+
245
+
lib/CMGroep/Idin/src/Models/StatusResponse.php ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * StatusResponse
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * StatusResponse Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class StatusResponse implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'StatusResponse';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'status' => 'string',
70
+ 'bin' => 'string',
71
+ 'name' => '\CMGroep\Idin\Models\IdentityBase',
72
+ 'partner' => '\CMGroep\Idin\Models\IdentityBase',
73
+ 'address' => '\CMGroep\Idin\Models\IdentityAddress',
74
+ 'age' => '\CMGroep\Idin\Models\IdentityAge'
75
+ );
76
+
77
+ public static function swaggerTypes()
78
+ {
79
+ return self::$swaggerTypes;
80
+ }
81
+
82
+ /**
83
+ * Array of attributes where the key is the local name, and the value is the original name
84
+ * @var string[]
85
+ */
86
+ protected static $attributeMap = array(
87
+ 'status' => 'status',
88
+ 'bin' => 'bin',
89
+ 'name' => 'name',
90
+ 'partner' => 'partner',
91
+ 'address' => 'address',
92
+ 'age' => 'age'
93
+ );
94
+
95
+ public static function attributeMap()
96
+ {
97
+ return self::$attributeMap;
98
+ }
99
+
100
+ /**
101
+ * Array of attributes to setter functions (for deserialization of responses)
102
+ * @var string[]
103
+ */
104
+ protected static $setters = array(
105
+ 'status' => 'setStatus',
106
+ 'bin' => 'setBin',
107
+ 'name' => 'setName',
108
+ 'partner' => 'setPartner',
109
+ 'address' => 'setAddress',
110
+ 'age' => 'setAge'
111
+ );
112
+
113
+ public static function setters()
114
+ {
115
+ return self::$setters;
116
+ }
117
+
118
+ /**
119
+ * Array of attributes to getter functions (for serialization of requests)
120
+ * @var string[]
121
+ */
122
+ protected static $getters = array(
123
+ 'status' => 'getStatus',
124
+ 'bin' => 'getBin',
125
+ 'name' => 'getName',
126
+ 'partner' => 'getPartner',
127
+ 'address' => 'getAddress',
128
+ 'age' => 'getAge'
129
+ );
130
+
131
+ public static function getters()
132
+ {
133
+ return self::$getters;
134
+ }
135
+
136
+
137
+
138
+
139
+
140
+ /**
141
+ * Associative array for storing property values
142
+ * @var mixed[]
143
+ */
144
+ protected $container = array();
145
+
146
+ /**
147
+ * Constructor
148
+ * @param mixed[] $data Associated array of property value initalizing the model
149
+ */
150
+ public function __construct(array $data = null)
151
+ {
152
+ $this->container['status'] = isset($data['status']) ? $data['status'] : null;
153
+ $this->container['bin'] = isset($data['bin']) ? $data['bin'] : null;
154
+ $this->container['name'] = isset($data['name']) ? $data['name'] : null;
155
+ $this->container['partner'] = isset($data['partner']) ? $data['partner'] : null;
156
+ $this->container['address'] = isset($data['address']) ? $data['address'] : null;
157
+ $this->container['age'] = isset($data['age']) ? $data['age'] : null;
158
+ }
159
+
160
+ /**
161
+ * show all the invalid properties with reasons.
162
+ *
163
+ * @return array invalid properties with reasons
164
+ */
165
+ public function listInvalidProperties()
166
+ {
167
+ $invalid_properties = array();
168
+ return $invalid_properties;
169
+ }
170
+
171
+ /**
172
+ * validate all the properties in the model
173
+ * return true if all passed
174
+ *
175
+ * @return bool True if all properteis are valid
176
+ */
177
+ public function valid()
178
+ {
179
+ return true;
180
+ }
181
+
182
+
183
+ /**
184
+ * Gets status
185
+ * @return string
186
+ */
187
+ public function getStatus()
188
+ {
189
+ return $this->container['status'];
190
+ }
191
+
192
+ /**
193
+ * Sets status
194
+ * @param string $status The status of the transaction
195
+ * @return $this
196
+ */
197
+ public function setStatus($status)
198
+ {
199
+ $this->container['status'] = $status;
200
+
201
+ return $this;
202
+ }
203
+
204
+ /**
205
+ * Gets bin
206
+ * @return string
207
+ */
208
+ public function getBin()
209
+ {
210
+ return $this->container['bin'];
211
+ }
212
+
213
+ /**
214
+ * Sets bin
215
+ * @param string $bin Unique token if identity was requested. This value will be consistent for recurring transactions by the same person
216
+ * @return $this
217
+ */
218
+ public function setBin($bin)
219
+ {
220
+ $this->container['bin'] = $bin;
221
+
222
+ return $this;
223
+ }
224
+
225
+ /**
226
+ * Gets name
227
+ * @return \CMGroep\Idin\Models\IdentityBase
228
+ */
229
+ public function getName()
230
+ {
231
+ return $this->container['name'];
232
+ }
233
+
234
+ /**
235
+ * Sets name
236
+ * @param \CMGroep\Idin\Models\IdentityBase $name
237
+ * @return $this
238
+ */
239
+ public function setName($name)
240
+ {
241
+ $this->container['name'] = $name;
242
+
243
+ return $this;
244
+ }
245
+
246
+ /**
247
+ * Gets partner
248
+ * @return \CMGroep\Idin\Models\IdentityBase
249
+ */
250
+ public function getPartner()
251
+ {
252
+ return $this->container['partner'];
253
+ }
254
+
255
+ /**
256
+ * Sets partner
257
+ * @param \CMGroep\Idin\Models\IdentityBase $partner
258
+ * @return $this
259
+ */
260
+ public function setPartner($partner)
261
+ {
262
+ $this->container['partner'] = $partner;
263
+
264
+ return $this;
265
+ }
266
+
267
+ /**
268
+ * Gets address
269
+ * @return \CMGroep\Idin\Models\IdentityAddress
270
+ */
271
+ public function getAddress()
272
+ {
273
+ return $this->container['address'];
274
+ }
275
+
276
+ /**
277
+ * Sets address
278
+ * @param \CMGroep\Idin\Models\IdentityAddress $address
279
+ * @return $this
280
+ */
281
+ public function setAddress($address)
282
+ {
283
+ $this->container['address'] = $address;
284
+
285
+ return $this;
286
+ }
287
+
288
+ /**
289
+ * Gets age
290
+ * @return \CMGroep\Idin\Models\IdentityAge
291
+ */
292
+ public function getAge()
293
+ {
294
+ return $this->container['age'];
295
+ }
296
+
297
+ /**
298
+ * Sets age
299
+ * @param \CMGroep\Idin\Models\IdentityAge $age
300
+ * @return $this
301
+ */
302
+ public function setAge($age)
303
+ {
304
+ $this->container['age'] = $age;
305
+
306
+ return $this;
307
+ }
308
+ /**
309
+ * Returns true if offset exists. False otherwise.
310
+ * @param integer $offset Offset
311
+ * @return boolean
312
+ */
313
+ public function offsetExists($offset)
314
+ {
315
+ return isset($this->container[$offset]);
316
+ }
317
+
318
+ /**
319
+ * Gets offset.
320
+ * @param integer $offset Offset
321
+ * @return mixed
322
+ */
323
+ public function offsetGet($offset)
324
+ {
325
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
326
+ }
327
+
328
+ /**
329
+ * Sets value based on offset.
330
+ * @param integer $offset Offset
331
+ * @param mixed $value Value to be set
332
+ * @return void
333
+ */
334
+ public function offsetSet($offset, $value)
335
+ {
336
+ if (is_null($offset)) {
337
+ $this->container[] = $value;
338
+ } else {
339
+ $this->container[$offset] = $value;
340
+ }
341
+ }
342
+
343
+ /**
344
+ * Unsets offset.
345
+ * @param integer $offset Offset
346
+ * @return void
347
+ */
348
+ public function offsetUnset($offset)
349
+ {
350
+ unset($this->container[$offset]);
351
+ }
352
+
353
+ /**
354
+ * Gets the string presentation of the object
355
+ * @return string
356
+ */
357
+ public function __toString()
358
+ {
359
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
360
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
361
+ }
362
+
363
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
364
+ }
365
+ }
366
+
367
+
lib/CMGroep/Idin/src/Models/TransactionRequest.php ADDED
@@ -0,0 +1,495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * TransactionRequest
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * TransactionRequest Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class TransactionRequest extends BaseRequest implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'TransactionRequest';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'issuer_id' => 'string',
70
+ 'entrance_code' => 'string',
71
+ 'merchant_return_url' => 'string',
72
+ 'language' => 'string',
73
+ 'identity' => 'bool',
74
+ 'name' => 'bool',
75
+ 'address' => 'bool',
76
+ 'date_of_birth' => 'bool',
77
+ '_18y_or_older' => 'bool'
78
+ );
79
+
80
+ public static function swaggerTypes()
81
+ {
82
+ return self::$swaggerTypes + parent::swaggerTypes();
83
+ }
84
+
85
+ /**
86
+ * Array of attributes where the key is the local name, and the value is the original name
87
+ * @var string[]
88
+ */
89
+ protected static $attributeMap = array(
90
+ 'issuer_id' => 'issuer_id',
91
+ 'entrance_code' => 'entrance_code',
92
+ 'merchant_return_url' => 'merchant_return_url',
93
+ 'language' => 'language',
94
+ 'identity' => 'identity',
95
+ 'name' => 'name',
96
+ 'address' => 'address',
97
+ 'date_of_birth' => 'date_of_birth',
98
+ '_18y_or_older' => '18y_or_older'
99
+ );
100
+
101
+ public static function attributeMap()
102
+ {
103
+ return parent::attributeMap() + self::$attributeMap;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to setter functions (for deserialization of responses)
108
+ * @var string[]
109
+ */
110
+ protected static $setters = array(
111
+ 'issuer_id' => 'setIssuerId',
112
+ 'entrance_code' => 'setEntranceCode',
113
+ 'merchant_return_url' => 'setMerchantReturnUrl',
114
+ 'language' => 'setLanguage',
115
+ 'identity' => 'setIdentity',
116
+ 'name' => 'setName',
117
+ 'address' => 'setAddress',
118
+ 'date_of_birth' => 'setDateOfBirth',
119
+ '_18y_or_older' => 'set18yOrOlder'
120
+ );
121
+
122
+ public static function setters()
123
+ {
124
+ return parent::setters() + self::$setters;
125
+ }
126
+
127
+ /**
128
+ * Array of attributes to getter functions (for serialization of requests)
129
+ * @var string[]
130
+ */
131
+ protected static $getters = array(
132
+ 'issuer_id' => 'getIssuerId',
133
+ 'entrance_code' => 'getEntranceCode',
134
+ 'merchant_return_url' => 'getMerchantReturnUrl',
135
+ 'language' => 'getLanguage',
136
+ 'identity' => 'getIdentity',
137
+ 'name' => 'getName',
138
+ 'address' => 'getAddress',
139
+ 'date_of_birth' => 'getDateOfBirth',
140
+ '_18y_or_older' => 'get18yOrOlder'
141
+ );
142
+
143
+ public static function getters()
144
+ {
145
+ return parent::getters() + self::$getters;
146
+ }
147
+
148
+
149
+
150
+
151
+
152
+ /**
153
+ * Associative array for storing property values
154
+ * @var mixed[]
155
+ */
156
+ protected $container = array();
157
+
158
+ /**
159
+ * Constructor
160
+ * @param mixed[] $data Associated array of property value initalizing the model
161
+ */
162
+ public function __construct(array $data = null)
163
+ {
164
+ parent::__construct($data);
165
+
166
+ $this->container['issuer_id'] = isset($data['issuer_id']) ? $data['issuer_id'] : null;
167
+ $this->container['entrance_code'] = isset($data['entrance_code']) ? $data['entrance_code'] : null;
168
+ $this->container['merchant_return_url'] = isset($data['merchant_return_url']) ? $data['merchant_return_url'] : null;
169
+ $this->container['language'] = isset($data['language']) ? $data['language'] : null;
170
+ $this->container['identity'] = isset($data['identity']) ? $data['identity'] : false;
171
+ $this->container['name'] = isset($data['name']) ? $data['name'] : false;
172
+ $this->container['address'] = isset($data['address']) ? $data['address'] : false;
173
+ $this->container['date_of_birth'] = isset($data['date_of_birth']) ? $data['date_of_birth'] : false;
174
+ $this->container['_18y_or_older'] = isset($data['_18y_or_older']) ? $data['_18y_or_older'] : false;
175
+ }
176
+
177
+ /**
178
+ * show all the invalid properties with reasons.
179
+ *
180
+ * @return array invalid properties with reasons
181
+ */
182
+ public function listInvalidProperties()
183
+ {
184
+ $invalid_properties = array();
185
+ if ($this->container['issuer_id'] === null) {
186
+ $invalid_properties[] = "'issuer_id' can't be null";
187
+ }
188
+ if ($this->container['entrance_code'] === null) {
189
+ $invalid_properties[] = "'entrance_code' can't be null";
190
+ }
191
+ if ($this->container['merchant_return_url'] === null) {
192
+ $invalid_properties[] = "'merchant_return_url' can't be null";
193
+ }
194
+ if ($this->container['identity'] === null) {
195
+ $invalid_properties[] = "'identity' can't be null";
196
+ }
197
+ if ($this->container['name'] === null) {
198
+ $invalid_properties[] = "'name' can't be null";
199
+ }
200
+ if ($this->container['address'] === null) {
201
+ $invalid_properties[] = "'address' can't be null";
202
+ }
203
+ if ($this->container['date_of_birth'] === null) {
204
+ $invalid_properties[] = "'date_of_birth' can't be null";
205
+ }
206
+ if ($this->container['_18y_or_older'] === null) {
207
+ $invalid_properties[] = "'_18y_or_older' can't be null";
208
+ }
209
+ return $invalid_properties;
210
+ }
211
+
212
+ /**
213
+ * validate all the properties in the model
214
+ * return true if all passed
215
+ *
216
+ * @return bool True if all properteis are valid
217
+ */
218
+ public function valid()
219
+ {
220
+ if ($this->container['issuer_id'] === null) {
221
+ return false;
222
+ }
223
+ if ($this->container['entrance_code'] === null) {
224
+ return false;
225
+ }
226
+ if ($this->container['merchant_return_url'] === null) {
227
+ return false;
228
+ }
229
+ if ($this->container['identity'] === null) {
230
+ return false;
231
+ }
232
+ if ($this->container['name'] === null) {
233
+ return false;
234
+ }
235
+ if ($this->container['address'] === null) {
236
+ return false;
237
+ }
238
+ if ($this->container['date_of_birth'] === null) {
239
+ return false;
240
+ }
241
+ if ($this->container['_18y_or_older'] === null) {
242
+ return false;
243
+ }
244
+ return true;
245
+ }
246
+
247
+
248
+ /**
249
+ * Gets issuer_id
250
+ * @return string
251
+ */
252
+ public function getIssuerId()
253
+ {
254
+ return $this->container['issuer_id'];
255
+ }
256
+
257
+ /**
258
+ * Sets issuer_id
259
+ * @param string $issuer_id The ID of the issuer chosen by the end-user
260
+ * @return $this
261
+ */
262
+ public function setIssuerId($issuer_id)
263
+ {
264
+ $this->container['issuer_id'] = $issuer_id;
265
+
266
+ return $this;
267
+ }
268
+
269
+ /**
270
+ * Gets entrance_code
271
+ * @return string
272
+ */
273
+ public function getEntranceCode()
274
+ {
275
+ return $this->container['entrance_code'];
276
+ }
277
+
278
+ /**
279
+ * Sets entrance_code
280
+ * @param string $entrance_code This is a token that will allow you to rejoin the user to his session when he returns. It can be a maximum of 40 characters and should only contain the characters a-z, A-Z and 0-9
281
+ * @return $this
282
+ */
283
+ public function setEntranceCode($entrance_code)
284
+ {
285
+ $this->container['entrance_code'] = $entrance_code;
286
+
287
+ return $this;
288
+ }
289
+
290
+ /**
291
+ * Gets merchant_return_url
292
+ * @return string
293
+ */
294
+ public function getMerchantReturnUrl()
295
+ {
296
+ return $this->container['merchant_return_url'];
297
+ }
298
+
299
+ /**
300
+ * Sets merchant_return_url
301
+ * @param string $merchant_return_url The place where the bank should redirect the user to at the end of the flow. The bank will append two query parameters to this url when returning the user to you, trxid and ec. The latter will contain the value of entrance_code, trxid is the transaction_id that you will receive in this request.
302
+ * @return $this
303
+ */
304
+ public function setMerchantReturnUrl($merchant_return_url)
305
+ {
306
+ $this->container['merchant_return_url'] = $merchant_return_url;
307
+
308
+ return $this;
309
+ }
310
+
311
+ /**
312
+ * Gets language
313
+ * @return string
314
+ */
315
+ public function getLanguage()
316
+ {
317
+ return $this->container['language'];
318
+ }
319
+
320
+ /**
321
+ * Sets language
322
+ * @param string $language Currently only nl and en. This is the preferred language the bank will use to communicate with your user.
323
+ * @return $this
324
+ */
325
+ public function setLanguage($language)
326
+ {
327
+ $this->container['language'] = $language;
328
+
329
+ return $this;
330
+ }
331
+
332
+ /**
333
+ * Gets identity
334
+ * @return bool
335
+ */
336
+ public function getIdentity()
337
+ {
338
+ return $this->container['identity'];
339
+ }
340
+
341
+ /**
342
+ * Sets identity
343
+ * @param bool $identity To retrieve a uniquely identifying token with the bank
344
+ * @return $this
345
+ */
346
+ public function setIdentity($identity)
347
+ {
348
+ $this->container['identity'] = $identity;
349
+
350
+ return $this;
351
+ }
352
+
353
+ /**
354
+ * Gets name
355
+ * @return bool
356
+ */
357
+ public function getName()
358
+ {
359
+ return $this->container['name'];
360
+ }
361
+
362
+ /**
363
+ * Sets name
364
+ * @param bool $name To retrieve name information
365
+ * @return $this
366
+ */
367
+ public function setName($name)
368
+ {
369
+ $this->container['name'] = $name;
370
+
371
+ return $this;
372
+ }
373
+
374
+ /**
375
+ * Gets address
376
+ * @return bool
377
+ */
378
+ public function getAddress()
379
+ {
380
+ return $this->container['address'];
381
+ }
382
+
383
+ /**
384
+ * Sets address
385
+ * @param bool $address To retrieve address information
386
+ * @return $this
387
+ */
388
+ public function setAddress($address)
389
+ {
390
+ $this->container['address'] = $address;
391
+
392
+ return $this;
393
+ }
394
+
395
+ /**
396
+ * Gets date_of_birth
397
+ * @return bool
398
+ */
399
+ public function getDateOfBirth()
400
+ {
401
+ return $this->container['date_of_birth'];
402
+ }
403
+
404
+ /**
405
+ * Sets date_of_birth
406
+ * @param bool $date_of_birth The birthdate of the user
407
+ * @return $this
408
+ */
409
+ public function setDateOfBirth($date_of_birth)
410
+ {
411
+ $this->container['date_of_birth'] = $date_of_birth;
412
+
413
+ return $this;
414
+ }
415
+
416
+ /**
417
+ * Gets _18y_or_older
418
+ * @return bool
419
+ */
420
+ public function get18yOrOlder()
421
+ {
422
+ return $this->container['_18y_or_older'];
423
+ }
424
+
425
+ /**
426
+ * Sets _18y_or_older
427
+ * @param bool $_18y_or_older Is the user 18 year or older
428
+ * @return $this
429
+ */
430
+ public function set18yOrOlder($_18y_or_older)
431
+ {
432
+ $this->container['_18y_or_older'] = $_18y_or_older;
433
+
434
+ return $this;
435
+ }
436
+ /**
437
+ * Returns true if offset exists. False otherwise.
438
+ * @param integer $offset Offset
439
+ * @return boolean
440
+ */
441
+ public function offsetExists($offset)
442
+ {
443
+ return isset($this->container[$offset]);
444
+ }
445
+
446
+ /**
447
+ * Gets offset.
448
+ * @param integer $offset Offset
449
+ * @return mixed
450
+ */
451
+ public function offsetGet($offset)
452
+ {
453
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
454
+ }
455
+
456
+ /**
457
+ * Sets value based on offset.
458
+ * @param integer $offset Offset
459
+ * @param mixed $value Value to be set
460
+ * @return void
461
+ */
462
+ public function offsetSet($offset, $value)
463
+ {
464
+ if (is_null($offset)) {
465
+ $this->container[] = $value;
466
+ } else {
467
+ $this->container[$offset] = $value;
468
+ }
469
+ }
470
+
471
+ /**
472
+ * Unsets offset.
473
+ * @param integer $offset Offset
474
+ * @return void
475
+ */
476
+ public function offsetUnset($offset)
477
+ {
478
+ unset($this->container[$offset]);
479
+ }
480
+
481
+ /**
482
+ * Gets the string presentation of the object
483
+ * @return string
484
+ */
485
+ public function __toString()
486
+ {
487
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
488
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
489
+ }
490
+
491
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
492
+ }
493
+ }
494
+
495
+
lib/CMGroep/Idin/src/Models/TransactionResponse.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * TransactionResponse
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin\Models;
43
+
44
+ use \ArrayAccess;
45
+
46
+ /**
47
+ * TransactionResponse Class Doc Comment
48
+ *
49
+ * @category Class */
50
+ /**
51
+ * @package CMGroep\Idin
52
+ * @author http://github.com/swagger-api/swagger-codegen
53
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
54
+ * @link https://github.com/swagger-api/swagger-codegen
55
+ */
56
+ class TransactionResponse implements ArrayAccess
57
+ {
58
+ /**
59
+ * The original name of the model.
60
+ * @var string
61
+ */
62
+ protected static $swaggerModelName = 'TransactionResponse';
63
+
64
+ /**
65
+ * Array of property to type mappings. Used for (de)serialization
66
+ * @var string[]
67
+ */
68
+ protected static $swaggerTypes = array(
69
+ 'transaction_id' => 'string',
70
+ 'issuer_authentication_url' => 'string'
71
+ );
72
+
73
+ public static function swaggerTypes()
74
+ {
75
+ return self::$swaggerTypes;
76
+ }
77
+
78
+ /**
79
+ * Array of attributes where the key is the local name, and the value is the original name
80
+ * @var string[]
81
+ */
82
+ protected static $attributeMap = array(
83
+ 'transaction_id' => 'transaction_id',
84
+ 'issuer_authentication_url' => 'issuer_authentication_url'
85
+ );
86
+
87
+ public static function attributeMap()
88
+ {
89
+ return self::$attributeMap;
90
+ }
91
+
92
+ /**
93
+ * Array of attributes to setter functions (for deserialization of responses)
94
+ * @var string[]
95
+ */
96
+ protected static $setters = array(
97
+ 'transaction_id' => 'setTransactionId',
98
+ 'issuer_authentication_url' => 'setIssuerAuthenticationUrl'
99
+ );
100
+
101
+ public static function setters()
102
+ {
103
+ return self::$setters;
104
+ }
105
+
106
+ /**
107
+ * Array of attributes to getter functions (for serialization of requests)
108
+ * @var string[]
109
+ */
110
+ protected static $getters = array(
111
+ 'transaction_id' => 'getTransactionId',
112
+ 'issuer_authentication_url' => 'getIssuerAuthenticationUrl'
113
+ );
114
+
115
+ public static function getters()
116
+ {
117
+ return self::$getters;
118
+ }
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Associative array for storing property values
126
+ * @var mixed[]
127
+ */
128
+ protected $container = array();
129
+
130
+ /**
131
+ * Constructor
132
+ * @param mixed[] $data Associated array of property value initalizing the model
133
+ */
134
+ public function __construct(array $data = null)
135
+ {
136
+ $this->container['transaction_id'] = isset($data['transaction_id']) ? $data['transaction_id'] : null;
137
+ $this->container['issuer_authentication_url'] = isset($data['issuer_authentication_url']) ? $data['issuer_authentication_url'] : null;
138
+ }
139
+
140
+ /**
141
+ * show all the invalid properties with reasons.
142
+ *
143
+ * @return array invalid properties with reasons
144
+ */
145
+ public function listInvalidProperties()
146
+ {
147
+ $invalid_properties = array();
148
+ return $invalid_properties;
149
+ }
150
+
151
+ /**
152
+ * validate all the properties in the model
153
+ * return true if all passed
154
+ *
155
+ * @return bool True if all properteis are valid
156
+ */
157
+ public function valid()
158
+ {
159
+ return true;
160
+ }
161
+
162
+
163
+ /**
164
+ * Gets transaction_id
165
+ * @return string
166
+ */
167
+ public function getTransactionId()
168
+ {
169
+ return $this->container['transaction_id'];
170
+ }
171
+
172
+ /**
173
+ * Sets transaction_id
174
+ * @param string $transaction_id ID of the transaction
175
+ * @return $this
176
+ */
177
+ public function setTransactionId($transaction_id)
178
+ {
179
+ $this->container['transaction_id'] = $transaction_id;
180
+
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * Gets issuer_authentication_url
186
+ * @return string
187
+ */
188
+ public function getIssuerAuthenticationUrl()
189
+ {
190
+ return $this->container['issuer_authentication_url'];
191
+ }
192
+
193
+ /**
194
+ * Sets issuer_authentication_url
195
+ * @param string $issuer_authentication_url URL where the end-user should be redirected to
196
+ * @return $this
197
+ */
198
+ public function setIssuerAuthenticationUrl($issuer_authentication_url)
199
+ {
200
+ $this->container['issuer_authentication_url'] = $issuer_authentication_url;
201
+
202
+ return $this;
203
+ }
204
+ /**
205
+ * Returns true if offset exists. False otherwise.
206
+ * @param integer $offset Offset
207
+ * @return boolean
208
+ */
209
+ public function offsetExists($offset)
210
+ {
211
+ return isset($this->container[$offset]);
212
+ }
213
+
214
+ /**
215
+ * Gets offset.
216
+ * @param integer $offset Offset
217
+ * @return mixed
218
+ */
219
+ public function offsetGet($offset)
220
+ {
221
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
222
+ }
223
+
224
+ /**
225
+ * Sets value based on offset.
226
+ * @param integer $offset Offset
227
+ * @param mixed $value Value to be set
228
+ * @return void
229
+ */
230
+ public function offsetSet($offset, $value)
231
+ {
232
+ if (is_null($offset)) {
233
+ $this->container[] = $value;
234
+ } else {
235
+ $this->container[$offset] = $value;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Unsets offset.
241
+ * @param integer $offset Offset
242
+ * @return void
243
+ */
244
+ public function offsetUnset($offset)
245
+ {
246
+ unset($this->container[$offset]);
247
+ }
248
+
249
+ /**
250
+ * Gets the string presentation of the object
251
+ * @return string
252
+ */
253
+ public function __toString()
254
+ {
255
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
256
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
257
+ }
258
+
259
+ return json_encode(\CMGroep\Idin\ObjectSerializer::sanitizeForSerialization($this));
260
+ }
261
+ }
262
+
263
+
lib/CMGroep/Idin/src/ObjectSerializer.php ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * ObjectSerializer
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * @category Class
8
+ * @package CMGroep\Idin
9
+ * @author http://github.com/swagger-api/swagger-codegen
10
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
11
+ * @link https://github.com/swagger-api/swagger-codegen
12
+ */
13
+
14
+ /**
15
+ * iDIN API
16
+ *
17
+ * CMGroep iDIN API
18
+ *
19
+ * OpenAPI spec version: 1.0.0
20
+ *
21
+ * Generated by: https://github.com/swagger-api/swagger-codegen.git
22
+ *
23
+ * Licensed under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /**
37
+ * NOTE: This class is auto generated by the swagger code generator program.
38
+ * https://github.com/swagger-api/swagger-codegen
39
+ * Do not edit the class manually.
40
+ */
41
+
42
+ namespace CMGroep\Idin;
43
+
44
+ /**
45
+ * ObjectSerializer Class Doc Comment
46
+ *
47
+ * @category Class
48
+ * @package CMGroep\Idin
49
+ * @author http://github.com/swagger-api/swagger-codegen
50
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
51
+ * @link https://github.com/swagger-api/swagger-codegen
52
+ */
53
+ class ObjectSerializer
54
+ {
55
+
56
+ /**
57
+ * Serialize data
58
+ *
59
+ * @param mixed $data the data to serialize
60
+ *
61
+ * @return string serialized form of $data
62
+ */
63
+ public static function sanitizeForSerialization($data)
64
+ {
65
+ if (is_scalar($data) || null === $data) {
66
+ return $data;
67
+ } elseif ($data instanceof \DateTime) {
68
+ return $data->format(\DateTime::ATOM);
69
+ } elseif (is_array($data)) {
70
+ foreach ($data as $property => $value) {
71
+ $data[$property] = self::sanitizeForSerialization($value);
72
+ }
73
+ return $data;
74
+ } elseif (is_object($data)) {
75
+ $values = array();
76
+ foreach (array_keys($data::swaggerTypes()) as $property) {
77
+ $getter = $data::getters()[$property];
78
+ if ($data->$getter() !== null) {
79
+ $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($data->$getter());
80
+ }
81
+ }
82
+ return (object)$values;
83
+ } else {
84
+ return (string)$data;
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Sanitize filename by removing path.
90
+ * e.g. ../../sun.gif becomes sun.gif
91
+ *
92
+ * @param string $filename filename to be sanitized
93
+ *
94
+ * @return string the sanitized filename
95
+ */
96
+ public function sanitizeFilename($filename)
97
+ {
98
+ if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) {
99
+ return $match[1];
100
+ } else {
101
+ return $filename;
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Take value and turn it into a string suitable for inclusion in
107
+ * the path, by url-encoding.
108
+ *
109
+ * @param string $value a string which will be part of the path
110
+ *
111
+ * @return string the serialized object
112
+ */
113
+ public function toPathValue($value)
114
+ {
115
+ return rawurlencode($this->toString($value));
116
+ }
117
+
118
+ /**
119
+ * Take value and turn it into a string suitable for inclusion in
120
+ * the query, by imploding comma-separated if it's an object.
121
+ * If it's a string, pass through unchanged. It will be url-encoded
122
+ * later.
123
+ *
124
+ * @param object $object an object to be serialized to a string
125
+ *
126
+ * @return string the serialized object
127
+ */
128
+ public function toQueryValue($object)
129
+ {
130
+ if (is_array($object)) {
131
+ return implode(',', $object);
132
+ } else {
133
+ return $this->toString($object);
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Take value and turn it into a string suitable for inclusion in
139
+ * the header. If it's a string, pass through unchanged
140
+ * If it's a datetime object, format it in ISO8601
141
+ *
142
+ * @param string $value a string which will be part of the header
143
+ *
144
+ * @return string the header string
145
+ */
146
+ public function toHeaderValue($value)
147
+ {
148
+ return $this->toString($value);
149
+ }
150
+
151
+ /**
152
+ * Take value and turn it into a string suitable for inclusion in
153
+ * the http body (form parameter). If it's a string, pass through unchanged
154
+ * If it's a datetime object, format it in ISO8601
155
+ *
156
+ * @param string $value the value of the form parameter
157
+ *
158
+ * @return string the form string
159
+ */
160
+ public function toFormValue($value)
161
+ {
162
+ if ($value instanceof \SplFileObject) {
163
+ return $value->getRealPath();
164
+ } else {
165
+ return $this->toString($value);
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Take value and turn it into a string suitable for inclusion in
171
+ * the parameter. If it's a string, pass through unchanged
172
+ * If it's a datetime object, format it in ISO8601
173
+ *
174
+ * @param string $value the value of the parameter
175
+ *
176
+ * @return string the header string
177
+ */
178
+ public function toString($value)
179
+ {
180
+ if ($value instanceof \DateTime) { // datetime in ISO8601 format
181
+ return $value->format(\DateTime::ATOM);
182
+ } else {
183
+ return $value;
184
+ }
185
+ }
186
+
187
+ /**
188
+ * Serialize an array to a string.
189
+ *
190
+ * @param array $collection collection to serialize to a string
191
+ * @param string $collectionFormat the format use for serialization (csv,
192
+ * ssv, tsv, pipes, multi)
193
+ *
194
+ * @return string
195
+ */
196
+ public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false)
197
+ {
198
+ if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
199
+ // http_build_query() almost does the job for us. We just
200
+ // need to fix the result of multidimensional arrays.
201
+ return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&'));
202
+ }
203
+ switch ($collectionFormat) {
204
+ case 'pipes':
205
+ return implode('|', $collection);
206
+
207
+ case 'tsv':
208
+ return implode("\t", $collection);
209
+
210
+ case 'ssv':
211
+ return implode(' ', $collection);
212
+
213
+ case 'csv':
214
+ // Deliberate fall through. CSV is default format.
215
+ default:
216
+ return implode(',', $collection);
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Deserialize a JSON string into an object
222
+ *
223
+ * @param mixed $data object or primitive to be deserialized
224
+ * @param string $class class name is passed as a string
225
+ * @param string $httpHeaders HTTP headers
226
+ * @param string $discriminator discriminator if polymorphism is used
227
+ *
228
+ * @return object an instance of $class
229
+ */
230
+ public static function deserialize($data, $class, $httpHeaders = null, $discriminator = null)
231
+ {
232
+ if (null === $data) {
233
+ return null;
234
+ } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
235
+ $inner = substr($class, 4, -1);
236
+ $deserialized = array();
237
+ if (strrpos($inner, ",") !== false) {
238
+ $subClass_array = explode(',', $inner, 2);
239
+ $subClass = $subClass_array[1];
240
+ foreach ($data as $key => $value) {
241
+ $deserialized[$key] = self::deserialize($value, $subClass, null, $discriminator);
242
+ }
243
+ }
244
+ return $deserialized;
245
+ } elseif (strcasecmp(substr($class, -2), '[]') == 0) {
246
+ $subClass = substr($class, 0, -2);
247
+ $values = array();
248
+ foreach ($data as $key => $value) {
249
+ $values[] = self::deserialize($value, $subClass, null, $discriminator);
250
+ }
251
+ return $values;
252
+ } elseif ($class === 'object') {
253
+ settype($data, 'array');
254
+ return $data;
255
+ } elseif ($class === '\DateTime') {
256
+ // Some API's return an invalid, empty string as a
257
+ // date-time property. DateTime::__construct() will return
258
+ // the current time for empty input which is probably not
259
+ // what is meant. The invalid empty string is probably to
260
+ // be interpreted as a missing field/value. Let's handle
261
+ // this graceful.
262
+ if (!empty($data)) {
263
+ return new \DateTime($data);
264
+ } else {
265
+ return null;
266
+ }
267
+ } elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
268
+ settype($data, $class);
269
+ return $data;
270
+ } elseif ($class === '\SplFileObject') {
271
+ // determine file name
272
+ if (array_key_exists('Content-Disposition', $httpHeaders) &&
273
+ preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
274
+ $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
275
+ } else {
276
+ $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
277
+ }
278
+ $deserialized = new \SplFileObject($filename, "w");
279
+ $byte_written = $deserialized->fwrite($data);
280
+
281
+ if (Configuration::getDefaultConfiguration()->getDebug()) {
282
+ error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile());
283
+ }
284
+
285
+ return $deserialized;
286
+ } else {
287
+ // If a discriminator is defined and points to a valid subclass, use it.
288
+ if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
289
+ $subclass = '\CMGroep\Idin\Model\\' . $data->{$discriminator};
290
+ if (is_subclass_of($subclass, $class)) {
291
+ $class = $subclass;
292
+ }
293
+ }
294
+ $instance = new $class();
295
+ foreach ($instance::swaggerTypes() as $property => $type) {
296
+ $propertySetter = $instance::setters()[$property];
297
+
298
+ if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) {
299
+ continue;
300
+ }
301
+
302
+ $propertyValue = $data->{$instance::attributeMap()[$property]};
303
+ if (isset($propertyValue)) {
304
+ $instance->$propertySetter(self::deserialize($propertyValue, $type, null, $discriminator));
305
+ }
306
+ }
307
+ return $instance;
308
+ }
309
+ }
310
+ }
package.xml ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?xml version="1.0"?>
2
+ <package><name>official-idin-magento-extension</name><version>1.0.0</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Official iDIN extension</summary><description>This extension provides iDIN functionality.</description><notes>Release 1.0</notes><authors><author><name>Epartment Ecommerce</name><user>epartment</user><email>support@epartment.nl</email></author></authors><date>2017-02-06</date><time>5:34:00</time><compatible></compatible><dependencies><required><php><min>5.4.0</min><max>7.1.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="cm"><dir name="idin"><dir name="customer"><dir name="tab"><dir name="view"><file name="idin.phtml" hash="00cdde8057fc21c299fbb8501ce5c8a7"/></dir></dir></dir><dir name="transaction"><file name="response.phtml" hash="2f78945b18ecdb4ae4a7280dd9fca89c"/></dir><dir name="system"><dir name="config"><file name="support.phtml" hash="bbec197e72c66af47d7e90142ffcc26e"/></dir></dir></dir></dir></dir><dir name="layout"><file name="cmgroep_idin.xml" hash="28d2b7ffd4d4557185ce916fa7d89c30"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="cmgroep"><dir name="idin"><file name="register_login.phtml" hash="fb94416cc3d357a4bd1531920959d7d0"/><dir name="customer"><file name="info.phtml" hash="b07288f9d30e922613bf4d892e23bc73"/></dir><dir name="catalog"><dir name="product"><file name="notice.phtml" hash="c8c7009d7135152323e6166accf3b11e"/></dir></dir><dir name="registration"><file name="finish.phtml" hash="66bd307f7968d4dbcce7a19ca3808dc1"/></dir><dir name="checkout"><file name="onepage.phtml" hash="91021a04dfe5fe751a68d74c1423f791"/><dir name="third_party"><dir name="onestepcheckout"><file name="checkout.phtml" hash="6cd03b45763fd46ca909a06853ea38ae"/><file name="js.phtml" hash="24085838899184137c210f0e7ab334ae"/></dir></dir><dir name="onepage"><file name="age_verification.phtml" hash="8ab05c3487a7366a9289bebcff476687"/><file name="progress.phtml" hash="adfea48109c836ea32d114f574dd5596"/><dir name="progress"><file name="age_verification.phtml" hash="e2a6ecef749ce607449eda963379e421"/></dir></dir><dir name="cart"><file name="notice.phtml" hash="9aec8ead0c46645945129af9a79544cb"/></dir></dir><dir name="core"><file name="issuer_select.phtml" hash="ec1879a7867e12f96aa5a6028bc3f507"/></dir></dir></dir></dir><dir name="layout"><file name="cmgroep_idin.xml" hash="11b8e31495b1d37a89c53cb6857014b9"/></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="cmgroep"><dir name="idin"><file name="registration_confirmation.html" hash="5ffbdcaf30709e14621ebf2cf4ae8008"/></dir></dir></dir></dir></dir><dir name="nl_NL"><file name="CMGroep_Idin.csv" hash="4509ccbe733c78b124af52d68b27f66b"/></dir></dir><dir name="etc"><dir name="modules"><file name="CMGroep_Idin.xml" hash="f10c4ba5e9bce4a09221b90d0f9e606f"/></dir></dir><dir name="code"><dir name="community"><dir name="CMGroep"><dir name="Idin"><dir name="controllers"><file name="AuthController.php" hash="d541af128997fcf4b682de1675f2fa55"/><file name="OnepageController.php" hash="ea4d7381ce164bd721cca6ce059df957"/><dir name="Adminhtml"><dir name="Idin"><file name="TransactionController.php" hash="a8e2faba9b232f85332c25274add196c"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="645231d7484e39fdbae89b13f23225ec"/><file name="config.xml" hash="84704ba78507481ef5e067e735709bdb"/><file name="system.xml" hash="1352cff2fa64db3896dea40a7c627cc8"/></dir><dir name="Model"><file name="Observer.php" hash="f8f06667d7b4e77486ba0390f4f834e7"/><file name="Transaction.php" hash="5c9375b1e7482f78317700aeac16c01f"/><dir name="Adminhtml"><file name="Observer.php" hash="b3da5100793892a16a3c4a3e60d638ba"/></dir><dir name="Resource"><file name="Setup.php" hash="276d1819d3bc664ae3d67d26658ef084"/><file name="Transaction.php" hash="2ea3cd2698767cc86315732ab42c2534"/><dir name="Transaction"><file name="Collection.php" hash="463a22f5b8d3221f0ad2cd54b72716d4"/></dir></dir><dir name="Entity"><file name="Setup.php" hash="3056d1d279d450725d73fce04c890b06"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Mode.php" hash="ed673837d8792b327daaeda252b02edb"/><file name="Showproductnotice.php" hash="f9705947e688936e1599a258957cdadc"/><file name="Verificationrequired.php" hash="18a405691db21ab0c4323924a57655ca"/></dir></dir></dir></dir><dir name="sql"><dir name="cmgroep_idin_entity_setup"><file name="install-0.1.0.php" hash="58251a353327b1dda98dc1c69e2bcfef"/></dir><dir name="cmgroep_idin_setup"><file name="install-0.1.0.php" hash="e48254828fc4aa2656e60abe2d50c56c"/></dir></dir><dir name="Helper"><file name="Api.php" hash="08a29ec4c17dd147a9f4a6e395e896fc"/><file name="Crypto.php" hash="51821fcc9eb8c42b8072d0537fa6f4ac"/><file name="Customer.php" hash="8d0cb332a15aa3cab5b0f6c7cc01e4e7"/><file name="Data.php" hash="5ca19da12a9a28cbf7a89955fe1febd1"/><dir name="Api"><file name="Transaction.php" hash="1a1310d797f8c31db26afe141d8aa7b0"/></dir></dir><dir name="Block"><file name="Abstract.php" hash="7f6be5702458870e130ee90b5e747552"/><dir name="Core"><dir name="Issuer"><file name="Select.php" hash="56e30ef10cd0da8f53e18d784c28b3b3"/></dir></dir><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Idin.php" hash="a314a5ade91e42c9c4117cda4d297e87"/></dir></dir></dir></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Idin.php" hash="88a262405e67b55b0f4b3e2dec93d172"/><dir name="View"><file name="Idin.php" hash="20964647ccb574102f03bacc662c0bd9"/></dir></dir></dir></dir><dir name="Idin"><file name="Transaction.php" hash="8ffa10563c2f35ec03c5af67207058d1"/><dir name="Transaction"><file name="Details.php" hash="47c359a0b08aa5f1a0a0ffac6927d747"/><file name="Grid.php" hash="4a238a8f9071c35280ca9dff50da7aea"/><dir name="Details"><file name="Form.php" hash="dd0f0f7950e1ade9fad29f356d010ff7"/><file name="Response.php" hash="a35025389aff2a1de649606590bc04ef"/></dir></dir></dir><dir name="System"><dir name="Config"><file name="Support.php" hash="bc1459094a4582e51183859ad842574c"/></dir></dir></dir><dir name="Customer"><dir name="Account"><file name="Info.php" hash="57eb2d233d0c4b2204076df05cf6ad9c"/><dir name="Registration"><file name="Finish.php" hash="c7ddbd1b0e916cea6522676586fcfe32"/></dir><dir name="Login"><file name="Idin.php" hash="015e0f8429bd7b3fc2ef37b87e3694fd"/></dir></dir></dir><dir name="Checkout"><file name="Onepage.php" hash="414978ff4f9d33e1967e4f132fddf407"/><dir name="Cart"><file name="Notice.php" hash="4d909172687921803dac09c079220b65"/></dir><dir name="Thirdparty"><file name="Abstract.php" hash="f77a8c7c5954f42c9cf4e0d608f90095"/><dir name="Onestepcheckout"><file name="Checkout.php" hash="cd2b15a86b992af65a0ecc10d0856d86"/><file name="Js.php" hash="6ed1efe1990cc645158780c05563e9e8"/></dir></dir><dir name="Onepage"><file name="Js.php" hash="cb966debaae365c1b582ab110e22d381"/><file name="Verification.php" hash="3edf36603ad4c83567fe966459d07d59"/></dir></dir><dir name="Catalog"><dir name="Product"><file name="Notice.php" hash="c156144b83d3109749bcb49987bbee77"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="lib"><dir name="CMGroep"><dir name="Idin"><file name="autoload.php" hash="9003e081bb2f11acf566bf2dace603d7"/><dir name="src"><file name="ApiClient.php" hash="82dbb4b6a996eba8ff61b93be44ffb87"/><file name="ApiException.php" hash="24ff380ed5dc9ebf0b5eaefc28e0854d"/><file name="Configuration.php" hash="7075e04b5930face5221b63a427e474e"/><file name="ObjectSerializer.php" hash="01097d791d3fa7f372e08a761cae95c2"/><dir name="Api"><file name="IdinApi.php" hash="a5078ebf9e370cf35773845ebdd89e02"/></dir><dir name="Models"><file name="BaseRequest.php" hash="8112f955e836b8bff650c0636262eb31"/><file name="DirectoryRequest.php" hash="3432bcddc39c82401941e3d966d47b8c"/><file name="DirectoryResponse.php" hash="1d35d33679d4eb46be42efc2f165b56b"/><file name="Error.php" hash="5060a1ba93c415cdeb57b7d29c65b3fa"/><file name="IdentityAddress.php" hash="13fe4897ff41e4048122a84912fea662"/><file name="IdentityAge.php" hash="f297f57a23e1166c077f3d59fcd93d35"/><file name="IdentityBase.php" hash="ae66cb63fa8052f474d50e090114e729"/><file name="Issuer.php" hash="b5f083bd00f107c4ff2354d2d66a88d9"/><file name="MerchantResponse.php" hash="88f06847d5aadaf49331cfa9fba4c2fc"/><file name="MerchantResponseBalance.php" hash="916060def80933f4b5500ad0019e0bb8"/><file name="MerchantResponseContact.php" hash="59bc55ad0acd1323038add83a356794d"/><file name="MerchantResponseServices.php" hash="5072c376d27e5d24fa2adfa3e40c90b6"/><file name="StatusRequest.php" hash="31b8feddbeb880fcda8c586291c0eee6"/><file name="StatusResponse.php" hash="9f5d6e0e543fb80d89ab2dd3caa69fb2"/><file name="TransactionRequest.php" hash="9c5f9e657bfe691ab6f8f9d95fb95a8f"/><file name="TransactionResponse.php" hash="fdb5b7f1601a8e2e41610231dd609473"/></dir></dir></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="cm"><dir name="idin"><dir name="images"><dir name="logos"><file name="CM.svg" hash="50fadde06c46165888ab4afb39e72401"/><file name="Epartment.svg" hash="808bbb7662cc2dcbb495214e1170fbcb"/><file name="iDIN.svg" hash="b833bb520ebd01412ed8ac4e4d72d1c3"/></dir></dir><dir name="css"><file name="support.css" hash="bf00104d432edbb6d91c88e8b53f353c"/></dir><dir name="src"><file name="support.less" hash="5a93febe99291dd36bd10ba62938145f"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="cm"><dir name="idin"><dir name="images"><file name="iDIN.svg" hash="b833bb520ebd01412ed8ac4e4d72d1c3"/></dir><dir name="css"><file name="styles.css" hash="906ce83234fdf16cd0fece58419f1cff"/></dir><dir name="js"><file name="age_verification.js" hash="06c47d126c366f6a903d468976737d05"/><file name="onestepcheckout_idin.js" hash="1429236664404e60fdd9e460309a9e83"/><file name="opcheckout_idin.js" hash="9011eac459ba7c5ec0a559c4ccdbfb7c"/></dir><dir name="src"><file name="styles.less" hash="6593b391dc89fae93a41a4a1542635b1"/></dir></dir></dir></dir></dir></dir></dir></target></contents></package>
skin/adminhtml/base/default/cm/idin/css/support.css ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * iDIN Colors
3
+ */
4
+ .customer-details-idin .idin-cell {
5
+ width: 70px;
6
+ max-width: 70px;
7
+ }
8
+ .customer-details-idin .idin-cell .logo-idin {
9
+ max-height: 50px;
10
+ }
11
+ .customer-details-idin .idin-details {
12
+ vertical-align: middle;
13
+ }
14
+ .cmgroep_idin_support .extension-version {
15
+ font-size: 11px;
16
+ float: left;
17
+ margin: 5px 0 -5px 0;
18
+ }
19
+ .cmgroep_idin_support .row {
20
+ margin-left: -15px;
21
+ margin-right: -15px;
22
+ }
23
+ .cmgroep_idin_support .row:after {
24
+ clear: both;
25
+ display: table;
26
+ content: " ";
27
+ }
28
+ .cmgroep_idin_support .row.contact-details {
29
+ padding: 25px 0;
30
+ background: #FFF;
31
+ border-top: 1px solid #CCC;
32
+ border-bottom: 1px solid #CCC;
33
+ }
34
+ .cmgroep_idin_support .row.contact-details h5 {
35
+ font-size: 16px;
36
+ font-weight: normal;
37
+ margin: 0 0 15px 0;
38
+ }
39
+ .cmgroep_idin_support .row.support-header {
40
+ margin-top: 10px;
41
+ margin-bottom: 20px;
42
+ }
43
+ .cmgroep_idin_support .row.support-header h1 {
44
+ margin-top: 0;
45
+ }
46
+ .cmgroep_idin_support .row .col {
47
+ position: relative;
48
+ float: left;
49
+ padding-left: 15px;
50
+ padding-right: 15px;
51
+ box-sizing: border-box;
52
+ }
53
+ .cmgroep_idin_support .row .col-10 {
54
+ position: relative;
55
+ float: left;
56
+ padding-left: 15px;
57
+ padding-right: 15px;
58
+ box-sizing: border-box;
59
+ width: 10%;
60
+ }
61
+ .cmgroep_idin_support .row .col-20 {
62
+ position: relative;
63
+ float: left;
64
+ padding-left: 15px;
65
+ padding-right: 15px;
66
+ box-sizing: border-box;
67
+ width: 20%;
68
+ }
69
+ .cmgroep_idin_support .row .col-25 {
70
+ position: relative;
71
+ float: left;
72
+ padding-left: 15px;
73
+ padding-right: 15px;
74
+ box-sizing: border-box;
75
+ width: 25%;
76
+ }
77
+ .cmgroep_idin_support .row .col-30 {
78
+ position: relative;
79
+ float: left;
80
+ padding-left: 15px;
81
+ padding-right: 15px;
82
+ box-sizing: border-box;
83
+ width: 30%;
84
+ }
85
+ .cmgroep_idin_support .row .col-33 {
86
+ position: relative;
87
+ float: left;
88
+ padding-left: 15px;
89
+ padding-right: 15px;
90
+ box-sizing: border-box;
91
+ width: 33.3%;
92
+ }
93
+ .cmgroep_idin_support .row .col-40 {
94
+ position: relative;
95
+ float: left;
96
+ padding-left: 15px;
97
+ padding-right: 15px;
98
+ box-sizing: border-box;
99
+ width: 40%;
100
+ }
101
+ .cmgroep_idin_support .row .col-50 {
102
+ position: relative;
103
+ float: left;
104
+ padding-left: 15px;
105
+ padding-right: 15px;
106
+ box-sizing: border-box;
107
+ width: 50%;
108
+ }
109
+ .cmgroep_idin_support .row .col-60 {
110
+ position: relative;
111
+ float: left;
112
+ padding-left: 15px;
113
+ padding-right: 15px;
114
+ box-sizing: border-box;
115
+ width: 60%;
116
+ }
117
+ .cmgroep_idin_support .row .col-70 {
118
+ position: relative;
119
+ float: left;
120
+ padding-left: 15px;
121
+ padding-right: 15px;
122
+ box-sizing: border-box;
123
+ width: 70%;
124
+ }
125
+ .cmgroep_idin_support .row .col-80 {
126
+ position: relative;
127
+ float: left;
128
+ padding-left: 15px;
129
+ padding-right: 15px;
130
+ box-sizing: border-box;
131
+ width: 80%;
132
+ }
133
+ .cmgroep_idin_support .row .col-90 {
134
+ position: relative;
135
+ float: left;
136
+ padding-left: 15px;
137
+ padding-right: 15px;
138
+ box-sizing: border-box;
139
+ width: 90%;
140
+ }
141
+ .cmgroep_idin_support .row .col-100 {
142
+ position: relative;
143
+ float: left;
144
+ padding-left: 15px;
145
+ padding-right: 15px;
146
+ box-sizing: border-box;
147
+ width: 100%;
148
+ }
149
+ .cmgroep_idin_support .logo-idin-wrapper {
150
+ position: relative;
151
+ }
152
+ .cmgroep_idin_support .logo-idin-wrapper .logo-idin {
153
+ position: absolute;
154
+ width: auto;
155
+ max-height: 80px;
156
+ top: -5px;
157
+ right: 30px;
158
+ margin: 0 0 0 50px;
159
+ }
160
+ .cmgroep_idin_support .logo-cm {
161
+ width: auto;
162
+ max-height: 35px;
163
+ margin: 15px 0;
164
+ }
165
+ .cmgroep_idin_support .logo-epartment {
166
+ width: auto;
167
+ max-height: 45px;
168
+ margin: 10px 0;
169
+ }
170
+ .unavailable-idin-service .entry-edit-head {
171
+ background: #9F9F9F;
172
+ }
173
+ .unavailable-idin-service fieldset.config {
174
+ position: relative;
175
+ opacity: 0.5;
176
+ }
177
+ .unavailable-idin-service fieldset.config:after {
178
+ display: block;
179
+ content: '';
180
+ position: absolute;
181
+ top: -1px;
182
+ left: -1px;
183
+ right: -1px;
184
+ bottom: -1px;
185
+ background: rgba(0, 0, 0, 0.2);
186
+ cursor: not-allowed;
187
+ border-left: 1px solid #9F9F9F;
188
+ border-right: 1px solid #9F9F9F;
189
+ border-bottom: 1px solid #9F9F9F;
190
+ }
skin/adminhtml/base/default/cm/idin/images/logos/CM.svg ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 465.6875 181.425"
9
+ height="181.425"
10
+ width="465.6875"
11
+ xml:space="preserve"
12
+ version="1.1"
13
+ id="svg2"><metadata
14
+ id="metadata8"><rdf:RDF><cc:Work
15
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
16
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
17
+ id="defs6" /><g
18
+ transform="matrix(1.25,0,0,-1.25,0,181.425)"
19
+ id="g10"><g
20
+ transform="scale(0.1,0.1)"
21
+ id="g12"><path
22
+ id="path14"
23
+ style="fill:#19b5ec;fill-opacity:1;fill-rule:nonzero;stroke:none"
24
+ d="m 3422.64,306.281 0,-302.83178 302.83,0.01172 0,302.82806 -302.83,-0.008" /><path
25
+ id="path16"
26
+ style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
27
+ d="M 0,464.164 C 0,211.789 205.566,0 467.168,0 l 31.191,0 0,280.461 -22.004,0 c -90.125,0 -164.851,71.367 -164.851,158.769 l 0,117.512 L 0,495.512 0,464.164" /><path
28
+ id="path18"
29
+ style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
30
+ d="m 803.398,445.418 c 0,-133.777 -59.238,-164.957 -165,-164.957 l -28.039,0 0,-280.461 37.414,0 c 261.536,0 466.967,193.102 466.967,445.418 l 0,9.379 -311.342,0 0,-9.379" /><path
31
+ id="path20"
32
+ style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
33
+ d="m 1326.83,3.46875 311.28,0 0,814.01525 -311.28,-61.171 0,-752.84425" /><path
34
+ id="path22"
35
+ style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
36
+ d="m 2116.38,3.46875 311.36,0 0,969.23025 -311.36,-61.172 0,-908.05825" /><path
37
+ id="path24"
38
+ style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
39
+ d="m 2870.63,1059.74 c 5.54,-16.01 8.59,-32.97 8.59,-50.43 l 0,-1005.84125 311.56,0 0,1005.84125 c 0,38.48 -4.2,75.62 -12.07,110.98 l -308.08,-60.55" /><path
40
+ id="path26"
41
+ style="fill:#393536;fill-opacity:1;fill-rule:nonzero;stroke:none"
42
+ d="m 476.355,1171.02 22.004,0 0,280.11 -40.586,0 C 196.223,1451.13 0,1239.41 0,984.133 l 0,-488.621 311.504,61.23 0,452.388 c 0,90.12 74.726,161.89 164.851,161.89" /><path
43
+ id="path28"
44
+ style="fill:#393536;fill-opacity:1;fill-rule:nonzero;stroke:none"
45
+ d="m 638.398,1451.13 -28.039,0 0,-280.11 28.039,0 c 90.352,0 161.915,-56.15 161.915,-146.24 l 0,-9.44 314.427,0 0,9.44 c 0,248.85 -199.369,426.35 -476.342,426.35" /><path
46
+ id="path30"
47
+ style="fill:#393536;fill-opacity:1;fill-rule:nonzero;stroke:none"
48
+ d="m 1326.83,1451.37 0,-695.057 311.28,61.171 0,633.886 -311.28,0" /><path
49
+ id="path32"
50
+ style="fill:#393536;fill-opacity:1;fill-rule:nonzero;stroke:none"
51
+ d="m 3059.83,1336.26 c -80.9,77.64 -174.36,115.08 -298.83,115.08 l -199.29,0 c -112.17,0 -196.2,-37.44 -283.41,-115.08 -80.94,77.64 -140,115.08 -267.81,115.08 l -267.66,0 0,-280.45 214.84,0 c 90.27,0 158.71,-71.41 158.71,-155.36 l 0,-104.003 311.36,61.172 0,42.831 c 0,83.95 74.8,155.36 164.99,155.36 l 121.49,0 c 72.13,0 134.32,-47.66 156.41,-111.15 l 308.08,60.55 c -18.85,84.68 -59.54,158.98 -118.88,215.97" /></g></g></svg>
skin/adminhtml/base/default/cm/idin/images/logos/Epartment.svg ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 653.98749 142.22501"
9
+ height="142.22501"
10
+ width="653.98749"
11
+ xml:space="preserve"
12
+ version="1.1"
13
+ id="svg2"><metadata
14
+ id="metadata8"><rdf:RDF><cc:Work
15
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
16
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
17
+ id="defs6" /><g
18
+ transform="matrix(1.25,0,0,-1.25,0,142.225)"
19
+ id="g10"><g
20
+ transform="scale(0.1,0.1)"
21
+ id="g12"><path
22
+ id="path14"
23
+ style="fill:#f57914;fill-opacity:1;fill-rule:evenodd;stroke:none"
24
+ d="m 4728.78,506.824 c 4.49,0.781 6.81,1.387 9.15,1.551 41.99,3 84,5.684 125.95,9.219 5.58,0.48 13.44,3.996 15.45,8.32 1.98,4.328 -0.29,12.988 -3.81,17.082 -34.48,40.094 -69.46,79.774 -104.62,119.297 -42.36,47.605 -85.21,94.809 -127.56,142.426 -54.85,61.664 -109.32,123.691 -164.48,185.082 -3.65,4.078 -12.54,6.597 -17.71,5.176 -4.03,-1.106 -8.48,-9.454 -8.54,-14.629 -0.25,-20.84 1.11,-41.692 1.94,-62.539 2.39,-59.317 4.84,-118.633 7.25,-177.95 2.4,-58.91 5,-117.816 7.16,-176.738 2.22,-60.926 3.81,-121.875 6.35,-182.781 0.27,-6.406 3.6,-16.055 8.15,-18.027 5.32,-2.297 15.11,0.175 20.29,4.109 27.05,20.683 53.24,42.539 79.81,63.879 11.08,8.906 22.4,17.519 35.13,27.449 7.96,-18.309 15.27,-34.715 22.25,-51.277 23.81,-56.602 47.43,-113.301 71.27,-169.895 5.58,-13.25 12.79,-16.406 25.72,-10.762 25.02,10.911 49.99,21.954 74.57,33.801 16.62,8.008 18.13,13.836 10.71,30.77 -26.76,61.027 -53.62,122.004 -80.36,183.039 -4.63,10.554 -8.96,21.25 -14.07,33.398 z m 435.61,630.986 c 2.07,-1.03 4.06,-2.61 6.24,-3.01 35.8,-6.49 57.58,-32.38 57.76,-68.87 0.05,-12.05 0.01,-24.11 0.01,-36.16 0,-290.856 0.02,-581.715 0,-872.575 0,-45.234 -28.55,-74.1247 -73.43,-74.1364 -302.11,-0.0273 -604.22,-0.0273 -906.34,-0.0078 -34.63,0.0078 -61.35,18.0002 -69.71,48.2112 -2.62,9.457 -2.69,19.84 -2.71,29.789 -0.15,140.207 -0.09,280.41 -0.09,420.621 0,160.293 -0.05,320.586 0.03,480.878 0.01,36.72 16.5,61.37 46.7,70.41 6.03,1.81 12.17,3.25 18.26,4.85 307.77,0 615.52,0 923.28,0" /><path
25
+ id="path16"
26
+ style="fill:#2e2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none"
27
+ d="m 3830.63,727.34 c 0,-17.485 0.42,-29.871 1.3,-37.156 0.87,-7.297 4.07,-13.547 9.61,-18.793 5.54,-5.25 14.13,-7.868 25.79,-7.868 l 66.45,1.743 5.24,-93.551 c -39.05,-8.738 -68.78,-13.113 -89.17,-13.113 -52.45,0 -88.29,11.804 -107.52,35.41 -19.23,23.609 -28.84,67.172 -28.84,130.703 l 0,181.855 -51.59,0 0,99.66 51.59,0 0,121.53 117.14,0 0,-121.53 107.51,0 0,-99.66 -107.51,0 0,-179.23 z m -355.8,-158.242 0,233.429 c 0,37.293 -4.37,64.84 -13.11,82.621 -8.74,17.774 -26.22,26.665 -52.45,26.665 -23.9,0 -46.92,-4.083 -69.06,-12.239 l -10.49,-3.496 0,-326.98 -117.14,0 0,437.132 116.27,0 0,-24.476 c 39.62,23.306 76.04,34.976 109.27,34.976 58.27,0 98.48,-17.195 120.63,-51.585 22.15,-34.399 33.22,-87.434 33.22,-159.122 l 0,-236.925 -117.14,0 0,0 z m -478.16,330.914 c -11.08,13.687 -30.47,20.543 -58.14,20.543 -27.69,0 -47.21,-7.145 -58.57,-21.418 -11.37,-14.285 -17.35,-38.328 -17.92,-72.129 l 151.23,0 c 0,34.972 -5.55,59.308 -16.6,73.004 l 0,0 z m 123.25,-162.184 -257.01,0 c 0.57,-26.808 7.72,-46.195 21.42,-58.137 13.69,-11.949 33.36,-17.921 59.01,-17.921 54.19,0 102.56,1.753 145.11,5.25 l 24.48,2.617 1.75,-86.555 c -67.03,-16.309 -127.63,-24.48 -181.84,-24.48 -65.87,0 -113.64,17.488 -143.36,52.461 -29.71,34.976 -44.59,91.796 -44.59,170.488 0,156.777 64.4,235.179 193.21,235.179 127.04,0 190.56,-65.875 190.56,-197.593 l -8.74,-81.309 0,0 z m -574.33,-168.73 0,233.429 c 0,37.293 -4.08,64.84 -12.24,82.621 -8.16,17.774 -24.48,26.665 -48.96,26.665 -18.65,0 -41.38,-4.083 -68.18,-12.239 l -13.1,-4.371 c 2.31,-43.711 3.49,-76.937 3.49,-99.664 l 0,-226.441 -117.14,0 0,224.687 c 0,43.129 -3.8,73.582 -11.36,91.363 -7.59,17.774 -24.19,26.665 -49.84,26.665 -22.72,0 -45.17,-4.083 -67.31,-12.239 l -10.49,-3.496 0,-326.98 -117.14,0 0,437.132 116.27,0 0,-24.476 c 40.21,23.306 74.59,34.976 103.15,34.976 47.21,0 83.63,-13.7 109.28,-41.089 53.61,27.389 102.56,41.089 146.85,41.089 57.7,0 97.76,-16.761 120.2,-50.273 22.43,-33.523 33.66,-86.992 33.66,-160.434 l 0,-236.925 -117.14,0 0,0 z M 1849.75,727.34 c 0,-17.485 0.43,-29.871 1.3,-37.156 0.88,-7.297 4.07,-13.547 9.62,-18.793 5.54,-5.25 14.12,-7.868 25.79,-7.868 l 66.44,1.743 5.24,-93.551 c -39.05,-8.738 -68.77,-13.113 -89.16,-13.113 -52.46,0 -88.3,11.804 -107.52,35.41 -19.24,23.609 -28.86,67.172 -28.86,130.703 l 0,181.855 -51.57,0 0,99.66 51.57,0 0,121.53 117.15,0 0,-121.53 107.52,0 0,-99.66 -107.52,0 0,-179.23 z m -325.2,140.762 -17.48,-6.122 0,-292.882 -117.14,0 0,437.132 116.27,0 0,-46.332 c 48.95,29.141 95.57,48.082 139.86,56.832 l 0,-118.027 c -47.2,-9.922 -87.72,-20.113 -121.51,-30.601 l 0,0 z m -363.64,-106.661 -79.56,-7 c -32.64,-2.925 -48.95,-20.402 -48.95,-52.453 0,-32.058 14.28,-48.086 42.84,-48.086 22.14,0 46.33,3.496 72.55,10.489 l 13.12,3.504 0,93.546 z m 142.48,-202.839 c -29.72,0 -53.46,2.05 -71.24,6.132 -17.78,4.082 -35.7,12.231 -53.76,24.473 -41.96,-20.391 -84.8,-30.605 -128.51,-30.605 -90.337,0 -135.493,47.781 -135.493,143.386 0,46.617 12.527,79.7 37.593,99.231 25.051,19.519 63.51,31.035 115.39,34.531 l 93.54,7 0,27.098 c 0,18.066 -4.09,30.449 -12.24,37.156 -8.17,6.695 -21.29,10.055 -39.34,10.055 l -164.35,-6.993 -3.496,81.309 c 62.356,16.895 121.646,25.355 177.896,25.355 56.24,0 96.74,-11.67 121.51,-34.976 24.77,-23.32 37.15,-60.617 37.15,-111.906 l 0,-181.848 c 1.17,-13.988 3.5,-23.754 7,-29.293 3.5,-5.543 10.78,-9.48 21.85,-11.805 l -3.5,-88.3 0,0 z M 660.879,911.813 c -21.566,0 -43.418,-4.375 -65.563,-13.11 l -10.488,-4.371 0,-229.066 c 26.223,-3.496 47.492,-5.25 63.817,-5.25 33.789,0 56.957,9.914 69.492,29.726 12.527,19.813 18.797,53.625 18.797,101.422 0,80.434 -25.352,120.649 -76.055,120.649 l 0,0 z M 809.492,608 c -30.898,-32.93 -81.601,-49.398 -152.105,-49.398 -19.235,0 -39.926,1.757 -62.071,5.253 l -10.488,1.747 0,-180.106 -117.14,0 0,620.734 116.261,0 0,-23.597 c 37.883,22.737 71.102,34.097 99.656,34.097 58.856,0 102.286,-17.64 130.258,-52.894 27.973,-35.27 41.965,-95.16 41.965,-179.668 0,-84.516 -15.453,-143.242 -46.336,-176.168 l 0,0 z M 251.773,900.012 c -11.082,13.687 -30.464,20.543 -58.136,20.543 -27.692,0 -47.211,-7.145 -58.574,-21.418 -11.364,-14.285 -17.348,-38.328 -17.918,-72.129 l 151.23,0 c 0,34.972 -5.543,59.308 -16.602,73.004 l 0,0 z m 123.254,-162.184 -257.007,0 c 0.57,-26.808 7.71,-46.195 21.414,-58.137 13.687,-11.949 33.359,-17.921 59.007,-17.921 54.2,0 102.571,1.753 145.118,5.25 l 24.476,2.617 1.746,-86.555 c -67.023,-16.309 -127.629,-24.48 -181.82,-24.48 -65.875,0 -113.6485,17.488 -143.3751,52.461 C 14.8672,646.039 0,702.859 0,781.551 c 0,156.777 64.3945,235.179 193.199,235.179 127.039,0 190.571,-65.875 190.571,-197.593 l -8.743,-81.309 0,0" /><path
28
+ id="path18"
29
+ style="fill:#2e2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none"
30
+ d="m 3827.82,290.496 c -36.14,0 -54.22,-13.488 -54.22,-40.461 0,-12.683 3.78,-21.648 11.34,-26.902 7.55,-5.254 24.27,-9.914 50.16,-13.965 25.9,-4.043 43.95,-9.434 54.21,-16.184 10.25,-6.746 15.38,-20.293 15.38,-40.652 0,-20.371 -6.48,-35.191 -19.43,-44.512 -12.95,-9.3005 -32.1,-13.9489 -57.44,-13.9489 -13.75,0 -32.1,1.6094 -55.02,4.8477 l -11.74,1.6212 1.63,13.351 c 29.13,-4.589 52.32,-6.882 69.58,-6.882 17.26,0 31.15,3.371 41.67,10.113 10.52,6.75 15.78,18.207 15.78,34.394 0,16.18 -4.12,26.836 -12.35,31.961 -8.23,5.129 -25.08,9.641 -50.56,13.555 -25.49,3.906 -43.23,9.172 -53.21,15.781 -9.97,6.602 -14.96,17.727 -14.96,33.371 0,15.645 3.65,27.715 10.93,36.211 7.28,8.504 15.77,14.16 25.48,16.993 9.72,2.832 19.83,4.257 30.34,4.257 21.86,0 42.34,-1.484 61.49,-4.453 l 10.52,-1.621 -0.81,-13.351 c -27.51,4.308 -50.43,6.476 -68.77,6.476 l 0,0 z M 3664.18,120.371 c 4.45,-9.312 14.63,-13.961 30.55,-13.961 l 39.65,3.25 1.21,-12.9608 c -17.81,-2.1601 -31.43,-3.2383 -40.86,-3.2383 -19.15,0 -32.5,4.918 -40.05,14.7691 -7.55,9.84 -11.34,28.93 -11.34,57.247 l 0,121.386 -31.95,0 0,12.938 31.95,0 0,65.949 14.16,0 0,-65.949 73.63,0 0,-12.938 -73.63,0 0,-106.015 c 0,-31.016 2.24,-51.168 6.68,-60.477 l 0,0 z m -108.81,156.774 c -13.35,-5.665 -23.67,-10.79 -30.96,-15.379 l -11.32,-6.875 0,-157.3793 -14.16,0 0,202.2893 14.16,0 0,-31.551 c 8.09,6.465 20.15,13.418 36.21,20.828 16.03,7.414 30.67,12.344 43.89,14.766 l 0,-14.559 c -11.87,-2.422 -24.47,-6.465 -37.82,-12.14 l 0,0 z m -139.17,-6.063 c -9.85,12.938 -25.56,19.414 -47.13,19.414 -44.5,0 -66.75,-28.183 -66.75,-84.562 l 128.65,0 c 0,30.48 -4.93,52.199 -14.77,65.148 l 0,0 z m -113.88,-78.098 c 0,-29.129 4.57,-50.769 13.75,-64.933 9.16,-14.16 24.41,-21.242 45.72,-21.242 21.31,0 42.47,0.953 63.51,2.851 l 12.14,0.801 0.81,-12.9493 c -30.21,-2.4336 -55.15,-3.6406 -74.84,-3.6406 -28.6,0.2578 -48.42,8.9569 -59.47,26.0899 -11.06,17.117 -16.6,43.355 -16.6,78.699 0,69.844 27.25,104.785 81.73,104.785 25.62,0 44.84,-7.687 57.65,-23.066 12.8,-15.371 19.21,-40.059 19.21,-74.043 l 0,-13.352 -143.61,0 0,0 z m -90.42,76.887 c -9.04,13.75 -22.58,20.625 -40.65,20.625 -10.25,0 -21.24,-1.816 -32.97,-5.461 -11.74,-3.64 -20.84,-7.215 -27.31,-10.722 l -9.71,-5.262 0,-156.571 c 20.76,-3.781 38.56,-5.671 53.4,-5.671 25.9,0 44.16,7.222 54.81,21.64 10.66,14.438 15.99,38.18 15.99,71.215 0,33.039 -4.52,56.438 -13.56,70.207 l 0,0 z m 8.91,-150.519 c -13.09,-16.993 -35.13,-25.4809 -66.15,-25.4809 -18.34,0 -36.14,1.8906 -53.4,5.668 l 0,-95.09769 -14.16,0 0,295.35959 14.16,0 0,-16.981 c 7.82,5.106 18.74,9.832 32.77,14.149 14.02,4.308 26.43,6.476 37.22,6.476 24.28,0 41.88,-8.234 52.79,-24.687 10.92,-16.445 16.38,-42.883 16.38,-79.297 0,-36.406 -6.53,-63.109 -19.61,-80.109 l 0,0 z m -245.77,79.308 68.38,-101.1483 -16.59,0 -60.28,90.2303 -60.28,-90.2303 -16.59,0 68.37,101.1483 -68.37,101.141 16.59,0 60.28,-90.223 60.69,90.223 16.58,0 -68.78,-101.141 0,0 z m -147.45,72.422 c -9.86,12.938 -25.56,19.414 -47.14,19.414 -44.49,0 -66.74,-28.183 -66.74,-84.562 l 128.64,0 c 0,30.48 -4.92,52.199 -14.76,65.148 l 0,0 z m -113.88,-78.098 c 0,-29.129 4.58,-50.769 13.75,-64.933 9.17,-14.16 24.41,-21.242 45.71,-21.242 21.3,0 42.48,0.953 63.52,2.851 l 12.14,0.801 0.81,-12.9493 c -30.21,-2.4336 -55.17,-3.6406 -74.85,-3.6406 -28.59,0.2578 -48.41,8.9569 -59.46,26.0899 -11.06,17.117 -16.59,43.355 -16.59,78.699 0,69.844 27.24,104.785 81.71,104.785 25.63,0 44.84,-7.687 57.66,-23.066 12.81,-15.371 19.21,-40.059 19.21,-74.043 l 0,-13.352 -143.61,0 0,0 z m -175.98,-95.4723 0,295.3473 14.17,0 0,-295.3473 -14.17,0 0,0 z m -85.15,173.5703 c -9.84,12.938 -25.55,19.414 -47.13,19.414 -44.49,0 -66.75,-28.183 -66.75,-84.562 l 128.65,0 c 0,30.48 -4.92,52.199 -14.77,65.148 l 0,0 z M 2338.7,192.984 c 0,-29.129 4.59,-50.769 13.76,-64.933 9.17,-14.16 24.41,-21.242 45.71,-21.242 21.3,0 42.48,0.953 63.51,2.851 l 12.14,0.801 0.81,-12.9493 c -30.2,-2.4336 -55.16,-3.6406 -74.84,-3.6406 -28.59,0.2578 -48.41,8.9569 -59.47,26.0899 -11.06,17.117 -16.58,43.355 -16.58,78.699 0,69.844 27.23,104.785 81.71,104.785 25.63,0 44.84,-7.687 57.65,-23.066 12.81,-15.371 19.22,-40.059 19.22,-74.043 l 0,-13.352 -143.62,0 0,0 z m -47.73,-95.4723 -16.99,0 -72.82,103.9803 -38.83,0 0,-103.9803 -14.17,0 0,295.3473 14.17,0 0,-178.429 38.83,0 69.58,85.371 16.99,0 -74.43,-91.434 77.67,-110.8553 0,0 z m -218.85,0 0,104.3793 c 0,35.597 -3.24,59.269 -9.71,71.007 -6.47,11.739 -20.64,17.598 -42.48,17.598 -10.79,0 -22.05,-1.691 -33.78,-5.058 -11.73,-3.372 -20.84,-6.68 -27.31,-9.915 l -9.71,-5.253 0,-172.7583 -14.16,0 0,202.2893 14.16,0 0,-16.18 c 24,13.211 48.55,19.824 73.63,19.824 25.08,0 41.93,-6.816 50.57,-20.429 8.63,-13.633 12.94,-40.403 12.94,-80.313 l 0,-105.1913 -14.15,0 0,0 z M 1856.9,380.73 l 14.15,0 0,-22.265 -14.15,0 0,22.265 z m 0,-283.2183 0,202.2893 14.15,0 0,-202.2893 -14.15,0 0,0 z m -101.14,0 -27.51,0 -56.23,181.2463 -56.23,-181.2463 -27.51,0 -54.62,202.2893 14.98,0 51.37,-189.34 4.46,0 59.87,185.297 15.37,0 59.87,-185.297 4.45,0 51.38,189.34 14.97,0 -54.62,-202.2893 0,0 z M 1469.35,270.066 c -7.28,13.614 -21.59,20.43 -42.89,20.43 -10.79,0 -21.98,-1.359 -33.57,-4.043 -11.6,-2.707 -20.5,-5.402 -26.7,-8.098 l -9.31,-4.042 0,-165.063 c 21.04,-1.629 38.1,-2.441 51.18,-2.441 13.07,0 24.81,1.75 35.19,5.261 10.39,3.5 18.28,9.571 23.67,18.211 5.39,8.621 8.96,18.262 10.72,28.926 1.75,10.652 2.63,24.883 2.63,42.684 0,31.828 -3.64,54.55 -10.92,68.175 l 0,0 z m 6.87,-151.937 c -12.68,-16.18 -37.08,-24.2579 -73.22,-24.2579 -18.88,0 -36,0.9375 -51.38,2.8281 l -8.9,0.8125 0,295.3473 14.16,0 0,-105.605 c 22.38,10.789 46.18,16.191 71.4,16.191 25.22,0 42.69,-7.824 52.4,-23.468 9.7,-15.653 14.56,-42.489 14.56,-80.516 0,-38.027 -6.35,-65.141 -19.02,-81.332 l 0,0 z M 1260.4,271.082 c -9.85,12.938 -25.56,19.414 -47.13,19.414 -44.51,0 -66.76,-28.183 -66.76,-84.562 l 128.65,0 c 0,30.48 -4.92,52.199 -14.76,65.148 l 0,0 z m -113.89,-78.098 c 0,-29.129 4.59,-50.769 13.77,-64.933 9.16,-14.16 24.4,-21.242 45.71,-21.242 21.3,0 42.47,0.953 63.51,2.851 l 12.14,0.801 0.81,-12.9493 c -30.21,-2.4336 -55.16,-3.6406 -74.84,-3.6406 -28.6,0.2578 -48.42,8.9569 -59.48,26.0899 -11.06,17.117 -16.58,43.355 -16.58,78.699 0,69.844 27.24,104.785 81.72,104.785 25.62,0 44.84,-7.687 57.65,-23.066 12.8,-15.371 19.21,-40.059 19.21,-74.043 l 0,-13.352 -143.62,0 0,0 z m -107.6,-95.4723 -27.51,0 -56.228,181.2463 -56.231,-181.2463 -27.515,0 -54.61,202.2893 14.961,0 51.383,-189.34 4.445,0 59.875,185.297 15.375,0 59.865,-185.297 4.46,0 51.37,189.34 14.98,0 -54.62,-202.2893 0,0" /></g></g></svg>
skin/adminhtml/base/default/cm/idin/images/logos/iDIN.svg ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="267px" height="231px" viewBox="0 0 267 231" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
4
+ <title>iDIN_logo</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Desktop" transform="translate(-369.000000, -396.000000)">
9
+ <g id="iDIN_logo" transform="translate(369.000000, 396.000000)">
10
+ <g id="Group" fill="#FFFFFF">
11
+ <polygon id="Path-2" points="6.14088905 7.51680358 6.07616701 224.669249 155.772088 224.487491 209.708664 211.656553 236.458901 188.165002 261.665054 146.275765 262.649754 98.685773 249.4819 61.2465459 216.225558 22.7260082 173.666191 10.6344287 84.2080005 6.9684466"></polygon>
12
+ <path d="M10.8527647,10.841301 L10.8527647,219.676515 L137.78434,219.676515 C214.435777,219.676515 256.129286,183.987015 256.129286,114.993146 C256.129286,44.0884806 210.932244,10.8401796 137.78434,10.8401796 L10.8527647,10.8401796 L10.8527647,10.841301 Z M137.78434,0.00224271845 C250.190218,0.00224271845 266.973076,72.0540583 266.973076,114.994267 C266.973076,189.49401 221.09395,230.520058 137.78434,230.520058 L0.00673109244,230.520058 L0.00673109244,0.00224271845 L137.78434,0.00224271845 Z" id="Shape"></path>
13
+ </g>
14
+ <path d="M93.759,86.396 L93.759,107.334 L100.183,107.334 C104.64,107.334 108.753,106.048 108.753,96.706 C108.753,87.563 104.177,86.396 100.183,86.396 L93.759,86.396 Z M226.802,107.333 C222.577,50.43 177.809,38.138 137.136,38.138 L93.769,38.138 L93.769,75.994 L100.184,75.994 C111.889,75.994 119.165,83.935 119.165,96.705 C119.165,109.868 112.066,117.733 100.184,117.733 L93.769,117.733 L93.769,193.483 L137.137,193.483 C203.27,193.483 226.286,162.775 227.098,117.733 L226.802,107.333 Z" id="Shape" fill="#00B0F0"></path>
15
+ <rect id="Rectangle-path" fill="#FFFFFF" x="128.717" y="76.006" width="12.428" height="41.793"></rect>
16
+ <polygon id="Shape" fill="#FFFFFF" points="179.517 117.798 191.339 117.798 191.339 76.005 179.693 76.005 179.693 100.372 163.11 76.005 151.406 76.005 151.406 117.798 163.022 117.798 163.022 93.613"></polygon>
17
+ <path d="M24.674,22.668 L24.674,208.902 L137.819,208.902 C206.145,208.902 243.31,177.075 243.31,115.548 C243.31,52.317 203.022,22.667 137.819,22.667 L24.674,22.667 L24.674,22.668 Z M137.819,13.002 C238.016,13.002 252.976,77.256 252.976,115.549 C252.976,181.986 212.08,218.572 137.819,218.572 L15.006,218.572 L15.006,13.002 L137.819,13.002 Z" id="Shape" fill="#000000"></path>
18
+ <rect id="Rectangle-path" fill="#000000" x="39.853" y="129.245" width="36.219" height="64.478"></rect>
19
+ <path d="M80.47,96.765 C80.47,109.199 70.395,119.279 57.959,119.279 C45.532,119.279 35.447,109.199 35.447,96.765 C35.447,84.338 45.532,74.254 57.959,74.254 C70.396,74.254 80.47,84.338 80.47,96.765" id="Shape" fill="#000000"></path>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </svg>
skin/adminhtml/base/default/cm/idin/src/support.less ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * iDIN Colors
3
+ */
4
+ @idin-main-blue: #00b0f0;
5
+ @idin-main-black: #000000;
6
+ @idin-support-light-blue: #d3e9ea;
7
+ @idin-support-dark-blue: #1d5393;
8
+ @idin-support-coral: #ff4355;
9
+
10
+ .customer-details-idin {
11
+ .idin-cell {
12
+ width: 70px;
13
+ max-width: 70px;
14
+
15
+ .logo-idin {
16
+ max-height: 50px;
17
+ }
18
+ }
19
+
20
+ .idin-details {
21
+ vertical-align: middle;
22
+ }
23
+ }
24
+
25
+ .cmgroep_idin_support {
26
+
27
+ .extension-version {
28
+ font-size: 11px;
29
+ float: left;
30
+ margin: 5px 0 -5px 0;
31
+ }
32
+
33
+ .row {
34
+ margin-left: -15px;
35
+ margin-right: -15px;
36
+
37
+ &:after {
38
+ clear: both;
39
+ display: table;
40
+ content: " ";
41
+ }
42
+
43
+ &.contact-details {
44
+ padding: 25px 0;
45
+ background: #FFF;
46
+ border-top: 1px solid #CCC;
47
+ border-bottom: 1px solid #CCC;
48
+
49
+ h5 {
50
+ font-size: 16px;
51
+ font-weight: normal;
52
+ margin: 0 0 15px 0;
53
+ }
54
+ }
55
+
56
+ &.support-header {
57
+ margin-top: 10px;
58
+ margin-bottom: 20px;
59
+
60
+ h1 {
61
+ margin-top: 0;
62
+ }
63
+ }
64
+
65
+ .col {
66
+ position: relative;
67
+ float: left;
68
+ padding-left: 15px;
69
+ padding-right: 15px;
70
+ box-sizing: border-box;
71
+ }
72
+
73
+ .col-10 {
74
+ .col;
75
+
76
+ width: 10%;
77
+ }
78
+
79
+ .col-20 {
80
+ .col;
81
+
82
+ width: 20%;
83
+ }
84
+
85
+ .col-25 {
86
+ .col;
87
+
88
+ width: 25%;
89
+ }
90
+
91
+ .col-30 {
92
+ .col;
93
+
94
+ width: 30%;
95
+ }
96
+
97
+ .col-33 {
98
+ .col;
99
+
100
+ width: 33.3%;
101
+ }
102
+
103
+ .col-40 {
104
+ .col;
105
+
106
+ width: 40%;
107
+ }
108
+
109
+ .col-50 {
110
+ .col;
111
+
112
+ width: 50%;
113
+ }
114
+
115
+ .col-60 {
116
+ .col;
117
+
118
+ width: 60%;
119
+ }
120
+
121
+ .col-70 {
122
+ .col;
123
+
124
+ width: 70%;
125
+ }
126
+
127
+ .col-80 {
128
+ .col;
129
+
130
+ width: 80%;
131
+ }
132
+
133
+ .col-90 {
134
+ .col;
135
+
136
+ width: 90%;
137
+ }
138
+
139
+ .col-100 {
140
+ .col;
141
+
142
+ width: 100%;
143
+ }
144
+ }
145
+
146
+ .logo-idin-wrapper {
147
+ position: relative;
148
+
149
+ .logo-idin {
150
+ position: absolute;
151
+ width: auto;
152
+ max-height: 80px;
153
+
154
+ top: -5px;
155
+ right: 30px;
156
+
157
+ margin: 0 0 0 50px;
158
+ }
159
+ }
160
+
161
+ .logo-cm {
162
+ width: auto;
163
+ max-height: 35px;
164
+
165
+ margin: 15px 0;
166
+ }
167
+
168
+ .logo-epartment {
169
+ width: auto;
170
+ max-height: 45px;
171
+
172
+ margin: 10px 0;
173
+ }
174
+ }
175
+
176
+ .entry-edit {
177
+ .entry-edit-head {
178
+ //background: @idin-main-blue;
179
+ }
180
+ }
181
+
182
+ .unavailable-idin-service {
183
+ .entry-edit-head {
184
+ background: #9F9F9F;
185
+ }
186
+
187
+ fieldset.config {
188
+ position: relative;
189
+ opacity: 0.5;
190
+
191
+ &:after {
192
+ display: block;
193
+ content: '';
194
+ position: absolute;
195
+ top: -1px;
196
+ left: -1px;
197
+ right: -1px;
198
+ bottom: -1px;
199
+ background: rgba(0, 0, 0, .2);
200
+ cursor: not-allowed;
201
+ border-left: 1px solid #9F9F9F;
202
+ border-right: 1px solid #9F9F9F;
203
+ border-bottom: 1px solid #9F9F9F;
204
+ }
205
+ }
206
+ }
207
+
208
+ .available-idin-service {
209
+ .entry-edit-head {
210
+ //background: @idin-main-blue;
211
+ }
212
+ }
skin/frontend/base/default/cm/idin/css/styles.css ADDED
@@ -0,0 +1,517 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2016 CM Groep
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * @category CMGroep
25
+ * @package Idin
26
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
27
+ * @copyright 2016-2017 CM Groep
28
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
29
+ */
30
+ /*
31
+ * iDIN Colors
32
+ */
33
+ /*
34
+ * Breakpoints
35
+ */
36
+ /*
37
+ * Basic Form Components
38
+ */
39
+ .cmgroep__idin__select {
40
+ width: 100%;
41
+ background: #FFF;
42
+ padding: 0 8px;
43
+ height: 30px;
44
+ }
45
+ .cmgroep__idin__input {
46
+ float: none;
47
+ width: 100%;
48
+ background: #FFF;
49
+ padding: 0 8px;
50
+ height: 30px;
51
+ border: 1px solid #A6A6A6;
52
+ border-radius: 2px;
53
+ }
54
+ .button.danger {
55
+ background: white;
56
+ color: #00b0f0;
57
+ }
58
+ .button.danger:hover,
59
+ .button.danger:focus,
60
+ .button.danger:active {
61
+ background: white;
62
+ color: #00b0f0;
63
+ }
64
+ /*
65
+ * Account Login and Registration
66
+ */
67
+ .account-login.idin .idin-login-panel,
68
+ .finish-registration.idin .idin-login-panel {
69
+ color: #000000;
70
+ padding: 25px 25px 25px 30px;
71
+ background: #d3e9ea;
72
+ margin: 0 0 30px 0;
73
+ }
74
+ .account-login.idin .idin-login-panel .info,
75
+ .finish-registration.idin .idin-login-panel .info {
76
+ min-height: 105px;
77
+ float: left;
78
+ width: 40%;
79
+ padding: 0 25px 0 0;
80
+ border-right: 2px solid #FFF;
81
+ }
82
+ @media (max-width: 979px) {
83
+ .account-login.idin .idin-login-panel .info,
84
+ .finish-registration.idin .idin-login-panel .info {
85
+ min-height: unset;
86
+ float: none;
87
+ width: 100%;
88
+ padding: 0;
89
+ border-right: none;
90
+ }
91
+ }
92
+ .account-login.idin .idin-login-panel .info .idin-logo,
93
+ .finish-registration.idin .idin-login-panel .info .idin-logo {
94
+ float: left;
95
+ position: relative;
96
+ content: '';
97
+ width: 80px;
98
+ height: 105px;
99
+ background-image: url(../images/iDIN.svg);
100
+ background-size: contain;
101
+ background-repeat: no-repeat;
102
+ background-position: center center;
103
+ }
104
+ .account-login.idin .idin-login-panel .info .introduction,
105
+ .finish-registration.idin .idin-login-panel .info .introduction {
106
+ display: table;
107
+ height: 105px;
108
+ margin: 0 0 0 100px;
109
+ }
110
+ .account-login.idin .idin-login-panel .info .introduction p,
111
+ .finish-registration.idin .idin-login-panel .info .introduction p {
112
+ display: table-cell;
113
+ vertical-align: middle;
114
+ line-height: 1.6;
115
+ }
116
+ .account-login.idin .idin-login-panel .info .introduction p .what-is-idin,
117
+ .finish-registration.idin .idin-login-panel .info .introduction p .what-is-idin {
118
+ display: block;
119
+ margin-top: 5px;
120
+ }
121
+ .account-login.idin .idin-login-panel .select-issuer,
122
+ .finish-registration.idin .idin-login-panel .select-issuer,
123
+ .account-login.idin .idin-login-panel .finish-form,
124
+ .finish-registration.idin .idin-login-panel .finish-form {
125
+ display: table;
126
+ height: 105px;
127
+ padding: 0 30px;
128
+ float: left;
129
+ width: 30%;
130
+ border-right: 2px solid #FFF;
131
+ }
132
+ @media (max-width: 979px) {
133
+ .account-login.idin .idin-login-panel .select-issuer,
134
+ .finish-registration.idin .idin-login-panel .select-issuer,
135
+ .account-login.idin .idin-login-panel .finish-form,
136
+ .finish-registration.idin .idin-login-panel .finish-form {
137
+ width: 50%;
138
+ padding: 0 30px 0 0;
139
+ }
140
+ }
141
+ @media (max-width: 599px) {
142
+ .account-login.idin .idin-login-panel .select-issuer,
143
+ .finish-registration.idin .idin-login-panel .select-issuer,
144
+ .account-login.idin .idin-login-panel .finish-form,
145
+ .finish-registration.idin .idin-login-panel .finish-form {
146
+ width: 100%;
147
+ padding: 0;
148
+ border-right: none;
149
+ }
150
+ }
151
+ .account-login.idin .idin-login-panel .select-issuer .form-group,
152
+ .finish-registration.idin .idin-login-panel .select-issuer .form-group,
153
+ .account-login.idin .idin-login-panel .finish-form .form-group,
154
+ .finish-registration.idin .idin-login-panel .finish-form .form-group {
155
+ display: table-cell;
156
+ vertical-align: middle;
157
+ }
158
+ .account-login.idin .idin-login-panel .select-issuer .form-group label,
159
+ .finish-registration.idin .idin-login-panel .select-issuer .form-group label,
160
+ .account-login.idin .idin-login-panel .finish-form .form-group label,
161
+ .finish-registration.idin .idin-login-panel .finish-form .form-group label {
162
+ margin: 0 0 5px 0;
163
+ }
164
+ .account-login.idin .idin-login-panel .select-issuer .form-group .cmgroep__idin__input,
165
+ .finish-registration.idin .idin-login-panel .select-issuer .form-group .cmgroep__idin__input,
166
+ .account-login.idin .idin-login-panel .finish-form .form-group .cmgroep__idin__input,
167
+ .finish-registration.idin .idin-login-panel .finish-form .form-group .cmgroep__idin__input {
168
+ width: 100%;
169
+ padding: 0 8px;
170
+ height: 30px;
171
+ }
172
+ .account-login.idin .idin-login-panel .finish-form .form-group,
173
+ .finish-registration.idin .idin-login-panel .finish-form .form-group {
174
+ display: block;
175
+ }
176
+ .account-login.idin .idin-login-panel .finish-form .form-group:not(:first-child),
177
+ .finish-registration.idin .idin-login-panel .finish-form .form-group:not(:first-child) {
178
+ margin: 5px 0 0 0;
179
+ }
180
+ .account-login.idin .idin-login-panel .actions,
181
+ .finish-registration.idin .idin-login-panel .actions {
182
+ display: table;
183
+ height: 105px;
184
+ padding: 0 0 0 30px;
185
+ float: left;
186
+ width: 30%;
187
+ }
188
+ @media (max-width: 979px) {
189
+ .account-login.idin .idin-login-panel .actions,
190
+ .finish-registration.idin .idin-login-panel .actions {
191
+ width: 50%;
192
+ }
193
+ }
194
+ @media (max-width: 599px) {
195
+ .account-login.idin .idin-login-panel .actions,
196
+ .finish-registration.idin .idin-login-panel .actions {
197
+ width: 100%;
198
+ padding: 0;
199
+ height: auto;
200
+ }
201
+ }
202
+ .account-login.idin .idin-login-panel .actions .action-wrapper,
203
+ .finish-registration.idin .idin-login-panel .actions .action-wrapper {
204
+ display: table-cell;
205
+ vertical-align: middle;
206
+ }
207
+ .account-login.idin .idin-login-panel .actions .button,
208
+ .finish-registration.idin .idin-login-panel .actions .button {
209
+ width: 100%;
210
+ }
211
+ .account-login.idin .idin-login-panel .actions .button.register,
212
+ .finish-registration.idin .idin-login-panel .actions .button.register {
213
+ background: #00b0f0;
214
+ }
215
+ .account-login.idin .idin-login-panel .actions .button.login,
216
+ .finish-registration.idin .idin-login-panel .actions .button.login {
217
+ background: #1d5393;
218
+ }
219
+ .account-login.idin .idin-login-panel .actions .button:not(:first-child),
220
+ .finish-registration.idin .idin-login-panel .actions .button:not(:first-child) {
221
+ margin: 0 0 0 0;
222
+ }
223
+ .account-login.idin .idin-login-panel .actions .button:not(:last-child),
224
+ .finish-registration.idin .idin-login-panel .actions .button:not(:last-child) {
225
+ margin: 0 0 10px 0;
226
+ }
227
+ .account-login.idin .idin-login-panel:after,
228
+ .finish-registration.idin .idin-login-panel:after {
229
+ clear: both;
230
+ display: table;
231
+ content: ' ';
232
+ }
233
+ .account-login.idin.finish-registration .info,
234
+ .finish-registration.idin.finish-registration .info {
235
+ min-height: 115px;
236
+ }
237
+ .account-login.idin.finish-registration .idin-logo,
238
+ .finish-registration.idin.finish-registration .idin-logo,
239
+ .account-login.idin.finish-registration .introduction,
240
+ .finish-registration.idin.finish-registration .introduction,
241
+ .account-login.idin.finish-registration .actions,
242
+ .finish-registration.idin.finish-registration .actions {
243
+ min-height: 115px;
244
+ }
245
+ .account-login #idin-finish-form .info,
246
+ .finish-registration #idin-finish-form .info {
247
+ border-right: 0;
248
+ }
249
+ .account-login #idin-finish-form .finish-form,
250
+ .finish-registration #idin-finish-form .finish-form {
251
+ border-left: 2px solid #FFF;
252
+ }
253
+ @media (max-width: 979px) {
254
+ .account-login #idin-finish-form .finish-form,
255
+ .finish-registration #idin-finish-form .finish-form {
256
+ border-left: none;
257
+ }
258
+ }
259
+ .account-login #idin-finish-form .finish-form,
260
+ .finish-registration #idin-finish-form .finish-form,
261
+ .account-login #idin-finish-form .idin-logo,
262
+ .finish-registration #idin-finish-form .idin-logo,
263
+ .account-login #idin-finish-form .introduction,
264
+ .finish-registration #idin-finish-form .introduction,
265
+ .account-login #idin-finish-form .actions,
266
+ .finish-registration #idin-finish-form .actions {
267
+ min-height: 145px;
268
+ }
269
+ .opc #opc-login .account-login.account-login-checkout .idin-login-panel {
270
+ margin: 15px 0 0 0;
271
+ }
272
+ .opc #opc-login .account-login.account-login-checkout .idin-login-panel .info .idin-logo {
273
+ width: 50px;
274
+ }
275
+ .opc #opc-login .account-login.account-login-checkout .idin-login-panel .info .introduction {
276
+ margin: 0 0 0 70px;
277
+ }
278
+ .opc #opc-login .account-login.account-login-checkout .idin-login-panel .info .introduction p.introduction-text {
279
+ font-family: "Helvetica Neue", Verdana, Arial, sans-serif;
280
+ font-style: normal;
281
+ color: #000000;
282
+ }
283
+ .customer-account-idin-info {
284
+ padding: 15px;
285
+ background: #d3e9ea;
286
+ display: table;
287
+ width: 100%;
288
+ height: 80px;
289
+ color: #000000;
290
+ }
291
+ .customer-account-idin-info + .customer-account-idin-info {
292
+ margin-top: 25px;
293
+ }
294
+ .customer-account-idin-info:after {
295
+ clear: both;
296
+ display: table;
297
+ content: ' ';
298
+ }
299
+ .customer-account-idin-info .idin-details span {
300
+ padding-right: 15px;
301
+ }
302
+ .customer-account-idin-info.idin-connected.age-verified {
303
+ height: 40px;
304
+ }
305
+ .customer-account-idin-info.idin-connected.age-verified .idin-logo {
306
+ width: 50px;
307
+ height: 40px;
308
+ }
309
+ .customer-account-idin-info.idin-connected.age-verified .idin-details {
310
+ height: 40px;
311
+ }
312
+ .customer-account-idin-info.idin-connected.age-verified .age-verification {
313
+ height: auto;
314
+ }
315
+ .customer-account-idin-info.idin-connected.age-verified .age-verification span {
316
+ height: auto;
317
+ }
318
+ .customer-account-idin-info .idin-logo {
319
+ display: table-cell;
320
+ vertical-align: middle;
321
+ float: left;
322
+ width: 80px;
323
+ height: 80px;
324
+ background-image: url(../images/iDIN.svg);
325
+ background-size: contain;
326
+ background-repeat: no-repeat;
327
+ background-position: center center;
328
+ margin: 0 20px 0 5px;
329
+ }
330
+ .customer-account-idin-info .idin-details {
331
+ display: table-cell;
332
+ height: 80px;
333
+ vertical-align: middle;
334
+ width: 100%;
335
+ }
336
+ .customer-account-idin-info .idin-details span {
337
+ display: table-cell;
338
+ vertical-align: middle;
339
+ width: 60%;
340
+ }
341
+ .customer-account-idin-info .idin-details .action-wrapper {
342
+ display: table-cell;
343
+ vertical-align: middle;
344
+ width: 40%;
345
+ }
346
+ .customer-account-idin-info .idin-details .action-wrapper button {
347
+ background: #00b0f0;
348
+ width: 100%;
349
+ margin: 15px 0 0 0;
350
+ }
351
+ @media (max-width: 599px) {
352
+ .customer-account-idin-info {
353
+ display: block;
354
+ height: auto;
355
+ }
356
+ .customer-account-idin-info .idin-logo {
357
+ display: block;
358
+ float: none;
359
+ width: 100%;
360
+ margin-bottom: 15px;
361
+ }
362
+ .customer-account-idin-info .idin-details {
363
+ display: block;
364
+ height: auto;
365
+ }
366
+ .customer-account-idin-info .idin-details .age-verification span {
367
+ display: block;
368
+ }
369
+ .customer-account-idin-info .idin-details .age-verification .action-wrapper {
370
+ display: block;
371
+ width: 100%;
372
+ }
373
+ }
374
+ .customer-account-idin-info .age-verification {
375
+ display: table;
376
+ height: 80px;
377
+ }
378
+ .customer-account-idin-info .age-verification span {
379
+ display: table-cell;
380
+ width: auto;
381
+ height: 80px;
382
+ vertical-align: middle;
383
+ }
384
+ .cart-idin-notice {
385
+ display: table;
386
+ width: 100%;
387
+ padding: 20px;
388
+ margin: 0 0 25px 0;
389
+ background: #d3e9ea;
390
+ color: #000000;
391
+ }
392
+ .cart-idin-notice .idin-logo {
393
+ display: table-cell;
394
+ vertical-align: middle;
395
+ width: 50px;
396
+ height: 40px;
397
+ background-image: url(../images/iDIN.svg);
398
+ background-size: contain;
399
+ background-repeat: no-repeat;
400
+ background-position: center center;
401
+ }
402
+ .cart-idin-notice span {
403
+ display: table-cell;
404
+ vertical-align: middle;
405
+ height: 40px;
406
+ text-align: left;
407
+ padding: 0 0 0 15px;
408
+ }
409
+ .product-idin-notice {
410
+ display: table;
411
+ width: 100%;
412
+ padding: 15px;
413
+ margin: 0 0 25px 0;
414
+ background: #d3e9ea;
415
+ color: #000000;
416
+ }
417
+ .product-idin-notice .idin-logo {
418
+ display: table-cell;
419
+ vertical-align: middle;
420
+ width: 50px;
421
+ height: 40px;
422
+ background-image: url(../images/iDIN.svg);
423
+ background-size: contain;
424
+ background-repeat: no-repeat;
425
+ background-position: center center;
426
+ }
427
+ .product-idin-notice span {
428
+ display: table-cell;
429
+ vertical-align: middle;
430
+ height: 40px;
431
+ text-align: left;
432
+ padding: 0 0 0 15px;
433
+ }
434
+ .checkout-step.idin-age-verification {
435
+ display: table;
436
+ width: 100%;
437
+ height: 100px;
438
+ padding: 20px;
439
+ background: #d3e9ea;
440
+ color: #000000;
441
+ }
442
+ .checkout-step.idin-age-verification .idin-logo {
443
+ float: left;
444
+ width: 70px;
445
+ height: 80px;
446
+ background-image: url(../images/iDIN.svg);
447
+ background-size: contain;
448
+ background-repeat: no-repeat;
449
+ background-position: center center;
450
+ }
451
+ .checkout-step.idin-age-verification .idin-details p {
452
+ display: table-cell;
453
+ vertical-align: middle;
454
+ width: 60%;
455
+ height: 80px;
456
+ padding: 0 20px;
457
+ line-height: 33px;
458
+ }
459
+ .checkout-step.idin-age-verification .idin-details.age-verified button {
460
+ float: right;
461
+ }
462
+ .checkout-step.idin-age-verification .idin-details .verify-action {
463
+ width: 40%;
464
+ display: table-cell;
465
+ vertical-align: middle;
466
+ height: 80px;
467
+ }
468
+ .checkout-step.idin-age-verification .idin-details .verify-action .button {
469
+ background: #00b0f0;
470
+ width: 100%;
471
+ margin: 15px 0 0 0;
472
+ }
473
+ .checkout-step.idin-age-verification.onestepcheckout {
474
+ margin: 20px 0 20px 0;
475
+ }
476
+ .checkout-step.idin-age-verification.onestepcheckout .idin-details {
477
+ display: table;
478
+ width: 1090px;
479
+ }
480
+ .checkout-step.idin-age-verification.onestepcheckout .idin-details p {
481
+ width: 50%;
482
+ }
483
+ .checkout-step.idin-age-verification.onestepcheckout .idin-details .select-bank {
484
+ display: table-cell;
485
+ vertical-align: middle;
486
+ border-left: 1px solid #FFF;
487
+ border-right: 1px solid #FFF;
488
+ width: 30%;
489
+ height: 80px;
490
+ padding: 0 20px;
491
+ }
492
+ .checkout-step.idin-age-verification.onestepcheckout .idin-details .verify-action {
493
+ width: 20%;
494
+ padding: 0 0 0 20px;
495
+ text-align: center;
496
+ }
497
+ .idin-disabled {
498
+ position: relative;
499
+ opacity: 0.7;
500
+ padding: 25px;
501
+ cursor: not-allowed !important;
502
+ -webkit-touch-callout: none;
503
+ -webkit-user-select: none;
504
+ -khtml-user-select: none;
505
+ -moz-user-select: none;
506
+ -ms-user-select: none;
507
+ user-select: none;
508
+ }
509
+ .idin-disabled:after {
510
+ position: absolute;
511
+ content: '';
512
+ top: 0;
513
+ bottom: 0;
514
+ left: 0;
515
+ right: 0;
516
+ background: rgba(0, 0, 0, 0.5);
517
+ }
skin/frontend/base/default/cm/idin/images/iDIN.svg ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="267px" height="231px" viewBox="0 0 267 231" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
4
+ <title>iDIN_logo</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Desktop" transform="translate(-369.000000, -396.000000)">
9
+ <g id="iDIN_logo" transform="translate(369.000000, 396.000000)">
10
+ <g id="Group" fill="#FFFFFF">
11
+ <polygon id="Path-2" points="6.14088905 7.51680358 6.07616701 224.669249 155.772088 224.487491 209.708664 211.656553 236.458901 188.165002 261.665054 146.275765 262.649754 98.685773 249.4819 61.2465459 216.225558 22.7260082 173.666191 10.6344287 84.2080005 6.9684466"></polygon>
12
+ <path d="M10.8527647,10.841301 L10.8527647,219.676515 L137.78434,219.676515 C214.435777,219.676515 256.129286,183.987015 256.129286,114.993146 C256.129286,44.0884806 210.932244,10.8401796 137.78434,10.8401796 L10.8527647,10.8401796 L10.8527647,10.841301 Z M137.78434,0.00224271845 C250.190218,0.00224271845 266.973076,72.0540583 266.973076,114.994267 C266.973076,189.49401 221.09395,230.520058 137.78434,230.520058 L0.00673109244,230.520058 L0.00673109244,0.00224271845 L137.78434,0.00224271845 Z" id="Shape"></path>
13
+ </g>
14
+ <path d="M93.759,86.396 L93.759,107.334 L100.183,107.334 C104.64,107.334 108.753,106.048 108.753,96.706 C108.753,87.563 104.177,86.396 100.183,86.396 L93.759,86.396 Z M226.802,107.333 C222.577,50.43 177.809,38.138 137.136,38.138 L93.769,38.138 L93.769,75.994 L100.184,75.994 C111.889,75.994 119.165,83.935 119.165,96.705 C119.165,109.868 112.066,117.733 100.184,117.733 L93.769,117.733 L93.769,193.483 L137.137,193.483 C203.27,193.483 226.286,162.775 227.098,117.733 L226.802,107.333 Z" id="Shape" fill="#00B0F0"></path>
15
+ <rect id="Rectangle-path" fill="#FFFFFF" x="128.717" y="76.006" width="12.428" height="41.793"></rect>
16
+ <polygon id="Shape" fill="#FFFFFF" points="179.517 117.798 191.339 117.798 191.339 76.005 179.693 76.005 179.693 100.372 163.11 76.005 151.406 76.005 151.406 117.798 163.022 117.798 163.022 93.613"></polygon>
17
+ <path d="M24.674,22.668 L24.674,208.902 L137.819,208.902 C206.145,208.902 243.31,177.075 243.31,115.548 C243.31,52.317 203.022,22.667 137.819,22.667 L24.674,22.667 L24.674,22.668 Z M137.819,13.002 C238.016,13.002 252.976,77.256 252.976,115.549 C252.976,181.986 212.08,218.572 137.819,218.572 L15.006,218.572 L15.006,13.002 L137.819,13.002 Z" id="Shape" fill="#000000"></path>
18
+ <rect id="Rectangle-path" fill="#000000" x="39.853" y="129.245" width="36.219" height="64.478"></rect>
19
+ <path d="M80.47,96.765 C80.47,109.199 70.395,119.279 57.959,119.279 C45.532,119.279 35.447,109.199 35.447,96.765 C35.447,84.338 45.532,74.254 57.959,74.254 C70.396,74.254 80.47,84.338 80.47,96.765" id="Shape" fill="#000000"></path>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </svg>
skin/frontend/base/default/cm/idin/js/age_verification.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2016 CM Groep
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * @category CMGroep
25
+ * @package Idin
26
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
27
+ * @copyright 2016-2017 CM Groep
28
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
29
+ */
30
+ var IdinAgeVerification = Class.create();
31
+ IdinAgeVerification.prototype = {
32
+ initialize: function(form, verifyUrl) {
33
+ this.form = form;
34
+ this.verifyUrl = verifyUrl;
35
+
36
+ this.onSave = this.nextStep.bindAsEventListener(this);
37
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
38
+ },
39
+
40
+ /**
41
+ * Starts the Age Verification Transaction
42
+ */
43
+ start: function() {
44
+ if ($('checkout_method').value != 'customer') {
45
+ $('checkout_method').value = checkout.method;
46
+ }
47
+
48
+ var form = new VarienForm(this.form);
49
+ if (form.validator && form.validator.validate()) {
50
+ $(this.form).submit();
51
+ }
52
+ },
53
+
54
+ /**
55
+ * Calls the verify action and continues the checkout
56
+ */
57
+ save: function() {
58
+ if (checkout.loadWaiting != false) return;
59
+
60
+ checkout.setLoadWaiting('age_verification');
61
+
62
+ new Ajax.Request(
63
+ this.verifyUrl,
64
+ {
65
+ method: 'post',
66
+ onComplete: this.onComplete,
67
+ onSuccess: this.onSave,
68
+ onFailure: checkout.ajaxFailure.bind(checkout)
69
+ }
70
+ );
71
+ },
72
+
73
+ /**
74
+ * Parses the response from the verify action and triggers the next
75
+ * checkout step
76
+ *
77
+ * @param transport
78
+ */
79
+ nextStep: function(transport) {
80
+ var response = transport.responseJSON || transport.responseText.evalJSON(true) || {};
81
+
82
+ if (response.error){
83
+ if (Object.isString(response.message)) {
84
+ alert(response.message.stripTags().toString());
85
+ }
86
+ }
87
+
88
+ checkout.setStepResponse(response);
89
+ },
90
+
91
+ /**
92
+ * Resets the step loading indicator
93
+ *
94
+ * @param transport
95
+ */
96
+ resetLoadWaiting: function(transport) {
97
+ checkout.setLoadWaiting(false);
98
+ document.body.fire('age_verification-request:completed', {transport: transport});
99
+ }
100
+ };
skin/frontend/base/default/cm/idin/js/onestepcheckout_idin.js ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2016 CM Groep
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * @category CMGroep
25
+ * @package Idin
26
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
27
+ * @copyright 2016-2017 CM Groep
28
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
29
+ */
30
+ var IdinOneStepCheckout = Class.create();
31
+ IdinOneStepCheckout.prototype = {
32
+ initialize: function(idinContainer, idinLoginContainer, form, aboveContainer, requireVerification) {
33
+ this.idinContainer = idinContainer;
34
+ this.idinLoginContainer = idinLoginContainer;
35
+ this.form = form;
36
+ this.aboveContainer = aboveContainer;
37
+ this.requireVerification = requireVerification;
38
+
39
+ this.insertIdinContainer();
40
+
41
+ if (this.requireVerification) {
42
+ this.disableOneStepCheckout();
43
+ }
44
+
45
+ if ($$('.account-login-checkout:not(#' + this.idinLoginContainer + ')').length > 0) {
46
+ $$('.account-login-checkout:not(#' + this.idinLoginContainer + ')')[0].hide();
47
+ }
48
+ },
49
+
50
+ /**
51
+ * Inserts the iDIN template above the checkout because
52
+ * of missing layout handles in OneStepCheckout
53
+ */
54
+ insertIdinContainer: function() {
55
+ var element = $(this.idinContainer).remove();
56
+ $(this.aboveContainer).insert({
57
+ before: element
58
+ });
59
+
60
+ element.show();
61
+
62
+ if ($(this.idinLoginContainer)) {
63
+ var element = $(this.idinLoginContainer).remove();
64
+ $(this.aboveContainer).insert({
65
+ before: element
66
+ });
67
+
68
+ element.show();
69
+ }
70
+ },
71
+
72
+ toggleLogin: function() {
73
+ $('idin-onestepcheckout-login-wrapper').toggle();
74
+ },
75
+
76
+ /**
77
+ * Adds the class for disabling the checkout on CSS level
78
+ */
79
+ disableOneStepCheckout: function() {
80
+ $$('.checkoutcontainer')[0].addClassName('idin-disabled');
81
+ },
82
+
83
+ /**
84
+ * Starts the age verification transaction
85
+ */
86
+ start: function() {
87
+ var form = new VarienForm(this.form);
88
+
89
+ if (form.validator && form.validator.validate()) {
90
+ $(this.form).submit();
91
+ }
92
+ }
93
+ };
skin/frontend/base/default/cm/idin/js/opcheckout_idin.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2016 CM Groep
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * @category CMGroep
25
+ * @package Idin
26
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
27
+ * @copyright 2016-2017 CM Groep
28
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
29
+ */
30
+ var IdinCheckout = Class.create(Checkout, {
31
+ initialize: function($super, accordion, urls, checkoutMethod) {
32
+ $super(accordion, urls);
33
+ this.steps = ['login', 'age_verification', 'billing', 'shipping', 'shipping_method', 'payment', 'review'];
34
+ this.checkoutMethod = checkoutMethod;
35
+
36
+ /**
37
+ * Overwrites the default action after specifying a login method
38
+ * Normally it would trigger the billing step, this makes sure the customer
39
+ * is redirected to the age verification step
40
+ */
41
+ document.observe('login:setMethod', function(event) {
42
+ if (event.memo.method != '') {
43
+ if (event.memo.method == 'customer') {
44
+ checkout.accordion.closeSection('opc-billing');
45
+ } else {
46
+ checkout.accordion.closeSection('opc-login');
47
+ }
48
+ checkout.gotoSection('age_verification', true);
49
+ }
50
+ });
51
+
52
+ /**
53
+ * After a age verification transaction is finished this makes sure
54
+ * the checkout process is continued where the customer left off
55
+ */
56
+ if (this.checkoutMethod != '') {
57
+ this.currentStep = 'age_verification';
58
+ ageVerification.save();
59
+ checkout.setLoadWaiting(false);
60
+
61
+ if (this.checkoutMethod != 'customer') {
62
+ checkout.method = this.checkoutMethod;
63
+ new Ajax.Request(
64
+ checkout.saveMethodUrl,
65
+ {
66
+ method: 'post',
67
+ onFailure: checkout.ajaxFailure.bind(this),
68
+ parameters: {method: this.checkoutMethod}
69
+ }
70
+ );
71
+
72
+ if (this.checkoutMethod == 'guest') {
73
+ Element.hide('register-customer-password');
74
+ } else {
75
+ Element.show('register-customer-password');
76
+ }
77
+ }
78
+
79
+ accordion.currentSection = 'opc-age_verification';
80
+ checkout.gotoSection('billing', true);
81
+ }
82
+ }
83
+ });
skin/frontend/base/default/cm/idin/src/styles.less ADDED
@@ -0,0 +1,615 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2016 CM Groep
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * @category CMGroep
25
+ * @package Idin
26
+ * @author Epartment Ecommerce B.V. <support@epartment.nl>
27
+ * @copyright 2016-2017 CM Groep
28
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
29
+ */
30
+
31
+ /*
32
+ * iDIN Colors
33
+ */
34
+ @idin-main-blue: #00b0f0;
35
+ @idin-main-black: #000000;
36
+ @idin-support-light-blue: #d3e9ea;
37
+ @idin-support-dark-blue: #1d5393;
38
+ @idin-support-coral: #ff4355;
39
+
40
+ /*
41
+ * Breakpoints
42
+ */
43
+ @bp-xsmall: 479px;
44
+ @bp-small: 599px;
45
+ @bp-medium: 770px;
46
+ @bp-large: 979px;
47
+ @bp-xlarge: 1199px;
48
+
49
+ /*
50
+ * Basic Form Components
51
+ */
52
+ .cmgroep__idin__select
53
+ {
54
+ width: 100%;
55
+ background: #FFF;
56
+ padding: 0 8px;
57
+ height: 30px;
58
+ }
59
+
60
+ .cmgroep__idin__input
61
+ {
62
+ float: none;
63
+ width: 100%;
64
+ background: #FFF;
65
+ padding: 0 8px;
66
+ height: 30px;
67
+ border: 1px solid #A6A6A6;
68
+ border-radius: 2px;
69
+ }
70
+
71
+ .button {
72
+ &.danger {
73
+ background: white;
74
+ color: @idin-main-blue;
75
+
76
+ &:hover, &:focus, &:active {
77
+ background: white;
78
+ color: @idin-main-blue;
79
+ }
80
+ }
81
+ }
82
+
83
+ /*
84
+ * Account Login and Registration
85
+ */
86
+ .account-login, .finish-registration
87
+ {
88
+ &.idin {
89
+ .idin-login-panel {
90
+ @idin-login-panel-height: 105px;
91
+
92
+ color: @idin-main-black;
93
+
94
+ padding: 25px 25px 25px 30px;
95
+ background: @idin-support-light-blue;
96
+
97
+ margin: 0 0 30px 0;
98
+
99
+ .info {
100
+ min-height: @idin-login-panel-height;
101
+ float: left;
102
+ width: 40%;
103
+
104
+ padding: 0 25px 0 0;
105
+ border-right: 2px solid #FFF;
106
+
107
+ @media (max-width: @bp-large) {
108
+ min-height: unset;
109
+ float: none;
110
+ width: 100%;
111
+ padding: 0;
112
+ border-right: none;
113
+ }
114
+
115
+ .idin-logo {
116
+ float: left;
117
+ position: relative;
118
+ content: '';
119
+ width: 80px;
120
+ height: @idin-login-panel-height;
121
+
122
+ background-image: url(../images/iDIN.svg);
123
+ background-size: contain;
124
+ background-repeat: no-repeat;
125
+ background-position: center center;
126
+ }
127
+
128
+ .introduction {
129
+ display: table;
130
+ height: @idin-login-panel-height;
131
+ margin: 0 0 0 100px;
132
+
133
+ p {
134
+ display: table-cell;
135
+ vertical-align: middle;
136
+ line-height: 1.6;
137
+
138
+ .what-is-idin {
139
+ display: block;
140
+ margin-top: 5px;
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ .select-issuer, .finish-form {
147
+ display: table;
148
+ height: @idin-login-panel-height;
149
+
150
+ padding: 0 30px;
151
+ float: left;
152
+ width: 30%;
153
+
154
+ border-right: 2px solid #FFF;
155
+
156
+ @media (max-width: @bp-large) {
157
+ width: 50%;
158
+ padding: 0 30px 0 0;
159
+ }
160
+
161
+ @media (max-width: @bp-small) {
162
+ width: 100%;
163
+ padding: 0;
164
+ border-right: none;
165
+ }
166
+
167
+ .form-group {
168
+ display: table-cell;
169
+ vertical-align: middle;
170
+
171
+ label {
172
+ margin: 0 0 5px 0;
173
+ }
174
+
175
+ .cmgroep__idin__input
176
+ {
177
+ width: 100%;
178
+ padding: 0 8px;
179
+ height: 30px;
180
+ }
181
+ }
182
+ }
183
+
184
+ .finish-form {
185
+ .form-group {
186
+ display: block;
187
+
188
+ &:not(:first-child) {
189
+ margin: 5px 0 0 0;
190
+ }
191
+ }
192
+ }
193
+
194
+ .actions {
195
+ display: table;
196
+ height: @idin-login-panel-height;
197
+
198
+ padding: 0 0 0 30px;
199
+ float: left;
200
+ width: 30%;
201
+
202
+ @media (max-width: @bp-large) {
203
+ width: 50%;
204
+ }
205
+
206
+ @media (max-width: @bp-small) {
207
+ width: 100%;
208
+ padding: 0;
209
+ height: auto;
210
+ }
211
+
212
+ .action-wrapper {
213
+ display: table-cell;
214
+ vertical-align: middle;
215
+ }
216
+
217
+ .button {
218
+ width: 100%;
219
+
220
+ &.register {
221
+
222
+ background: @idin-main-blue;
223
+ }
224
+
225
+ &.login {
226
+ background: @idin-support-dark-blue;
227
+ }
228
+
229
+ &:not(:first-child) {
230
+ margin: 0 0 0 0;
231
+ }
232
+
233
+ &:not(:last-child) {
234
+ margin: 0 0 10px 0;
235
+ }
236
+ }
237
+ }
238
+
239
+ &:after {
240
+ clear: both;
241
+ display: table;
242
+ content: ' ';
243
+ }
244
+ }
245
+
246
+ &.finish-registration {
247
+ .info {
248
+ min-height: 115px;
249
+ }
250
+
251
+ .idin-logo, .introduction, .actions {
252
+ min-height: 115px;
253
+ }
254
+ }
255
+ }
256
+
257
+ #idin-finish-form {
258
+ .info {
259
+ border-right: 0;
260
+ }
261
+ .finish-form {
262
+ border-left: 2px solid #FFF;
263
+
264
+ @media (max-width: @bp-large) {
265
+ border-left: none;
266
+ }
267
+
268
+ }
269
+ .finish-form, .idin-logo, .introduction, .actions {
270
+ min-height: 145px;
271
+ }
272
+ }
273
+ }
274
+
275
+ .opc #opc-login {
276
+ .account-login {
277
+ &.account-login-checkout {
278
+
279
+ .idin-login-panel {
280
+ margin: 15px 0 0 0;
281
+
282
+ .info {
283
+ .idin-logo {
284
+ width: 50px;
285
+ }
286
+
287
+ .introduction {
288
+ margin: 0 0 0 70px;
289
+
290
+ p.introduction-text {
291
+ font-family: "Helvetica Neue", Verdana, Arial, sans-serif;
292
+ font-style: normal;
293
+ color: @idin-main-black;
294
+ }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+
302
+ .customer-account-idin-info {
303
+ padding: 15px;
304
+ background: @idin-support-light-blue;
305
+
306
+ display: table;
307
+ width: 100%;
308
+ height: 80px;
309
+
310
+ color: @idin-main-black;
311
+
312
+ + .customer-account-idin-info {
313
+ margin-top: 25px;
314
+ }
315
+
316
+ &:after {
317
+ clear: both;
318
+ display: table;
319
+ content: ' ';
320
+ }
321
+
322
+ .idin-details {
323
+ span {
324
+ padding-right: 15px;
325
+ }
326
+ }
327
+
328
+ &.idin-connected {
329
+ &.age-verified {
330
+ height: 40px;
331
+
332
+ .idin-logo {
333
+ width: 50px;
334
+ height: 40px;
335
+ }
336
+
337
+ .idin-details {
338
+ height: 40px;
339
+ }
340
+
341
+ .age-verification {
342
+ height: auto;
343
+ span {
344
+ height: auto;
345
+ }
346
+ }
347
+ }
348
+ }
349
+
350
+ .idin-logo {
351
+ display: table-cell;
352
+ vertical-align: middle;
353
+
354
+ float: left;
355
+ width: 80px;
356
+ height: 80px;
357
+ background-image: url(../images/iDIN.svg);
358
+ background-size: contain;
359
+ background-repeat: no-repeat;
360
+ background-position: center center;
361
+
362
+ margin: 0 20px 0 5px;
363
+ }
364
+
365
+ .idin-details {
366
+ display: table-cell;
367
+ height: 80px;
368
+ vertical-align: middle;
369
+ width: 100%;
370
+
371
+ span {
372
+ display: table-cell;
373
+ vertical-align: middle;
374
+ width: 60%;
375
+ }
376
+
377
+ .action-wrapper {
378
+ display: table-cell;
379
+ vertical-align: middle;
380
+ width: 40%;
381
+
382
+ button {
383
+ background: @idin-main-blue;
384
+ width: 100%;
385
+ margin: 15px 0 0 0;
386
+ }
387
+ }
388
+ }
389
+
390
+ @media (max-width: @bp-small) {
391
+ display: block;
392
+ height: auto;
393
+
394
+ .idin-logo {
395
+ display: block;
396
+ float: none;
397
+ width: 100%;
398
+ margin-bottom: 15px;
399
+ }
400
+
401
+ .idin-details {
402
+ display: block;
403
+ height: auto;
404
+
405
+ .age-verification {
406
+ span {
407
+ display: block;
408
+ }
409
+
410
+ .action-wrapper {
411
+ display: block;
412
+ width: 100%;
413
+ }
414
+ }
415
+ }
416
+ }
417
+
418
+ .age-verification {
419
+ display: table;
420
+ height: 80px;
421
+
422
+ span {
423
+ display: table-cell;
424
+ width: auto;
425
+ height: 80px;
426
+ vertical-align: middle;
427
+ }
428
+ }
429
+ }
430
+
431
+ .cart-idin-notice {
432
+ @cart-notice-height: 40px;
433
+
434
+ display: table;
435
+
436
+ width: 100%;
437
+ padding: 20px;
438
+ margin: 0 0 25px 0;
439
+
440
+ background: @idin-support-light-blue;
441
+ color: @idin-main-black;
442
+
443
+ .idin-logo {
444
+ display: table-cell;
445
+ vertical-align: middle;
446
+
447
+ width: 50px;
448
+ height: @cart-notice-height;
449
+
450
+ background-image: url(../images/iDIN.svg);
451
+ background-size: contain;
452
+ background-repeat: no-repeat;
453
+ background-position: center center;
454
+ }
455
+
456
+ span {
457
+ display: table-cell;
458
+ vertical-align: middle;
459
+ height: @cart-notice-height;
460
+
461
+ text-align: left;
462
+ padding: 0 0 0 15px;
463
+ }
464
+ }
465
+
466
+ .product-idin-notice
467
+ {
468
+ @product-notice-height: 40px;
469
+
470
+ display: table;
471
+
472
+ width: 100%;
473
+ padding: 15px;
474
+ margin: 0 0 25px 0;
475
+
476
+ background: @idin-support-light-blue;
477
+ color: @idin-main-black;
478
+
479
+ .idin-logo {
480
+ display: table-cell;
481
+ vertical-align: middle;
482
+
483
+ width: 50px;
484
+ height: @product-notice-height;
485
+
486
+ background-image: url(../images/iDIN.svg);
487
+ background-size: contain;
488
+ background-repeat: no-repeat;
489
+ background-position: center center;
490
+ }
491
+
492
+ span {
493
+ display: table-cell;
494
+ vertical-align: middle;
495
+ height: @product-notice-height;
496
+
497
+ text-align: left;
498
+ padding: 0 0 0 15px;
499
+ }
500
+ }
501
+
502
+ .checkout-step {
503
+ &.idin-age-verification {
504
+ @idin-age-verification-height: 80px;
505
+ display: table;
506
+
507
+ width: 100%;
508
+ height: @idin-age-verification-height + 20px;
509
+ padding: 20px;
510
+
511
+ background: @idin-support-light-blue;
512
+ color: @idin-main-black;
513
+
514
+ .idin-logo {
515
+ float: left;
516
+ width: 70px;
517
+ height: @idin-age-verification-height;
518
+
519
+ background-image: url(../images/iDIN.svg);
520
+ background-size: contain;
521
+ background-repeat: no-repeat;
522
+ background-position: center center;
523
+ }
524
+
525
+ .idin-details {
526
+ p {
527
+ display: table-cell;
528
+ vertical-align: middle;
529
+
530
+ width: 60%;
531
+ height: @idin-age-verification-height;
532
+
533
+ padding: 0 20px;
534
+
535
+ line-height: 33px;
536
+ }
537
+
538
+ &.age-verified {
539
+ button {
540
+ float: right;
541
+ }
542
+ }
543
+
544
+ .verify-action {
545
+ width: 40%;
546
+ display: table-cell;
547
+ vertical-align: middle;
548
+ height: @idin-age-verification-height;
549
+
550
+ .button {
551
+ background: @idin-main-blue;
552
+ width: 100%;
553
+
554
+ margin: 15px 0 0 0;
555
+ }
556
+ }
557
+ }
558
+
559
+ &.onestepcheckout {
560
+ margin: 20px 0 20px 0;
561
+
562
+ .idin-details {
563
+ display: table;
564
+ width: 1090px;
565
+
566
+ p {
567
+ width: 50%;
568
+ }
569
+
570
+ .select-bank {
571
+ display: table-cell;
572
+ vertical-align: middle;
573
+
574
+ border-left: 1px solid #FFF;
575
+ border-right: 1px solid #FFF;
576
+
577
+ width: 30%;
578
+ height: @idin-age-verification-height;
579
+ padding: 0 20px;
580
+ }
581
+
582
+ .verify-action {
583
+ width: 20%;
584
+ padding: 0 0 0 20px;
585
+ text-align: center;
586
+ }
587
+ }
588
+ }
589
+ }
590
+ }
591
+
592
+ .idin-disabled {
593
+ position: relative;
594
+ opacity: 0.7;
595
+ padding: 25px;
596
+
597
+ cursor: not-allowed !important;
598
+ -webkit-touch-callout: none;
599
+ -webkit-user-select: none;
600
+ -khtml-user-select: none;
601
+ -moz-user-select: none;
602
+ -ms-user-select: none;
603
+ user-select: none;
604
+
605
+ &:after {
606
+ position: absolute;
607
+ content: '';
608
+ top: 0;
609
+ bottom: 0;
610
+ left: 0;
611
+ right: 0;
612
+
613
+ background: rgba(0, 0, 0, 0.5);
614
+ }
615
+ }