OneID - Version 2.0.0

Version Notes

Update Magento Commerce Extension to work with OneID 2.0.

Faster Button Drawing, and newer attribute syntax.

Download this release

Release Info

Developer OneID
Extension OneID
Version 2.0.0
Comparing to
See all releases


Code changes from version 1.0.12 to 2.0.0

app/code/community/OneID/Connector/Helper/Data.php CHANGED
@@ -51,10 +51,12 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
51
  public function getCreateOneIdAttrs() {
52
  $customer = Mage::getSingleton('customer/session')->getCustomer();
53
  $data = array(
54
- "personal_info" => array(
55
- "first_name" => $this->_escapeQuote($customer->getFirstname()),
56
- "last_name" => $this->_escapeQuote($customer->getLastname()),
57
- "email" => $this->_escapeQuote($customer->getEmail())
 
 
58
  )
59
  );
60
 
@@ -63,31 +65,15 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
63
  if ($customerAddressId){
64
  $address = Mage::getModel('customer/address')->load($customerAddressId);
65
  $street = $address->getStreet();
66
- $data["address"] = array("billing" => array());
67
- $data["address"]["billing"]["street"] = $this->_escapeQuote( $street[0]);
68
- $data["address"]["billing"]["street2"] = count($street) == 2 ? $this->_escapeQuote($street[1]) : "";
69
- $data["address"]["billing"]["state"] = $address->getRegionId();
70
- $data["address"]["billing"]["city"] = $this->_escapeQuote($address->getCity());
71
- $data["address"]["billing"]["zip"] = $address->getPostcode();
72
- $data["address"]["billing"]["phone"] = $address->getTelephone();
73
- }
74
-
75
- $customerAddressId = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping();
76
- if ($customerAddressId){
77
- $address = Mage::getModel('customer/address')->load($customerAddressId);
78
-
79
- if (!$data["address"]) {
80
- $data["address"] = array();
81
- }
82
-
83
- $street = $address->getStreet();
84
- $data["address"]["shipping"] = array();
85
- $data["address"]["shipping"]["street"] = $this->_escapeQuote( $street[0]);
86
- $data["address"]["shipping"]["street2"] = count($street) == 2 ? $this->_escapeQuote($street[1]) : "";
87
- $data["address"]["shipping"]["state"] = $address->getRegionId();
88
- $data["address"]["shipping"]["city"] = $this->_escapeQuote($address->getCity());
89
- $data["address"]["shipping"]["zip"] = $address->getPostcode();
90
- $data["address"]["shipping"]["phone"] = $address->getTelephone();
91
  }
92
 
93
  $orders = Mage::getResourceModel('sales/order_collection')
@@ -114,8 +100,6 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
114
  }
115
  }
116
 
117
-
118
-
119
  return json_encode($data);
120
  }
121
 
@@ -135,57 +119,41 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
135
 
136
  public function getCreateOneIdAttrsFromOrder($order) {
137
  $data = array(
138
- "personal_info" => array(
139
  "first_name" => $this->_escapeQuote($order->getCustomerFirstname()),
140
- "last_name" => $this->_escapeQuote($order->getCustomerLastname()),
 
 
141
  "email" => $this->_escapeQuote($order->getCustomerEmail())
142
  )
143
  );
144
-
145
- $address = $order->getBillingAddress();
146
-
147
- $data["address"] = array("billing" => array());
148
-
149
- $street = $address->getStreet();
150
- $data["address"]["billing"]["street"] = $this->_escapeQuote( $street[0]);
151
- $data["address"]["billing"]["street2"] = count($street) == 2 ? $this->_escapeQuote($street[1]) : "";
152
- $data["address"]["billing"]["state"] = $address->getRegionId();
153
- $data["address"]["billing"]["city"] = $this->_escapeQuote($address->getCity());
154
- $data["address"]["billing"]["zip"] = $address->getPostcode();
155
- $data["address"]["billing"]["phone"] = $address->getTelephone();
156
- $data["personal_info"]["primary_phone"] = $address->getTelephone();
157
-
158
- $address = $order->getShippingAddress();
159
- if ($address) {
160
- if (!$data["address"]){
161
- $data["address"] = array();
162
- }
163
- $data["address"]["shipping"] = array();
164
 
165
-
 
 
166
  $street = $address->getStreet();
167
- $data["address"]["shipping"]["street"] = $this->_escapeQuote( $street[0]);
168
- $data["address"]["shipping"]["street2"] = count($street) == 2 ? $this->_escapeQuote($street[1]) : "";
169
- $data["address"]["shipping"]["state"] = $address->getRegionId();
170
- $data["address"]["shipping"]["city"] = $this->_escapeQuote($address->getCity());
171
- $data["address"]["shipping"]["zip"] = $address->getPostcode();
172
- $data["address"]["shipping"]["phone"] = $address->getTelephone();
173
- }
174
-
175
-
176
- // Payment info
177
- $data["payment"] = array();
178
- $payment = $order->getPayment();
179
- $payment_info = $payment->getMethodInstance()->getInfoInstance();
180
- $data["payment"]["cc_type"] = $payment_info->getCcType();
181
- $data["payment"]["cc_number"] = $payment_info->getCcNumber();
182
- $data["payment"]["cc_exp_mo"] = $payment_info->getCcExpMonth();
183
- $data["payment"]["cc_exp_yr"] = $payment_info->getCcExpYear();
184
- $data["payment"]["cc_name_on_card"] = $this->_escapeQuote($payment_info->getCcOwner());
185
-
186
-
187
- return json_encode($data);
188
-
189
  }
190
 
191
  private function _escapeQuote($str){
@@ -220,7 +188,7 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
220
  }
221
 
222
  public function getLoginATTR(){
223
- return "personal_info[email] personal_info[first_name] personal_info[last_name]";
224
  }
225
 
226
  private function getReferralCode(){
@@ -262,7 +230,7 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
262
  }
263
 
264
  public function getCheckoutAttr(){
265
- return "personal_info[email] personal_info[first_name] personal_info[last_name] address.billing[street] address.billing[street2] address.billing[city] address.billing[state] address.billing[zip] address.billing[phone] payment[cc_type] payment[cc_number] payment[cc_exp_mo] payment[cc_exp_yr] payment[cc_verify] payment[cc_name_on_card]";
266
  }
267
 
268
  public function getChalj($method=null, $quote=null) {
@@ -367,8 +335,13 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
367
  $isValid = $isValid && $claimValid;
368
 
369
  if (!$claimValid) {
370
- $response["error"].= " ";
371
- $response["error"].= "Claim for attribute " . $attr ." didn't verify";
 
 
 
 
 
372
  }
373
  }
374
  $response["isValid"] = $isValid;
51
  public function getCreateOneIdAttrs() {
52
  $customer = Mage::getSingleton('customer/session')->getCustomer();
53
  $data = array(
54
+ "name" => array(
55
+ "first_name" => $this->_escapeQuote($customer->getFirstname()),
56
+ "last_name" => $this->_escapeQuote($customer->getLastname())
57
+ ),
58
+ "email" => array(
59
+ "email" => $this->_escapeQuote($customer->getEmail())
60
  )
61
  );
62
 
65
  if ($customerAddressId){
66
  $address = Mage::getModel('customer/address')->load($customerAddressId);
67
  $street = $address->getStreet();
68
+ $data["address"] = array(
69
+ "street" => $this->_escapeQuote( $street[0]),
70
+ "street2" => count($street) == 2 ? $this->_escapeQuote($street[1]) : "",
71
+ "state" => $address->getRegionId(),
72
+ "city" => $this->_escapeQuote($address->getCity()),
73
+ "zip" => $address->getPostcode(),
74
+ "phone" => $address->getTelephone()
75
+ );
76
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
 
79
  $orders = Mage::getResourceModel('sales/order_collection')
100
  }
101
  }
102
 
 
 
103
  return json_encode($data);
104
  }
105
 
119
 
120
  public function getCreateOneIdAttrsFromOrder($order) {
121
  $data = array(
122
+ "name" => array(
123
  "first_name" => $this->_escapeQuote($order->getCustomerFirstname()),
124
+ "last_name" => $this->_escapeQuote($order->getCustomerLastname())
125
+ ),
126
+ "email" => array(
127
  "email" => $this->_escapeQuote($order->getCustomerEmail())
128
  )
129
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
+ $address = $order->getBillingAddress();
132
+
133
+ $data["address"] = array();
134
  $street = $address->getStreet();
135
+ $data["address"] = array(
136
+ "street" => $this->_escapeQuote($street[0]),
137
+ "street2" => count($street) == 2 ? $this->_escapeQuote($street[1]) : "",
138
+ "state" => $address->getRegionId(),
139
+ "city" => $this->_escapeQuote($address->getCity()),
140
+ "zip" => $address->getPostcode(),
141
+ "phone" => $address->getTelephone()
142
+ );
143
+
144
+
145
+ // Payment info
146
+ $data["payment"] = array();
147
+ $payment = $order->getPayment();
148
+ $payment_info = $payment->getMethodInstance()->getInfoInstance();
149
+ $data["payment"]["cc_type"] = $payment_info->getCcType();
150
+ $data["payment"]["cc_number"] = $payment_info->getCcNumber();
151
+ $data["payment"]["cc_exp_mo"] = $payment_info->getCcExpMonth();
152
+ $data["payment"]["cc_exp_yr"] = $payment_info->getCcExpYear();
153
+ $data["payment"]["cc_name_on_card"] = $this->_escapeQuote($payment_info->getCcOwner());
154
+
155
+
156
+ return json_encode($data);
157
  }
158
 
159
  private function _escapeQuote($str){
188
  }
189
 
190
  public function getLoginATTR(){
191
+ return "email[email] name[first_name] name[last_name]";
192
  }
193
 
194
  private function getReferralCode(){
230
  }
231
 
232
  public function getCheckoutAttr(){
233
+ return "email[email] name[first_name] name[last_name] address[street] address[street2] address[city] address[state] address[zip] address[phone] payment[cc_type] payment[cc_number] payment[cc_exp_mo] payment[cc_exp_yr] payment[cc_verify] payment[cc_name_on_card]";
234
  }
235
 
236
  public function getChalj($method=null, $quote=null) {
335
  $isValid = $isValid && $claimValid;
336
 
337
  if (!$claimValid) {
338
+ if ($attr == "email"){
339
+ $response["error"]= "Sorry, your email address must be verified by OneID. Please visit your control panel.";
340
+ }
341
+ else{
342
+ $response["error"]= "Sorry, we could not verify " . $attr;
343
+ }
344
+ break;
345
  }
346
  }
347
  $response["isValid"] = $isValid;
app/code/community/OneID/Connector/controllers/ConnectorController.php CHANGED
@@ -75,20 +75,14 @@ class OneID_Connector_ConnectorController extends Mage_Core_Controller_Front_Act
75
  }
76
  }
77
  else {
78
-
79
- // This is same as email for now
80
-
81
- $infoCard = $decoded["attr"]["personal_info"];
82
-
83
- //TODO: don't assume default card here.
84
- $email = $infoCard['email'];
85
 
86
  if (!$email){
87
- $url = $this->_getLoginPostRedirect();
88
- $msg = "Sorry, a verified email address supplied by OneID is required to login!";
89
- $response = array("error" => $msg, "errorcode" => "-999");
90
- Mage::app()->getResponse()->setBody(json_encode($response));
91
- return;
92
  }
93
 
94
 
@@ -99,19 +93,19 @@ class OneID_Connector_ConnectorController extends Mage_Core_Controller_Front_Act
99
  if ($customer && $customer->getId()) { // User exists and is linked by OneID.
100
 
101
  if (!$customer->getId()) { // If customer does not exist, create one
102
- $customer->setData('firstname', $infoCard['first_name']);
103
- $customer->setData('lastname', $infoCard['last_name']);
104
  $customer->setData('email', $email);
105
  $customer->setData("oneid_uid", $uid);
106
  $customer->save();
107
  }
108
  $saveAcct=false;
109
  if (!$customer->getFirstname()) {
110
- $customer->setData('firstname', $infoCard['first_name']);
111
  $saveAcct=true;
112
  }
113
  if (!$customer->getLastname()){
114
- $customer->setData('lastname', $infoCard['last_name']);
115
  $saveAcct=true;
116
  }
117
  if (!$customer->getOneidUid()){
@@ -141,8 +135,8 @@ class OneID_Connector_ConnectorController extends Mage_Core_Controller_Front_Act
141
  else{
142
  // Create new account, with data provided by OneID.
143
 
144
- $customer->setData('firstname', $infoCard['first_name']);
145
- $customer->setData('lastname', $infoCard['last_name']);
146
  $customer->setData('email', $email);
147
  $customer->setData("oneid_uid", $uid);
148
  $customer->save();
75
  }
76
  }
77
  else {
78
+ $email = $decoded["attr"]['email']["email"];
 
 
 
 
 
 
79
 
80
  if (!$email){
81
+ $url = $this->_getLoginPostRedirect();
82
+ $msg = "Sorry, a verified email address supplied by OneID is required to login!";
83
+ $response = array("error" => $msg, "errorcode" => "-999");
84
+ Mage::app()->getResponse()->setBody(json_encode($response));
85
+ return;
86
  }
87
 
88
 
93
  if ($customer && $customer->getId()) { // User exists and is linked by OneID.
94
 
95
  if (!$customer->getId()) { // If customer does not exist, create one
96
+ $customer->setData('firstname', $decoded["attr"]["name"]['first_name']);
97
+ $customer->setData('lastname', $decoded["attr"]["name"]['last_name']);
98
  $customer->setData('email', $email);
99
  $customer->setData("oneid_uid", $uid);
100
  $customer->save();
101
  }
102
  $saveAcct=false;
103
  if (!$customer->getFirstname()) {
104
+ $customer->setData('firstname', $decoded["attr"]["name"]['first_name']);
105
  $saveAcct=true;
106
  }
107
  if (!$customer->getLastname()){
108
+ $customer->setData('lastname', $decoded["attr"]["name"]['last_name']);
109
  $saveAcct=true;
110
  }
111
  if (!$customer->getOneidUid()){
135
  else{
136
  // Create new account, with data provided by OneID.
137
 
138
+ $customer->setData('firstname', $decoded["attr"]["name"]['first_name']);
139
+ $customer->setData('lastname', $decoded["attr"]["name"]['last_name']);
140
  $customer->setData('email', $email);
141
  $customer->setData("oneid_uid", $uid);
142
  $customer->save();
app/design/frontend/base/default/template/oneid/block/login.phtml CHANGED
@@ -1,6 +1,4 @@
1
  <div id="oneid-login-form-button" class="oneid-only oneid-login-container" style="float: right; margin-top: -7px; margin-right: 5px; display: block;" ></div>
2
  <script type="text/javascript">
3
- OneIdExtern.registerApiReadyFunction(function(){
4
  OneId.loginButton(OneId.$("#oneid-login-form-button"), { "CHALJ" : <?php echo $this->helper("OneID")->getLoginCHALJ() ?> });
5
- });
6
  </script>
1
  <div id="oneid-login-form-button" class="oneid-only oneid-login-container" style="float: right; margin-top: -7px; margin-right: 5px; display: block;" ></div>
2
  <script type="text/javascript">
 
3
  OneId.loginButton(OneId.$("#oneid-login-form-button"), { "CHALJ" : <?php echo $this->helper("OneID")->getLoginCHALJ() ?> });
 
4
  </script>
app/design/frontend/base/default/template/oneid/block/page/html/footer.phtml CHANGED
@@ -92,6 +92,20 @@
92
  return "";
93
  });
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  // Show any items that require the API to be ready, but not that oneid be enabled.
96
  OneId.$(".oneid-api-ready:not(.oneid-only)").show();
97
 
92
  return "";
93
  });
94
 
95
+ OneIdUtil.registerAttributeMappingFunction("address[state]", false, function(state_val){
96
+ return state_map[state_val];
97
+ });
98
+
99
+ OneIdUtil.registerAttributeMappingFunction("address[state]", true, function(state_val){
100
+ for (state in state_map){
101
+ if (state_map[state] == state_val) {
102
+ return state;
103
+ }
104
+ }
105
+ return "";
106
+ });
107
+
108
+
109
  // Show any items that require the API to be ready, but not that oneid be enabled.
110
  OneId.$(".oneid-api-ready:not(.oneid-only)").show();
111
 
app/design/frontend/base/default/template/oneid/checkout/oneid_onepage.phtml CHANGED
@@ -47,10 +47,10 @@ $_quote = Mage::getModel('checkout/cart')->getQuote();
47
  if (billingAddressPostData["formData"][missing_field_id]) {
48
  oneidAttr = billingAddressPostData["formData"][missing_field_id]["oneid_attribute"];
49
  }
50
- else if (shippingAddressPostData["formData"][missing_field_id]){
51
  oneidAttr = shippingAddressPostData["formData"][missing_field_id]["oneid_attribute"];
52
  }
53
- else if (paymentPostData["formData"][missing_field_id]) {
54
  oneidAttr = paymentPostData["formData"][missing_field_id]["oneid_attribute"];
55
  }
56
 
@@ -199,19 +199,19 @@ $_quote = Mage::getModel('checkout/cart')->getQuote();
199
 
200
  OneIdExtern.registerApiReadyFunction(function(){
201
  // insert buttons
202
- var loginCtr = '<div class="oneid-only"><div id="oneid-checkout-login-form" class="oneid-only oneid-login-container" style="" ></div></div>';
203
  OneId.$(loginCtr).insertAfter("#checkout-step-login .col-2 .buttons-set .button");
204
 
205
  // billing
206
- var billingCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-billing" style="float:right; margin-top:-7px; margin-right:5px;"></div>';
207
  OneId.$(billingCtr).insertAfter("#co-billing-form .button");
208
 
209
  // billing
210
- var billingCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-shipping" style="float:right; margin-top:-7px; margin-right:5px;"></div>';
211
- OneId.$(billingCtr).insertAfter("#co-shipping-form .button");
212
 
213
  //payment
214
- var paymentCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-payment" style="float:right; margin-top:-7px; margin-right:5px;"></div>'
215
  OneId.$(paymentCtr).insertAfter("#checkout-step-payment .button");
216
 
217
 
@@ -421,43 +421,44 @@ $_quote = Mage::getModel('checkout/cart')->getQuote();
421
  OneId.$("#billing\\:confirm_password").removeClass("required-entry");
422
  OneId.$("#checkout-step-review").show();
423
 
424
-
425
- shippingMethod.onSave = function(transport){
426
- if (transport && transport.responseText){
427
- try{
428
- response = eval('(' + transport.responseText + ')');
 
 
 
 
429
  }
430
- catch (e) {
431
- response = {};
 
 
432
  }
433
- }
434
 
435
- if (response.error) {
436
- alert(response.message);
437
- return false;
438
- }
439
 
440
- if (response.update_section) {
441
- $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
442
- }
443
 
444
- payment.initWhatIsCvvListeners();
445
-
446
-
447
- OneIdForm.fill(paymentPostData, "", function(completed){
448
- });
449
-
450
- if (response.goto_section) {
451
- checkout.gotoSection(response.goto_section);
452
- checkout.reloadProgressBlock();
453
- return;
454
- }
455
 
456
- if (response.payment_methods_html) {
457
- $('checkout-payment-method-load').update(response.payment_methods_html);
458
- }
 
 
 
 
 
459
 
460
- checkout.setShippingMethod();
 
 
 
 
 
461
  }
462
 
463
  var autoFillFormData = OneId.$.extend({}, billingAddressPostData.formData, paymentPostData.formData);
47
  if (billingAddressPostData["formData"][missing_field_id]) {
48
  oneidAttr = billingAddressPostData["formData"][missing_field_id]["oneid_attribute"];
49
  }
50
+ else if (typeof shippingAddressPostData != "undefined" && shippingAddressPostData["formData"][missing_field_id]){
51
  oneidAttr = shippingAddressPostData["formData"][missing_field_id]["oneid_attribute"];
52
  }
53
+ else if (typeof paymentPostData != "undefined" && paymentPostData["formData"][missing_field_id]) {
54
  oneidAttr = paymentPostData["formData"][missing_field_id]["oneid_attribute"];
55
  }
56
 
199
 
200
  OneIdExtern.registerApiReadyFunction(function(){
201
  // insert buttons
202
+ var loginCtr = '<div class="oneid-only" style="margin-top:25px;"><div id="oneid-checkout-login-form" class="oneid-only oneid-login-container" style="" ></div></div>';
203
  OneId.$(loginCtr).insertAfter("#checkout-step-login .col-2 .buttons-set .button");
204
 
205
  // billing
206
+ var billingCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-billing" style="float:right;"></div>';
207
  OneId.$(billingCtr).insertAfter("#co-billing-form .button");
208
 
209
  // billing
210
+ var shippingCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-shipping" style="float:right;"></div>';
211
+ OneId.$(shippingCtr).insertAfter("#co-shipping-form .button");
212
 
213
  //payment
214
+ var paymentCtr = '<div name="AutoFill with OneID" class="oneid-only oneid-formfill-payment" style="float:right;"></div>'
215
  OneId.$(paymentCtr).insertAfter("#checkout-step-payment .button");
216
 
217
 
421
  OneId.$("#billing\\:confirm_password").removeClass("required-entry");
422
  OneId.$("#checkout-step-review").show();
423
 
424
+ if (typeof shippingMethod != "undefined"){
425
+ shippingMethod.onSave = function(transport){
426
+ if (transport && transport.responseText){
427
+ try{
428
+ response = eval('(' + transport.responseText + ')');
429
+ }
430
+ catch (e) {
431
+ response = {};
432
+ }
433
  }
434
+
435
+ if (response.error) {
436
+ alert(response.message);
437
+ return false;
438
  }
 
439
 
440
+ if (response.update_section) {
441
+ $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
442
+ }
 
443
 
444
+ payment.initWhatIsCvvListeners();
 
 
445
 
 
 
 
 
 
 
 
 
 
 
 
446
 
447
+ OneIdForm.fill(paymentPostData, "", function(completed){
448
+ });
449
+
450
+ if (response.goto_section) {
451
+ checkout.gotoSection(response.goto_section);
452
+ checkout.reloadProgressBlock();
453
+ return;
454
+ }
455
 
456
+ if (response.payment_methods_html) {
457
+ $('checkout-payment-method-load').update(response.payment_methods_html);
458
+ }
459
+
460
+ checkout.setShippingMethod();
461
+ }
462
  }
463
 
464
  var autoFillFormData = OneId.$.extend({}, billingAddressPostData.formData, paymentPostData.formData);
app/design/frontend/base/default/template/oneid/checkout/onepage/link.phtml CHANGED
@@ -1,5 +1,10 @@
1
  <?php if ($this->isPossibleOnepageCheckout()):?>
2
  <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
3
  <br/>
4
- <button type="button" style="margin-top: 5px;" title="<?php echo $this->__('Check out with OneID') ?>" class="oneid-only button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>?autoFill=true';"><img src="<?php echo $this->helper('OneID')->getEndPoint()?>/images/checkout_large.png"></button>
 
 
 
 
 
5
  <?php endif?>
1
  <?php if ($this->isPossibleOnepageCheckout()):?>
2
  <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
3
  <br/>
4
+ <button type="button" style="margin-top: 5px;" title="<?php echo $this->__('Check out with OneID') ?>" class="oneid-only button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>?autoFill=true';"><img id="oneid_checkout_button" src="<?php echo $this->helper('OneID')->getEndPoint()?>/images/oneid_checkout@2x.png" style="width:136px; height:24px;"></button>
5
+ <script type="text/javascript">
6
+ OneIdExtern.registerApiReadyFunction(function(){
7
+ OneIdUtil.imageHighlight("#oneid_checkout_button");
8
+ });
9
+ </script>
10
  <?php endif?>
app/design/frontend/base/default/template/oneid/customer/account/dashboard.phtml CHANGED
@@ -22,13 +22,10 @@
22
  <p><?php echo $this->__('Tired of remembering your username and password? Use OneID to quickly and safely sign into this website next time. It’s free!') ?></p>
23
  <div id="oneid-link-your-oneid"></div>
24
  <script type="text/javascript">
25
- OneIdExtern.registerApiReadyFunction(function(){
26
- OneId.loginButton(OneId.$("#oneid-link-your-oneid"),
27
- {
28
- "oneid_user_link" : true,
29
- "user_data" : <?php echo $this->helper("OneID")->getCreateOneIdAttrs() ?>,
30
- "challenge" : <?php echo $this->helper("OneID")->getLinkCHALJ() ?>
31
- });
32
  });
33
  </script>
34
  </div>
@@ -38,8 +35,13 @@
38
  </p>
39
  <br/>
40
  <a href='<?php echo Mage::getUrl("oneid/connector/removeOneid/")?>'>
41
- <img src="<?php echo $this->helper("OneID")->getEndPoint()?>/images/oneid_unlink.png"/>
42
- </a>
 
 
 
 
 
43
 
44
  <?php endif; ?>
45
  </div>
22
  <p><?php echo $this->__('Tired of remembering your username and password? Use OneID to quickly and safely sign into this website next time. It’s free!') ?></p>
23
  <div id="oneid-link-your-oneid"></div>
24
  <script type="text/javascript">
25
+ OneId.loginButton("#oneid-link-your-oneid",{
26
+ "oneid_user_link" : true,
27
+ "user_data" : <?php echo $this->helper("OneID")->getCreateOneIdAttrs() ?>,
28
+ "challenge" : <?php echo $this->helper("OneID")->getLinkCHALJ() ?>
 
 
 
29
  });
30
  </script>
31
  </div>
35
  </p>
36
  <br/>
37
  <a href='<?php echo Mage::getUrl("oneid/connector/removeOneid/")?>'>
38
+ <img id="oneid_unlink" src="<?php echo $this->helper("OneID")->getEndPoint()?>/images/oneid_unlink@2x.png" style="width:136px; height:24px;"/>
39
+ </a>
40
+ <script type="text/javascript">
41
+ OneIdExtern.registerApiReadyFunction(function(){
42
+ OneIdUtil.imageHighlight("#oneid_unlink");
43
+ });
44
+ </script>
45
 
46
  <?php endif; ?>
47
  </div>
app/design/frontend/base/default/template/oneid/oneid/signin.phtml CHANGED
@@ -1,6 +1,4 @@
1
- <div id="oneid-login-form-button" class="oneid-only oneid-login-container" style="float: left; margin-top: -7px; margin-right: 5px; display: block;" ></div>
2
  <script type="text/javascript">
3
- OneIdExtern.registerApiReadyFunction(function(){
4
- OneId.loginButton(OneId.$("#oneid-login-form-button"), { "challenge" : <?php echo $this->helper("OneID")->getLoginCHALJ() ?> });
5
- });
6
  </script>
1
+ <div id="oneid-login-form-button" class="oneid-only oneid-login-container" style="float: left; display: block;" ></div>
2
  <script type="text/javascript">
3
+ OneId.loginButton("#oneid-login-form-button", { "challenge" : <?php echo $this->helper("OneID")->getLoginCHALJ() ?> });
 
 
4
  </script>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OneID</name>
4
- <version>1.0.12</version>
5
  <stability>stable</stability>
6
  <license>Apache Software License (ASL)</license>
7
  <channel>community</channel>
@@ -21,11 +21,13 @@ Privacy: OneID does not track any user behavior &#x2013; and certainly won&#x201
21
  Security: OneID secures customer information using three separate cryptographic combinations across multiple devices.&#xD;
22
  Convenience: OneID removes the hassle of having to remember user names and passwords.&#xD;
23
  And along with all those great benefits to you and your users, with this plugin you'll also get to use OneID to log into and administer your WordPress site using your OneID.</description>
24
- <notes>FIx issue with OneID checkout and missing fields.</notes>
 
 
25
  <authors><author><name>OneID</name><user>bpk_oneid</user><email>bpk@oneid.com</email></author></authors>
26
- <date>2013-02-14</date>
27
- <time>15:43:51</time>
28
- <contents><target name="magecommunity"><dir name="OneID"><dir name="Connector"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Success.php" hash="94f38f858a45304c10138c3a1b265490"/></dir></dir><file name="Signin.php" hash="454d819e284f02ef5e2ae8e57d714918"/></dir><dir name="Helper"><file name="Data.php" hash="6d702e8fcf10c58de1ce6aa457dca427"/></dir><dir name="controllers"><file name="AccountController.php" hash="2401a0a519aac21bebeee77233fd0b03"/><file name="ConnectorController.php" hash="ea726d60099a66c2e63ad27fa1af5b8c"/><file name="OnepageController.php" hash="78d2dbae1606057fb3544296351898d8"/></dir><dir name="etc"><file name="config.xml" hash="8c3246ec55c0f60669fe484abbc1a04b"/><file name="system.xml" hash="d47ac462cf6efd529aca557fad1b890e"/></dir><dir name="sql"><dir name="oneid_connector_setup"><file name="mysql4-install-0.1.0.php" hash="cad7569ee96103d087bf077661c1cafe"/></dir></dir></dir><file name="README.txt" hash="fc7ce5e9b6b09f43a8776ef1c05d3f11"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="oneid"><dir name="block"><file name="login.phtml" hash="787f58873550105c3318baa8b0b77ded"/><dir name="page"><dir name="html"><file name="footer.phtml" hash="c4059028bd7db7b0f0d3b157157cea60"/><file name="head.phtml" hash="9dd7e46b5c3ce6eb4e92ef6738d55dc6"/><file name="newjavascript.js" hash="c9e0fa9a4851c0070614f605ebac8257"/></dir></dir></dir><dir name="checkout"><file name="cart.phtml" hash="4b02b99a1bbc8ad14a4452775df49ef2"/><file name="oneid_onepage.phtml" hash="6e8bef5280dbc0758695c92636b7ba6b"/><dir name="onepage"><file name="link.phtml" hash="c38a01ac21b86b2cd2b923f99b0d32f9"/><dir name="review"><file name="button.phtml" hash="7646991c5b937654771fa78627e49c95"/></dir></dir><dir name="success"><file name="oneid_create.phtml" hash="653fee23d3059609ae5330f0d6c84d34"/></dir></dir><dir name="customer"><dir name="account"><file name="dashboard.phtml" hash="55b1ec9a6860486943e2e4fb8d81aede"/></dir><dir name="form"><file name="edit.phtml" hash="23eea7e7e29cb36c3c5885d7775de528"/><file name="forgotpassword.phtml" hash="cd02367e8214930140d80a7834e0f4a4"/></dir></dir><dir name="form"><file name="traditional_login.phtml" hash="597e5d7b99eb7dcfb8f5a63185ce5e38"/></dir><dir name="oneid"><file name="signin.phtml" hash="1aeb1ac58db061d9649b92ee25b2ed20"/></dir></dir></dir><dir name="layout"><file name="OneID.xml" hash="a394b3f62e225364b5053160c845d38c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="oneid.css" hash="5e44748f801c63012a57995a0c1fca80"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oneid_Connector.xml" hash="1f42a132067a01e1056d5c514d96507a"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.0.0</min><max>5.4.10</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OneID</name>
4
+ <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license>Apache Software License (ASL)</license>
7
  <channel>community</channel>
21
  Security: OneID secures customer information using three separate cryptographic combinations across multiple devices.&#xD;
22
  Convenience: OneID removes the hassle of having to remember user names and passwords.&#xD;
23
  And along with all those great benefits to you and your users, with this plugin you'll also get to use OneID to log into and administer your WordPress site using your OneID.</description>
24
+ <notes>Update Magento Commerce Extension to work with OneID 2.0. &#xD;
25
+ &#xD;
26
+ Faster Button Drawing, and newer attribute syntax.</notes>
27
  <authors><author><name>OneID</name><user>bpk_oneid</user><email>bpk@oneid.com</email></author></authors>
28
+ <date>2013-06-11</date>
29
+ <time>16:09:27</time>
30
+ <contents><target name="magecommunity"><dir name="OneID"><dir name="Connector"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Success.php" hash="94f38f858a45304c10138c3a1b265490"/></dir></dir><file name="Signin.php" hash="454d819e284f02ef5e2ae8e57d714918"/></dir><dir name="Helper"><file name="Data.php" hash="a7bbc23e93533d5226f200f9e5d681a4"/></dir><dir name="controllers"><file name="AccountController.php" hash="2401a0a519aac21bebeee77233fd0b03"/><file name="ConnectorController.php" hash="a7703df27f2c28888c71482bf3cc4a8f"/><file name="OnepageController.php" hash="78d2dbae1606057fb3544296351898d8"/></dir><dir name="etc"><file name="config.xml" hash="8c3246ec55c0f60669fe484abbc1a04b"/><file name="system.xml" hash="d47ac462cf6efd529aca557fad1b890e"/></dir><dir name="sql"><dir name="oneid_connector_setup"><file name="mysql4-install-0.1.0.php" hash="cad7569ee96103d087bf077661c1cafe"/></dir></dir></dir><file name="README.txt" hash="fc7ce5e9b6b09f43a8776ef1c05d3f11"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="oneid"><dir name="block"><file name="login.phtml" hash="858cf26fe6aebeeb2817a0e2d806bb70"/><dir name="page"><dir name="html"><file name="footer.phtml" hash="dc3c0e4038c6e517adcae82ee81f6242"/><file name="head.phtml" hash="9dd7e46b5c3ce6eb4e92ef6738d55dc6"/><file name="newjavascript.js" hash="c9e0fa9a4851c0070614f605ebac8257"/></dir></dir></dir><dir name="checkout"><file name="cart.phtml" hash="4b02b99a1bbc8ad14a4452775df49ef2"/><file name="oneid_onepage.phtml" hash="72c05af78959e6191171a3787061b20a"/><dir name="onepage"><file name="link.phtml" hash="61cbdf68fcbdfcc1de037b23eb42ccd8"/><dir name="review"><file name="button.phtml" hash="7646991c5b937654771fa78627e49c95"/></dir></dir><dir name="success"><file name="oneid_create.phtml" hash="653fee23d3059609ae5330f0d6c84d34"/></dir></dir><dir name="customer"><dir name="account"><file name="dashboard.phtml" hash="2c11f754f8b8130280f60c7a91090790"/></dir><dir name="form"><file name="edit.phtml" hash="23eea7e7e29cb36c3c5885d7775de528"/><file name="forgotpassword.phtml" hash="cd02367e8214930140d80a7834e0f4a4"/></dir></dir><dir name="form"><file name="traditional_login.phtml" hash="597e5d7b99eb7dcfb8f5a63185ce5e38"/></dir><dir name="oneid"><file name="signin.phtml" hash="66584827e4ebcc25e439200fd0addc67"/></dir></dir></dir><dir name="layout"><file name="OneID.xml" hash="a394b3f62e225364b5053160c845d38c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="oneid.css" hash="5e44748f801c63012a57995a0c1fca80"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oneid_Connector.xml" hash="1f42a132067a01e1056d5c514d96507a"/></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.0.0</min><max>5.4.10</max></php></required></dependencies>
33
  </package>