Ensygnia_Onescan - Version 1.0.12

Version Notes

Version 1.0.12 of the Onescan Payment Extension.

Changelog
---------------

1.0.12
Check Magento database to determine whether country of delivery requires state/region to be present.

Added a new field to the configuration menu that allows the Magento store administrator to specify the message that is sent to the Onescanner's device if the state/region is not recognised.

In some circumstances, the wrong delivery method was being stored in the Magento database

1.0.11
Potential installation issue with some Magento instances fixed.

1.0.10
Purchase failure where delivery is to a country in which Magento requires state/region information to be present - fixed.

Configurable error message added if the Magento store cannot deliver the Onescanner's order to the address supplied by Onescan.

The incorrect URL was being used for the redirect after a successful order in some Magento store configurations - fixed.

1.0.9
Under certain circumstances, shipping charges were being added twice - fixed.

1.0.8
Incorrect country code used in some Magento installations - fixed.

Compatibility issue reported when installing into latest version of Magento - fixed.

1.0.7
Prevented jQuery conflict for older versions of Magento

1.0.6
Potential installation issue with some Magento instances fixed.

1.0.5
Allows merchant to specify the image that will be displayed on the device during a purchase.

Under certain circumstances the tax calculation was rounding incorrectly making a £0.01 difference between the actual payment and what was recorded in Magento - fixed.

1.0.4
Incorrect compatibility information shown on Magento Connect - fixed.

1.0.3
Corrected error in layout file preventing Onescan logo from being shown on the admin pages.

1.0.2
Incorrect postage applied where minimum order value applies. Fixed.

Tax missing from individual items in admin sales/orders list. Fixed.

Orders not marked as paid and invoice not created in admin. Fixed.

Onescan was being listed as payment method option on the standard checkout page, resulting in orders potentially being placed with no payment being taken. If a customer uses Onescan to pay, they never get to that part of the checkout process so it makes no sense to have Onescan listed as a payment method there. This has been removed so now the only way for Onescan to be selected as a payment method is for the padlock to be scanned as intended.

1.0.1
Fixed potential installation problem.

1.0.0
Initial version.

Download this release

Release Info

Developer Ensygnia
Extension Ensygnia_Onescan
Version 1.0.12
Comparing to
See all releases


Code changes from version 1.0.11 to 1.0.12

app/code/local/Ensygnia/Onescan/Model/Callback/Purchase.php CHANGED
@@ -23,6 +23,7 @@
23
  return 'onescan/config_purchase';
24
  }
25
 
 
26
  public function handle() {
27
  $settings = $this->getConfig()->getSettings();
28
  if (isset($_GET['basket'])) {
@@ -30,6 +31,7 @@
30
  }
31
 
32
  $onescanMessage = Onescan::ReadMessage($settings);
 
33
 
34
  $purchaseProcess = new OnescanPurchaseProcess();
35
  $nextAction = $purchaseProcess->DecodePurchaseMessage($onescanMessage);
@@ -64,6 +66,7 @@
64
  break;
65
  }
66
  $responseMessage = $purchaseProcess->EncodeOutcome();
 
67
 
68
  Onescan::SendMessage($responseMessage,$settings);
69
  return parent::handle();
@@ -72,23 +75,25 @@
72
  /// <summary>
73
  /// Build some extra information about further charges.
74
  /// </summary>
75
- public function BuildAdditionalCharges($process) {
76
  $additionalChargesContext = $process->AdditionalChargesContext;
77
  $requires=$process->PurchaseInfo->Requires;
78
  $purchaseCharges = new AdditionalChargesPayload();
79
 
80
  if ($requires->DeliveryOptions && !empty($additionalChargesContext->DeliveryAddress)){
81
- if(!$this->AddDeliveryCharges($additionalChargesContext->DeliveryAddress,$purchaseCharges,$process)){
 
82
  $purchaseCharges->AddressNotSupported=1;
83
- $purchaseCharges->AddressNotSupportedReason=Mage::getStoreConfig('onescantab/general/onescan_cannot-deliver-message');
84
  }
85
  }
86
 
87
- if ($requires->Surcharges && !empty($additionalChargesContext->PaymentMethod)){
 
88
  if(!$this->AddPaymentMethodCharges($additionalChargesContext->PaymentMethod,$purchaseCharges,$process)){
89
  //REPORT SURCHARGES ERROR TO DEVICE;
90
  }
91
- }
92
 
93
  return $purchaseCharges;
94
  }
@@ -96,7 +101,8 @@
96
  /// <summary>
97
  /// Add charges for the specified payment method.
98
  /// </summary>
99
- public function AddPaymentMethodCharges($paymentMethod,$purchaseCharges,$process) {
 
100
  switch ($paymentMethod->PaymentMethodType) {
101
  case 'CreditCard':
102
  $this->HandleCreditCardCharges($paymentMethod,$purchaseCharges,$process);
@@ -111,7 +117,8 @@
111
  /// <summary>
112
  /// Handle charges for the onescan test card.
113
  /// </summary>
114
- public function HandlePlayCardCharges($paymentMethod,$purchaseCharges,$process) {
 
115
  $cardDetails = $paymentMethod->CardInformation;
116
 
117
  $purchaseCharges->PaymentMethodCharge = new PaymentMethodCharge();
@@ -126,7 +133,8 @@
126
  /// <summary>
127
  /// Handle charges for credit cards
128
  /// </summary>
129
- public function HandleCreditCardCharges($paymentMethod,$purchaseCharges,$process) {
 
130
  $cardDetails = $paymentMethod->CardInformation;
131
 
132
  if ($cardDetails->PaymentSystemCode == "VISA") {
@@ -146,80 +154,37 @@
146
  /// <summary>
147
  /// Add delivery charges for the specified address.
148
  /// </summary>
149
- public function AddDeliveryCharges($address,$purchaseCharges,$process) {
150
- $onescanModel=Mage::getModel('onescan/sessiondata');
151
- $onescanData = $onescanModel->getCollection();
152
- $onescanData->addFieldToFilter('sessionid', array('like' => $process->SessionState()->SessionID));
153
- $onescanData->load();
154
- $sessionData=$onescanData->getData();
155
- $quoteid=$sessionData[0]['quoteid'];
156
-
157
- $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
158
- $cart->setQuoteId($quoteid);
159
- $quote=$cart->getQuote();
160
-
161
- /*if ($quote->getCouponCode() != '') {
162
- $c = Mage::getResourceModel('salesrule/rule_collection');
163
- $c->getSelect()->where("code=?", $quote->getCouponCode());
164
- foreach ($c->getItems() as $item) {
165
- $coupon = $item;
166
- }
167
- if ($coupon->getSimpleFreeShipping() > 0) {
168
- $quote->getShippingAddress()->setShippingMethod($this->_shippingCode)->save();
169
- return true;
170
- }
171
- }*/
172
- try {
173
- if ($quote->getShippingAddress()->getCountryId() == '') {
174
- $quote->getShippingAddress()->setCountryId($address->CountryCode);
175
- }
176
- if ($quote->getShippingAddress()->getPostcode() == '') {
177
- $quote->getShippingAddress()->setPostcode($address->Postcode);
178
- }
179
- $quote->getShippingAddress()->collectTotals();
180
- $quote->getShippingAddress()->setCollectShippingRates(true);
181
- $quote->getShippingAddress()->collectShippingRates();
182
- $rates = $quote->getShippingAddress()->getShippingRatesCollection();
183
- }
184
- catch (Mage_Core_Exception $e) {
185
- Mage::getSingleton('checkout/session')->addError($e->getMessage());
186
- }
187
- catch (Exception $e) {
188
- Mage::getSingleton('checkout/session')->addException($e, Mage::helper('checkout')->__('Load customer quote error'));
189
- }
190
 
191
- $allowedRates=array();
192
- $lowestPrice=99999;
193
- foreach ($rates as $rate){
194
- $rateCode=$rate->getCode();
195
- if($quote->getShippingAddress()->collectShippingRates()->getShippingRateByCode($rateCode)){
196
- $allowedRates[$rateCode]=$rate; //Using $rateCode as key removes duplicates
197
- }
198
-
199
- //Set the lowest rate as the default
200
- if($rate->getPrice()<$lowestPrice){
201
- $lowestPrice=$rate->getPrice();
202
- $defaultCode=$rateCode;
203
- }
204
  }
205
 
206
- $purchaseCharges->DeliveryOptions = array();
207
  $taxCalculation = Mage::getModel('tax/calculation');
208
  $request = $taxCalculation->getRateRequest(null,null,null,$quote->getStore());
209
  $taxRateId = Mage::getStoreConfig('tax/classes/shipping_tax_class',$quote->getStore());
210
  $shippingTaxPercent = $taxCalculation->getRate($request->setProductClassId($taxRateId));
211
 
212
- $defaultIndex=0;
213
- foreach ($rates as $rate) {
 
214
  $amount=$rate->getPrice();
215
  if(is_numeric($amount)){
216
  $option=new DeliveryOption();
217
  $option->Code = $rate->getCode();
218
- $option->Description = $rate->getMethodDescription();//CheckThis
219
- if($option->Code==$defaultCode){
 
220
  $option->IsDefault = true;
221
- $defaultIndex=count($purchaseCharges->DeliveryOptions);
222
- }
223
  $option->Label = $rate->getMethodTitle();
224
  $option->Charge = new Charge();
225
  $option->Charge->TotalAmount = $amount;
@@ -230,44 +195,44 @@
230
  }
231
 
232
  if(count($purchaseCharges->DeliveryOptions)==0){
233
- //NO SHIPPING RATES AVAILABLE FOR THIS ORDER
234
- return false;
235
  }
 
 
 
 
 
 
 
 
236
 
237
- //Make sure the default rate is listed first
238
- $option=$purchaseCharges->DeliveryOptions[$defaultIndex];
239
- $purchaseCharges->DeliveryOptions[$defaultIndex]=$purchaseCharges->DeliveryOptions[0];
240
- $purchaseCharges->DeliveryOptions[0]=$option;
241
-
242
  $onescanModel->setId($sessionData[0]['sessiondata_id']);
243
  $onescanModel->setSessionid($process->SessionState()->SessionID);
244
- $onescanModel->setQuoteid($quoteid);
245
  $onescanModel->setCustomerid($sessionData[0]['customerid']);
246
- $onescanModel->setShippingmethod($option->Code);
247
- $onescanModel->setShippingamount($option->Charge->TotalAmount * 100);//Floating point numbers are being stored as integers!
248
- $onescanModel->setShippingtax($option->Charge->Tax * 100);//Floating point numbers are being stored as integers!
249
  $onescanModel->save();
250
 
251
  return true;
252
  }
253
-
254
- public function BuildPurchasePayload($sessionID) {
255
- $onescanData = Mage::getModel('onescan/sessiondata')->getCollection();
256
- $onescanData->addFieldToFilter('sessionid', array('like' => $sessionID));
257
- $onescanData->load();
258
- $sessionData=$onescanData->getData();
259
- $quoteid=$sessionData[0]['quoteid'];
260
-
261
- $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
262
- $cart->setQuoteId($quoteid);
263
-
264
- $quote=$cart->getQuote();
265
  $quote->reserveOrderId();
266
  $quote->save();
267
 
 
268
  $storeid=$quote->getStoreId();
269
  $totals=$quote->getTotals();
270
 
 
271
  $payload = new PurchasePayload();
272
  $payload->RequiresDeliveryAddress = true;
273
  $payload->MerchantName = Mage::app()->getStore()->getFrontendName();
@@ -293,27 +258,23 @@
293
  return $payload;
294
  }
295
 
296
- public function BuildOrderAccepted($process) {
297
- $sessionState=$process->SessionState();
298
- $sessionID = $sessionState->SessionID;
 
 
 
299
 
300
  $onescanData = Mage::getModel('onescan/sessiondata')->getCollection();
301
- $onescanData->addFieldToFilter('sessionid', array('like' => $process->SessionState()->SessionID));
302
  $onescanData->load();
303
  $sessionData=$onescanData->getData();
304
 
305
  $quoteid=$sessionData[0]['quoteid'];
306
  $customerid=$sessionData[0]['customerid'];
307
- $shippingMethod=$sessionData[0]['shippingmethod'];
308
- $shippingAmount=round($sessionData[0]['shippingamount'],2,PHP_ROUND_HALF_DOWN)/100;//Floating point numbers are being stored as integers!
309
- $shippingTax=round($sessionData[0]['shippingtax'],2,PHP_ROUND_HALF_DOWN)/100;//Floating point numbers are being stored as integers!
310
 
311
- $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
312
- $cart->setQuoteId($quoteid);
313
- $totals=$cart->getQuote()->getTotals();
314
- $quote=$cart->getQuote();
315
-
316
- //TEMPORARY FIX FOR BLANK FIRST AND LAST NAMES
317
  if ($process->PaymentConfirmation->FirstName=="") {
318
  $process->PaymentConfirmation->FirstName="First";
319
  }
@@ -321,11 +282,61 @@
321
  $process->PaymentConfirmation->LastName="Last";
322
  }
323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  if ($customerid) {
325
  // We are already logged in:
326
  $customer = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getWebsite()->getId())->load($customerid);
327
  $quote->assignCustomer($customer);
328
  } else {
 
329
  $loginTokens = Mage::getModel('onescan/logintokens')->getCollection();
330
  $loginTokens->addFieldToFilter('onescantoken', array('like' => $process->UserToken));
331
  $loginTokens->load();
@@ -344,6 +355,7 @@
344
  $customer->setPassword($this->randomPassword());
345
  try {
346
  $customer->save();
 
347
  if (Mage::getStoreConfig('onescantab/general/onescan_skip-confirmation') || !$customer->isConfirmationRequired()) {
348
  $customer->setConfirmation(null);
349
  $customer->save();
@@ -362,6 +374,7 @@
362
  $confirmMessage=true;
363
  }
364
 
 
365
  $newToken=Mage::getModel('onescan/logintokens');
366
  $newToken->setOnescantoken($process->UserToken);
367
  $newToken->setMagentouserid($customer->getId());
@@ -380,7 +393,8 @@
380
  catch (Mage_Core_Exception $e) {
381
  LocalDataFactory::storeObject($sessionID . '-message',$e->getMessage());
382
  }
383
- } else { //Email address recognised so redirect to login page
 
384
  LocalDataFactory::storeObject($sessionID . '-message',Mage::getStoreConfig('onescantab/general/onescan_email-exists-message'));
385
  }
386
  } else {
@@ -391,43 +405,36 @@
391
  }
392
  $quote->assignCustomer($customer);
393
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
 
395
- $addressData = array(
396
- 'firstname' => $process->PaymentConfirmation->FirstName,
397
- 'lastname' => $process->PaymentConfirmation->LastName,
398
- 'street' => $process->PaymentConfirmation->DeliveryAddress->AddressLine1 . ', ' . $process->PaymentConfirmation->DeliveryAddress->AddressLine2,
399
- 'city' => $process->PaymentConfirmation->DeliveryAddress->Town,
400
- 'postcode' => $process->PaymentConfirmation->DeliveryAddress->Postcode,
401
- 'telephone' => '0',
402
- 'country_id' => $process->PaymentConfirmation->DeliveryAddress->CountryCode,
403
- );
404
-
405
- $regions=Mage::getModel('directory/region')
406
- ->getResourceCollection()
407
- ->addCountryFilter($process->PaymentConfirmation->DeliveryAddress->CountryCode)
408
- ->load();
409
-
410
- $regionMatch=false;
411
- foreach($regions as $region){
412
- $regionName=$region->default_name;
413
- $regionId=$region->region_id;
414
- if(stripos($region->default_name,$process->PaymentConfirmation->DeliveryAddress->County)!==false ||
415
- strcasecmp($process->PaymentConfirmation->DeliveryAddress->County,$region->code)==0 ||
416
- //Use first region if county is empty
417
- $process->PaymentConfirmation->DeliveryAddress->County==''){
418
- $addressData['region']=$region->default_name;
419
- $addressData['region_id']=$region->region_id;
420
- $regionMatch=true;
421
- break;
422
- }
423
- }
424
- if(!$regionMatch){
425
- $addressData['region']=$regionName;
426
- $addressData['region_id']=$regionId;
427
- }
428
 
429
- $billingAddress = $quote->getBillingAddress()->addData($addressData);
430
- $shippingAddress = $quote->getShippingAddress()->addData($addressData);
431
  $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
432
  ->setShippingMethod($shippingMethod)
433
  ->setPaymentMethod('onescan');
@@ -449,6 +456,7 @@
449
  $quote->setIsActive(0);
450
  $quote->save();
451
 
 
452
  $service = Mage::getModel('sales/service_quote', $quote);
453
  $service->submitAll();
454
 
@@ -472,24 +480,99 @@
472
 
473
  $quote->setIsActive(false);
474
  $quote->delete();
475
-
476
- $orderAccepted = new OrderAcceptedPayload();
477
- $orderAccepted->ReceiptId = $process->ProcessId();
478
- $orderAccepted->OrderId = $order->getIncrementId();
479
-
480
- return $orderAccepted;
481
  }
482
-
483
- public function randomPassword() {
484
- $alphabet = "abcdefghijkmnopqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789";
485
- $pass='';
 
 
 
 
 
 
 
 
 
 
486
 
487
- for ($i = 0; $i < 8; $i++) {
488
- $n = rand(0, strlen($alphabet)-1);
489
- $pass .= $alphabet[$n];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  }
491
 
492
- return $pass;
 
 
 
 
 
 
 
 
 
 
493
  }
494
  }
495
  ?>
23
  return 'onescan/config_purchase';
24
  }
25
 
26
+ //Callback entry point
27
  public function handle() {
28
  $settings = $this->getConfig()->getSettings();
29
  if (isset($_GET['basket'])) {
31
  }
32
 
33
  $onescanMessage = Onescan::ReadMessage($settings);
34
+ //Mage::log('Message: ' . print_r($onescanMessage,true));
35
 
36
  $purchaseProcess = new OnescanPurchaseProcess();
37
  $nextAction = $purchaseProcess->DecodePurchaseMessage($onescanMessage);
66
  break;
67
  }
68
  $responseMessage = $purchaseProcess->EncodeOutcome();
69
+ //Mage::log('Response: ' . print_r($responseMessage,true));
70
 
71
  Onescan::SendMessage($responseMessage,$settings);
72
  return parent::handle();
75
  /// <summary>
76
  /// Build some extra information about further charges.
77
  /// </summary>
78
+ private function BuildAdditionalCharges($process) {
79
  $additionalChargesContext = $process->AdditionalChargesContext;
80
  $requires=$process->PurchaseInfo->Requires;
81
  $purchaseCharges = new AdditionalChargesPayload();
82
 
83
  if ($requires->DeliveryOptions && !empty($additionalChargesContext->DeliveryAddress)){
84
+ $deliveryChargesResponse=$this->AddDeliveryCharges($additionalChargesContext->DeliveryAddress,$purchaseCharges,$process);
85
+ if($deliveryChargesResponse!==true){
86
  $purchaseCharges->AddressNotSupported=1;
87
+ $purchaseCharges->AddressNotSupportedReason=$deliveryChargesResponse;
88
  }
89
  }
90
 
91
+ //Surcharges not yet supported
92
+ /*if ($requires->Surcharges && !empty($additionalChargesContext->PaymentMethod)){
93
  if(!$this->AddPaymentMethodCharges($additionalChargesContext->PaymentMethod,$purchaseCharges,$process)){
94
  //REPORT SURCHARGES ERROR TO DEVICE;
95
  }
96
+ }*/
97
 
98
  return $purchaseCharges;
99
  }
101
  /// <summary>
102
  /// Add charges for the specified payment method.
103
  /// </summary>
104
+ private function AddPaymentMethodCharges($paymentMethod,$purchaseCharges,$process) {
105
+ //Surcharges not yet supported, this sample function never gets called
106
  switch ($paymentMethod->PaymentMethodType) {
107
  case 'CreditCard':
108
  $this->HandleCreditCardCharges($paymentMethod,$purchaseCharges,$process);
117
  /// <summary>
118
  /// Handle charges for the onescan test card.
119
  /// </summary>
120
+ private function HandlePlayCardCharges($paymentMethod,$purchaseCharges,$process) {
121
+ //Surcharges not yet supported, this sample function never gets called
122
  $cardDetails = $paymentMethod->CardInformation;
123
 
124
  $purchaseCharges->PaymentMethodCharge = new PaymentMethodCharge();
133
  /// <summary>
134
  /// Handle charges for credit cards
135
  /// </summary>
136
+ private function HandleCreditCardCharges($paymentMethod,$purchaseCharges,$process) {
137
+ //Surcharges not yet supported, this sample function never gets called
138
  $cardDetails = $paymentMethod->CardInformation;
139
 
140
  if ($cardDetails->PaymentSystemCode == "VISA") {
154
  /// <summary>
155
  /// Add delivery charges for the specified address.
156
  /// </summary>
157
+ private function AddDeliveryCharges($address,$purchaseCharges,$process) {
158
+ //Retreive quote from database
159
+ $quote=$this->MagentoRetrieveQuote($process->SessionState()->SessionID);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
+ //Retrieve allowed shipping rates.
162
+ $shippingError=false;
163
+ $allowedRates=$this->MagentoGetShippingRates($quote,$shippingError,$address);
164
+
165
+ //If retrieval of shipping rates was unsuccessful, return the error.
166
+ if($shippingError!==false){
167
+ return $shippingError;
 
 
 
 
 
 
168
  }
169
 
170
+ //Get shipping tax rate
171
  $taxCalculation = Mage::getModel('tax/calculation');
172
  $request = $taxCalculation->getRateRequest(null,null,null,$quote->getStore());
173
  $taxRateId = Mage::getStoreConfig('tax/classes/shipping_tax_class',$quote->getStore());
174
  $shippingTaxPercent = $taxCalculation->getRate($request->setProductClassId($taxRateId));
175
 
176
+ //Build delivery options array to pass back to Onescan
177
+ $purchaseCharges->DeliveryOptions = array();
178
+ foreach ($allowedRates as $rate) {
179
  $amount=$rate->getPrice();
180
  if(is_numeric($amount)){
181
  $option=new DeliveryOption();
182
  $option->Code = $rate->getCode();
183
+ $option->Description = $rate->getMethodDescription();
184
+ //Setting default option is not yet supported in the Onescan extension
185
+ /*if($option->Code==$defaultCode){
186
  $option->IsDefault = true;
187
+ }*/
 
188
  $option->Label = $rate->getMethodTitle();
189
  $option->Charge = new Charge();
190
  $option->Charge->TotalAmount = $amount;
195
  }
196
 
197
  if(count($purchaseCharges->DeliveryOptions)==0){
198
+ //No shipping rates available for this order, return an error
199
+ return Mage::getStoreConfig('onescantab/general/onescan_cannot-deliver-message');
200
  }
201
+
202
+ //Retreive Onescan data from database
203
+ $sessionID = $process->SessionState()->SessionID;
204
+
205
+ $onescanData = Mage::getModel('onescan/sessiondata')->getCollection();
206
+ $onescanData->addFieldToFilter('sessionid', array('like' => $sessionID));
207
+ $onescanData->load();
208
+ $sessionData=$onescanData->getData();
209
 
210
+ //Save details to Onescan database tables for later retrieval
211
+ $onescanModel=Mage::getModel('onescan/sessiondata');
 
 
 
212
  $onescanModel->setId($sessionData[0]['sessiondata_id']);
213
  $onescanModel->setSessionid($process->SessionState()->SessionID);
214
+ $onescanModel->setQuoteid($quote->getId());
215
  $onescanModel->setCustomerid($sessionData[0]['customerid']);
216
+ $onescanModel->setShippingtax($shippingTaxPercent);
 
 
217
  $onescanModel->save();
218
 
219
  return true;
220
  }
221
+
222
+ /// <summary>
223
+ /// Build purchase payload.
224
+ /// </summary>
225
+ private function BuildPurchasePayload($sessionID) {
226
+ //Retreive quote from database and reserve order id
227
+ $quote=$this->MagentoRetrieveQuote($sessionID);
 
 
 
 
 
228
  $quote->reserveOrderId();
229
  $quote->save();
230
 
231
+ //Retreive prices from quote
232
  $storeid=$quote->getStoreId();
233
  $totals=$quote->getTotals();
234
 
235
+ //Build Onescan payload from quote data
236
  $payload = new PurchasePayload();
237
  $payload->RequiresDeliveryAddress = true;
238
  $payload->MerchantName = Mage::app()->getStore()->getFrontendName();
258
  return $payload;
259
  }
260
 
261
+ /// <summary>
262
+ /// Build order accepted payload.
263
+ /// </summary>
264
+ private function BuildOrderAccepted($process) {
265
+ //Retreive Onescan data from database
266
+ $sessionID = $process->SessionState()->SessionID;
267
 
268
  $onescanData = Mage::getModel('onescan/sessiondata')->getCollection();
269
+ $onescanData->addFieldToFilter('sessionid', array('like' => $sessionID));
270
  $onescanData->load();
271
  $sessionData=$onescanData->getData();
272
 
273
  $quoteid=$sessionData[0]['quoteid'];
274
  $customerid=$sessionData[0]['customerid'];
275
+ $shippingTaxRate=$sessionData[0]['shippingtax'];
 
 
276
 
277
+ //If FirstName or LastName are blank, Magento can't proceed with order
 
 
 
 
 
278
  if ($process->PaymentConfirmation->FirstName=="") {
279
  $process->PaymentConfirmation->FirstName="First";
280
  }
282
  $process->PaymentConfirmation->LastName="Last";
283
  }
284
 
285
+ //Make sure we have an account and are logged in to Magento
286
+ $this->MagentoLogin($customerid,$quoteid);
287
+
288
+ //Place the order
289
+ $orderId=$this->MagentoPlaceOrder($process,$shippingTaxRate,$quoteid);
290
+
291
+ //Pass data back to Onescan
292
+ $orderAccepted = new OrderAcceptedPayload();
293
+ $orderAccepted->ReceiptId = $process->ProcessId();
294
+ $orderAccepted->OrderId = $orderId;
295
+
296
+ return $orderAccepted;
297
+ }
298
+
299
+ //Create random password for "manual" login
300
+ private function randomPassword() {
301
+ $alphabet = "abcdefghijkmnopqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789";
302
+ $pass='';
303
+
304
+ for ($i = 0; $i < 8; $i++) {
305
+ $n = rand(0, strlen($alphabet)-1);
306
+ $pass .= $alphabet[$n];
307
+ }
308
+
309
+ return $pass;
310
+ }
311
+
312
+ private function MagentoRetrieveQuote($sessionID){
313
+ //Retrieve quote from database
314
+ $onescanData = Mage::getModel('onescan/sessiondata')->getCollection();
315
+ $onescanData->addFieldToFilter('sessionid', array('like' => $sessionID));
316
+ $onescanData->load();
317
+ $sessionData=$onescanData->getData();
318
+ $quoteid=$sessionData[0]['quoteid'];
319
+
320
+ //Retreive quote
321
+ $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
322
+ $cart->setQuoteId($quoteid);
323
+
324
+ return $cart->getQuote();
325
+ }
326
+
327
+ protected function MagentoLogin($customerid,$quoteid){
328
+ //Retreive quote from database
329
+ $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
330
+ $cart->setQuoteId($quoteid);
331
+ $totals=$cart->getQuote()->getTotals();
332
+ $quote=$cart->getQuote();
333
+
334
  if ($customerid) {
335
  // We are already logged in:
336
  $customer = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getWebsite()->getId())->load($customerid);
337
  $quote->assignCustomer($customer);
338
  } else {
339
+ //Determine whether Onescan user token is recognised
340
  $loginTokens = Mage::getModel('onescan/logintokens')->getCollection();
341
  $loginTokens->addFieldToFilter('onescantoken', array('like' => $process->UserToken));
342
  $loginTokens->load();
355
  $customer->setPassword($this->randomPassword());
356
  try {
357
  $customer->save();
358
+ //Determine whether email confirmation is required then set up account and send appropriate email
359
  if (Mage::getStoreConfig('onescantab/general/onescan_skip-confirmation') || !$customer->isConfirmationRequired()) {
360
  $customer->setConfirmation(null);
361
  $customer->save();
374
  $confirmMessage=true;
375
  }
376
 
377
+ //Store the Onescan user token in the database and associate it with the Magento account
378
  $newToken=Mage::getModel('onescan/logintokens');
379
  $newToken->setOnescantoken($process->UserToken);
380
  $newToken->setMagentouserid($customer->getId());
393
  catch (Mage_Core_Exception $e) {
394
  LocalDataFactory::storeObject($sessionID . '-message',$e->getMessage());
395
  }
396
+ } else {
397
+ //Email address recognised so redirect to login page
398
  LocalDataFactory::storeObject($sessionID . '-message',Mage::getStoreConfig('onescantab/general/onescan_email-exists-message'));
399
  }
400
  } else {
405
  }
406
  $quote->assignCustomer($customer);
407
  }
408
+ }
409
+
410
+ protected function MagentoPlaceOrder($process,$shippingTaxRate,$quoteid){
411
+ //Retreive quote from database
412
+ $cart=Mage::getModel('checkout/cart')->getCheckoutSession();
413
+ $cart->setQuoteId($quoteid);
414
+ $totals=$cart->getQuote()->getTotals();
415
+ $quote=$cart->getQuote();
416
+
417
+ //Calculate shipping values.
418
+ $shippingMethod=$process->PaymentConfirmation->DeliveryMethodCode;
419
+ $totalShippingAmount=$process->PaymentConfirmation->AmountCharged->PostageAmount;
420
+ $shippingTax=$totalShippingAmount-($totalShippingAmount*100)/(100+$shippingTaxRate);
421
+ $shippingAmount=$totalShippingAmount-$shippingTax;
422
+
423
+ //Add customer name to the quote, along with billing address and shipping address.
424
+ $quote->setcustomerfirstname($process->PaymentConfirmation->FirstName);
425
+ $quote->setcustomerlastname($process->PaymentConfirmation->LastName);
426
 
427
+ $addressData=$quote->getBillingAddress()->getData();
428
+ $addressData['firstname']=$process->PaymentConfirmation->FirstName;
429
+ $addressData['lastname']=$process->PaymentConfirmation->LastName;
430
+ $billingAddress = $quote->getBillingAddress()->setData($addressData);
431
+
432
+ $addressData=$quote->getShippingAddress()->getData();
433
+ $addressData['firstname']=$process->PaymentConfirmation->FirstName;
434
+ $addressData['lastname']=$process->PaymentConfirmation->LastName;
435
+ $shippingAddress = $quote->getShippingAddress()->setData($addressData);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
 
437
+ //Set shipping and payment methods for order
 
438
  $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
439
  ->setShippingMethod($shippingMethod)
440
  ->setPaymentMethod('onescan');
456
  $quote->setIsActive(0);
457
  $quote->save();
458
 
459
+ //Create order from quote
460
  $service = Mage::getModel('sales/service_quote', $quote);
461
  $service->submitAll();
462
 
480
 
481
  $quote->setIsActive(false);
482
  $quote->delete();
483
+
484
+ return $order->getIncrementId();
 
 
 
 
485
  }
486
+
487
+ protected function MagentoGetShippingRates($quote,$shippingError,$address){
488
+ //Coupons not yet supported, sample code for reference
489
+ /*if ($quote->getCouponCode() != '') {
490
+ $c = Mage::getResourceModel('salesrule/rule_collection');
491
+ $c->getSelect()->where("code=?", $quote->getCouponCode());
492
+ foreach ($c->getItems() as $item) {
493
+ $coupon = $item;
494
+ }
495
+ if ($coupon->getSimpleFreeShipping() > 0) {
496
+ $quote->getShippingAddress()->setShippingMethod($this->_shippingCode)->save();
497
+ return true;
498
+ }
499
+ }*/
500
 
501
+ //Add address to quote
502
+ try {
503
+ $addressData = array(
504
+ 'street' => $address->AddressLine1 . ', ' . $address->AddressLine2,
505
+ 'city' => $address->Town,
506
+ 'postcode' => $address->Postcode,
507
+ 'telephone' => '0',
508
+ 'country_id' => $address->CountryCode,
509
+ );
510
+
511
+ //Check to see if region/state is required for the delivery country
512
+ $requiredStates=explode(',',Mage::getStoreConfig('general/region/state_required', Mage::app()->getStore()));
513
+ if(in_array($address->CountryCode,$requiredStates)){
514
+ $regions=Mage::getModel('directory/region')
515
+ ->getResourceCollection()
516
+ ->addCountryFilter($address->CountryCode)
517
+ ->load();
518
+
519
+ //Ensure we have a valid region/state as either the full name or two letter abbreviation
520
+ $regionMatch=false;
521
+ //Check if supplied county text appears within full region name
522
+ foreach($regions as $region){
523
+ if(stripos($region->default_name,$address->County)!==false
524
+ //Use first region if county is empty to allow testing with early version of Onscan app
525
+ || $address->County==''){
526
+ $addressData['region']=$region->default_name;
527
+ $addressData['region_id']=$region->region_id;
528
+ $regionMatch=true;
529
+ break;
530
+ }
531
+ }
532
+ //If supplied county is two characters long, check if we match the two letter region abbreviation
533
+ if(strlen($address->County)==2){
534
+ foreach($regions as $region){
535
+ if(strcasecmp($address->County,$region->code)==0){
536
+ $addressData['region']=$region->default_name;
537
+ $addressData['region_id']=$region->region_id;
538
+ $regionMatch=true;
539
+ break;
540
+ }
541
+ }
542
+ }
543
+ if(!$regionMatch){
544
+ //Region not found, return an error
545
+ return Mage::getStoreConfig('onescantab/general/onescan_unknown-region-message');
546
+ }
547
+ }
548
+
549
+ $billingAddress = $quote->getBillingAddress()->addData($addressData);
550
+ $shippingAddress = $quote->getShippingAddress()->addData($addressData);
551
+
552
+ //Get valid shipping rates for this address
553
+ $quote->getShippingAddress()->collectTotals();
554
+ $quote->getShippingAddress()->setCollectShippingRates(true);
555
+ $quote->getShippingAddress()->collectShippingRates();
556
+ $rates = $quote->getShippingAddress()->getShippingRatesCollection();
557
+ }
558
+ catch (Mage_Core_Exception $e) {
559
+ Mage::getSingleton('checkout/session')->addError($e->getMessage());
560
+ }
561
+ catch (Exception $e) {
562
+ Mage::getSingleton('checkout/session')->addException($e, Mage::helper('checkout')->__('Load customer quote error'));
563
  }
564
 
565
+ $quote->save();
566
+
567
+ $allowedRates=array();
568
+ foreach ($rates as $rate){
569
+ $rateCode=$rate->getCode();
570
+ if($quote->getShippingAddress()->collectShippingRates()->getShippingRateByCode($rateCode)){
571
+ $allowedRates[$rateCode]=$rate; //Using $rateCode as key removes duplicates
572
+ }
573
+ }
574
+
575
+ return $allowedRates;
576
  }
577
  }
578
  ?>
app/code/local/Ensygnia/Onescan/Model/Callback/Registration.php CHANGED
@@ -118,7 +118,7 @@
118
  return parent::handle();
119
  }
120
 
121
- public function randomPassword() {
122
  $alphabet = "abcdefghijkmnopqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789";
123
  $pass='';
124
 
118
  return parent::handle();
119
  }
120
 
121
+ private function randomPassword() {
122
  $alphabet = "abcdefghijkmnopqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789";
123
  $pass='';
124
 
app/code/local/Ensygnia/Onescan/etc/config.xml CHANGED
@@ -1,121 +1,122 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- Ensygnia Onescan extension
4
- Copyright (C) 2014 Ensygnia Ltd
5
-
6
- This program is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program. If not, see <http://www.gnu.org/licenses/>.
18
- -->
19
- <config>
20
- <modules>
21
- <Ensygnia_Onescan>
22
- <version>1.0.11</version>
23
- </Ensygnia_Onescan>
24
- </modules>
25
- <global>
26
- <helpers>
27
- <onescan>
28
- <class>Ensygnia_Onescan_Helper</class>
29
- </onescan>
30
- </helpers>
31
- <blocks>
32
- <onescan>
33
- <class>Ensygnia_Onescan_Block</class>
34
- </onescan>
35
- </blocks>
36
- <resources>
37
- <onescan_setup>
38
- <setup>
39
- <module>Ensygnia_Onescan</module>
40
- <class>Ensygnia_Onescan_Model_Resource_Setup</class>
41
- </setup>
42
- </onescan_setup>
43
- </resources>
44
- <models>
45
- <onescan>
46
- <class>Ensygnia_Onescan_Model</class>
47
- <resourceModel>onescan_resource</resourceModel>
48
- </onescan>
49
- <onescan_resource>
50
- <class>Ensygnia_Onescan_Model_Resource</class>
51
- <entities>
52
- <sessiondata>
53
- <table>onescan_session_data</table>
54
- </sessiondata>
55
- <logintokens>
56
- <table>onescan_login_tokens</table>
57
- </logintokens>
58
- </entities>
59
- </onescan_resource>
60
- </models>
61
- </global>
62
- <default>
63
- <onescantab>
64
- <general>
65
- <enabled>1</enabled>
66
- <onescan_account></onescan_account>
67
- <onescan_secret></onescan_secret>
68
- <onescan_serverurl>https://liveservice.ensygnia.net/api/PartnerGateway/1/</onescan_serverurl>
69
- <onescan_basket-logo-url>http://www.ensygnia.com/wp-content/themes/onescan_v3/logo-ensygnia.png</onescan_basket-logo-url>
70
- <onescan_register-success-message>You have successfully registered using Onescan. We have sent you an email with your login details should you ever need to log in "manually".</onescan_register-success-message>
71
- <onescan_skip-confirmation>1</onescan_skip-confirmation>
72
- <onescan_email-exists-message>Email address already registered, please log in using Onescan.</onescan_email-exists-message>
73
- <onescan_cannot-deliver-message>We cannot deliver your order to the address you supplied.</onescan_cannot-deliver-message>
74
- <onescan_login-success-message>You have successfully logged in using Onescan.</onescan_login-success-message>
75
- <onescan_email-not-confirmed-message>This account is not confirmed. &lt;a href="%s"&gt;Click here&lt;/a&gt; to resend confirmation email.</onescan_email-not-confirmed-message>
76
- <onescan_customer-deleted-message>We cannot find your account on our system. Please use Onescan to create a new account.</onescan_customer-deleted-message>
77
- <onescan_basket-name>Shopping Basket</onescan_basket-name>
78
- <show_on_cart_page>1</show_on_cart_page>
79
- <show_on_mini_cart>1</show_on_mini_cart>
80
- <show_now_accepting>1</show_now_accepting>
81
- </general>
82
- </onescantab>
83
- <payment>
84
- <onescan>
85
- <active>1</active>
86
- <model>onescan/method_onescan</model>
87
- <order_status>processing</order_status>
88
- <title>Onescan</title>
89
- <allowspecific>0</allowspecific>
90
- <group>offline</group>
91
- </onescan>
92
- </payment>
93
- </default>
94
- <frontend>
95
- <routers>
96
- <onescan>
97
- <use>standard</use>
98
- <args>
99
- <module>Ensygnia_Onescan</module>
100
- <frontName>onescan</frontName>
101
- </args>
102
- </onescan>
103
- </routers>
104
- <layout>
105
- <updates>
106
- <emc>
107
- <file>onescan.xml</file>
108
- </emc>
109
- </updates>
110
- </layout>
111
- </frontend>
112
- <adminhtml>
113
- <layout>
114
- <updates>
115
- <onescan>
116
- <file>onescan.xml</file>
117
- </onescan>
118
- </updates>
119
- </layout>
120
- </adminhtml>
 
121
  </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Ensygnia Onescan extension
4
+ Copyright (C) 2014 Ensygnia Ltd
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <Ensygnia_Onescan>
22
+ <version>1.0.12</version>
23
+ </Ensygnia_Onescan>
24
+ </modules>
25
+ <global>
26
+ <helpers>
27
+ <onescan>
28
+ <class>Ensygnia_Onescan_Helper</class>
29
+ </onescan>
30
+ </helpers>
31
+ <blocks>
32
+ <onescan>
33
+ <class>Ensygnia_Onescan_Block</class>
34
+ </onescan>
35
+ </blocks>
36
+ <resources>
37
+ <onescan_setup>
38
+ <setup>
39
+ <module>Ensygnia_Onescan</module>
40
+ <class>Ensygnia_Onescan_Model_Resource_Setup</class>
41
+ </setup>
42
+ </onescan_setup>
43
+ </resources>
44
+ <models>
45
+ <onescan>
46
+ <class>Ensygnia_Onescan_Model</class>
47
+ <resourceModel>onescan_resource</resourceModel>
48
+ </onescan>
49
+ <onescan_resource>
50
+ <class>Ensygnia_Onescan_Model_Resource</class>
51
+ <entities>
52
+ <sessiondata>
53
+ <table>onescan_session_data</table>
54
+ </sessiondata>
55
+ <logintokens>
56
+ <table>onescan_login_tokens</table>
57
+ </logintokens>
58
+ </entities>
59
+ </onescan_resource>
60
+ </models>
61
+ </global>
62
+ <default>
63
+ <onescantab>
64
+ <general>
65
+ <enabled>1</enabled>
66
+ <onescan_account></onescan_account>
67
+ <onescan_secret></onescan_secret>
68
+ <onescan_serverurl>https://liveservice.ensygnia.net/api/PartnerGateway/1/</onescan_serverurl>
69
+ <onescan_basket-logo-url>http://www.ensygnia.com/wp-content/themes/onescan_v3/logo-ensygnia.png</onescan_basket-logo-url>
70
+ <onescan_register-success-message>You have successfully registered using Onescan. We have sent you an email with your login details should you ever need to log in "manually".</onescan_register-success-message>
71
+ <onescan_skip-confirmation>1</onescan_skip-confirmation>
72
+ <onescan_email-exists-message>Email address already registered, please log in using Onescan.</onescan_email-exists-message>
73
+ <onescan_unknown-region-message>The county/state/region you supplied is not known, please edit your address.</onescan_unknown-region-message>
74
+ <onescan_cannot-deliver-message>We cannot deliver your order to the address you supplied.</onescan_cannot-deliver-message>
75
+ <onescan_login-success-message>You have successfully logged in using Onescan.</onescan_login-success-message>
76
+ <onescan_email-not-confirmed-message>This account is not confirmed. &lt;a href="%s"&gt;Click here&lt;/a&gt; to resend confirmation email.</onescan_email-not-confirmed-message>
77
+ <onescan_customer-deleted-message>We cannot find your account on our system. Please use Onescan to create a new account.</onescan_customer-deleted-message>
78
+ <onescan_basket-name>Shopping Basket</onescan_basket-name>
79
+ <show_on_cart_page>1</show_on_cart_page>
80
+ <show_on_mini_cart>1</show_on_mini_cart>
81
+ <show_now_accepting>1</show_now_accepting>
82
+ </general>
83
+ </onescantab>
84
+ <payment>
85
+ <onescan>
86
+ <active>1</active>
87
+ <model>onescan/method_onescan</model>
88
+ <order_status>processing</order_status>
89
+ <title>Onescan</title>
90
+ <allowspecific>0</allowspecific>
91
+ <group>offline</group>
92
+ </onescan>
93
+ </payment>
94
+ </default>
95
+ <frontend>
96
+ <routers>
97
+ <onescan>
98
+ <use>standard</use>
99
+ <args>
100
+ <module>Ensygnia_Onescan</module>
101
+ <frontName>onescan</frontName>
102
+ </args>
103
+ </onescan>
104
+ </routers>
105
+ <layout>
106
+ <updates>
107
+ <emc>
108
+ <file>onescan.xml</file>
109
+ </emc>
110
+ </updates>
111
+ </layout>
112
+ </frontend>
113
+ <adminhtml>
114
+ <layout>
115
+ <updates>
116
+ <onescan>
117
+ <file>onescan.xml</file>
118
+ </onescan>
119
+ </updates>
120
+ </layout>
121
+ </adminhtml>
122
  </config>
app/code/local/Ensygnia/Onescan/etc/system.xml CHANGED
@@ -1,200 +1,209 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- Ensygnia Onescan extension
4
- Copyright (C) 2014 Ensygnia Ltd
5
-
6
- This program is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program. If not, see <http://www.gnu.org/licenses/>.
18
- -->
19
- <config>
20
- <sections>
21
- <onescantab translate="label" module="adminhtml">
22
- <label>Onescan</label>
23
- <class>onescan-section</class>
24
- <header_css>onescan-header</header_css>
25
- <tab>sales</tab>
26
- <sort_order>995</sort_order>
27
- <show_in_default>1</show_in_default>
28
- <show_in_website>1</show_in_website>
29
- <show_in_store>1</show_in_store>
30
- <groups>
31
- <cta>
32
- <frontend_model>onescan/adminhtml_system_config_cta</frontend_model>
33
- <sort_order>0</sort_order>
34
- <show_in_default>1</show_in_default>
35
- <show_in_website>1</show_in_website>
36
- <show_in_store>1</show_in_store>
37
- </cta>
38
- <general translate="label comment">
39
- <label>General</label>
40
- <sort_order>50</sort_order>
41
- <show_in_default>1</show_in_default>
42
- <show_in_website>1</show_in_website>
43
- <show_in_store>1</show_in_store>
44
- <comment><![CDATA[Please enter the Onscan settings supplied by Ensygnia]]></comment>
45
- <fields>
46
- <enabled translate="label">
47
- <label>Enabled</label>
48
- <comment>Disable Onescan on your system</comment>
49
- <frontend_type>select</frontend_type>
50
- <source_model>adminhtml/system_config_source_yesno</source_model>
51
- <sort_order>10</sort_order>
52
- <show_in_default>1</show_in_default>
53
- <show_in_website>1</show_in_website>
54
- <show_in_store>1</show_in_store>
55
- </enabled>
56
- <onescan_account translate="label comment">
57
- <label>Onescan Account Key</label>
58
- <comment>Onescan account key supplied when you created your account with Ensygnia</comment>
59
- <frontend_type>text</frontend_type>
60
- <sort_order>20</sort_order>
61
- <show_in_default>1</show_in_default>
62
- <show_in_website>1</show_in_website>
63
- <show_in_store>1</show_in_store>
64
- </onescan_account>
65
- <onescan_secret translate="label comment">
66
- <label>Onescan Secret</label>
67
- <comment>Onescan secret supplied when you created your account with Ensygnia</comment>
68
- <frontend_type>text</frontend_type>
69
- <sort_order>30</sort_order>
70
- <show_in_default>1</show_in_default>
71
- <show_in_website>1</show_in_website>
72
- <show_in_store>1</show_in_store>
73
- </onescan_secret>
74
- <onescan_serverurl translate="label comment">
75
- <label>Onescan Server URL</label>
76
- <comment>Onescan server URL - do not change unless instructed to do so by Ensygnia</comment>
77
- <frontend_type>text</frontend_type>
78
- <sort_order>40</sort_order>
79
- <show_in_default>1</show_in_default>
80
- <show_in_website>1</show_in_website>
81
- <show_in_store>1</show_in_store>
82
- </onescan_serverurl>
83
- <onescan_basket-logo-url translate="label comment">
84
- <label>Basket Logo URL</label>
85
- <comment>Basket logo URL - logo to appear on the Onescanner's device, 128px wide works best</comment>
86
- <frontend_type>text</frontend_type>
87
- <sort_order>45</sort_order>
88
- <show_in_default>1</show_in_default>
89
- <show_in_website>1</show_in_website>
90
- <show_in_store>1</show_in_store>
91
- </onescan_basket-logo-url>
92
- <onescan_register-success-message translate="label comment">
93
- <label>Register Success Message</label>
94
- <comment>Message to show after a successful registration</comment>
95
- <frontend_type>text</frontend_type>
96
- <sort_order>50</sort_order>
97
- <show_in_default>1</show_in_default>
98
- <show_in_website>1</show_in_website>
99
- <show_in_store>1</show_in_store>
100
- </onescan_register-success-message>
101
- <onescan_skip-confirmation translate="label comment">
102
- <label>Skip Confirmation Email</label>
103
- <comment>Selects whether customers who register with Onescan skip the confirmation email. Has no effect if Require Emails Confirmation in Customer Configuration is set to "No".</comment>
104
- <frontend_type>select</frontend_type>
105
- <source_model>adminhtml/system_config_source_yesno</source_model>
106
- <sort_order>60</sort_order>
107
- <show_in_default>1</show_in_default>
108
- <show_in_website>1</show_in_website>
109
- <show_in_store>1</show_in_store>
110
- </onescan_skip-confirmation>
111
- <onescan_email-exists-message translate="label comment">
112
- <label>Email Exists Message</label>
113
- <comment>Error message to show if a user attempts to register with an existing email address</comment>
114
- <frontend_type>text</frontend_type>
115
- <sort_order>70</sort_order>
116
- <show_in_default>1</show_in_default>
117
- <show_in_website>1</show_in_website>
118
- <show_in_store>1</show_in_store>
119
- </onescan_email-exists-message>
120
- <onescan_cannot-deliver-message translate="label comment">
121
- <label>Cannot Deliver Message</label>
122
- <comment>Error message that is shown on the Onescanner's device if the order cannot be delivered to the address that they supplied</comment>
123
- <frontend_type>text</frontend_type>
124
- <sort_order>80</sort_order>
125
- <show_in_default>1</show_in_default>
126
- <show_in_website>1</show_in_website>
127
- <show_in_store>1</show_in_store>
128
- </onescan_cannot-deliver-message>
129
- <onescan_login-success-message translate="label comment">
130
- <label>Login Success Message</label>
131
- <comment>Message to show after a successful login</comment>
132
- <frontend_type>text</frontend_type>
133
- <sort_order>90</sort_order>
134
- <show_in_default>1</show_in_default>
135
- <show_in_website>1</show_in_website>
136
- <show_in_store>1</show_in_store>
137
- </onescan_login-success-message>
138
- <onescan_email-not-confirmed-message translate="label comment">
139
- <label>Email Not Confirmed Message</label>
140
- <comment>Message to show after a login attempt when email address has not been confirmed (use %s for resend email URL).</comment>
141
- <frontend_type>text</frontend_type>
142
- <sort_order>100</sort_order>
143
- <show_in_default>1</show_in_default>
144
- <show_in_website>1</show_in_website>
145
- <show_in_store>1</show_in_store>
146
- </onescan_email-not-confirmed-message>
147
- <onescan_customer-deleted-message translate="label comment">
148
- <label>Customer Deleted Message</label>
149
- <comment>Message to show after a login attempt when customer no longer exists.</comment>
150
- <frontend_type>text</frontend_type>
151
- <sort_order>110</sort_order>
152
- <show_in_default>1</show_in_default>
153
- <show_in_website>1</show_in_website>
154
- <show_in_store>1</show_in_store>
155
- </onescan_customer-deleted-message>
156
- <onescan_basket-name translate="label comment">
157
- <label>Shopping Basket Name</label>
158
- <comment>The name of the shopping basket that appears on the Onescanner's device.</comment>
159
- <frontend_type>text</frontend_type>
160
- <sort_order>120</sort_order>
161
- <show_in_default>1</show_in_default>
162
- <show_in_website>1</show_in_website>
163
- <show_in_store>1</show_in_store>
164
- </onescan_basket-name>
165
- <show_on_cart_page translate="label">
166
- <label>Show Onescan on cart page</label>
167
- <comment>Display the Onescan padlock on the cart page.</comment>
168
- <frontend_type>select</frontend_type>
169
- <source_model>adminhtml/system_config_source_yesno</source_model>
170
- <sort_order>130</sort_order>
171
- <show_in_default>1</show_in_default>
172
- <show_in_website>1</show_in_website>
173
- <show_in_store>1</show_in_store>
174
- </show_on_cart_page>
175
- <show_on_mini_cart translate="label">
176
- <label>Show Onescan in mini cart</label>
177
- <comment>Display the Onescan padlock in the mini cart.</comment>
178
- <frontend_type>select</frontend_type>
179
- <source_model>adminhtml/system_config_source_yesno</source_model>
180
- <sort_order>140</sort_order>
181
- <show_in_default>1</show_in_default>
182
- <show_in_website>1</show_in_website>
183
- <show_in_store>1</show_in_store>
184
- </show_on_mini_cart>
185
- <show_now_accepting translate="label">
186
- <label>Show now accepting Onescan</label>
187
- <comment>Display the "Now accepting Onescan" block.</comment>
188
- <frontend_type>select</frontend_type>
189
- <source_model>adminhtml/system_config_source_yesno</source_model>
190
- <sort_order>150</sort_order>
191
- <show_in_default>1</show_in_default>
192
- <show_in_website>1</show_in_website>
193
- <show_in_store>1</show_in_store>
194
- </show_now_accepting>
195
- </fields>
196
- </general>
197
- </groups>
198
- </onescantab>
199
- </sections>
 
 
 
 
 
 
 
 
 
200
  </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Ensygnia Onescan extension
4
+ Copyright (C) 2014 Ensygnia Ltd
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ -->
19
+ <config>
20
+ <sections>
21
+ <onescantab translate="label" module="adminhtml">
22
+ <label>Onescan</label>
23
+ <class>onescan-section</class>
24
+ <header_css>onescan-header</header_css>
25
+ <tab>sales</tab>
26
+ <sort_order>995</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ <groups>
31
+ <cta>
32
+ <frontend_model>onescan/adminhtml_system_config_cta</frontend_model>
33
+ <sort_order>0</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <show_in_store>1</show_in_store>
37
+ </cta>
38
+ <general translate="label comment">
39
+ <label>General</label>
40
+ <sort_order>50</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <comment><![CDATA[Please enter the Onscan settings supplied by Ensygnia]]></comment>
45
+ <fields>
46
+ <enabled translate="label">
47
+ <label>Enabled</label>
48
+ <comment>Disable Onescan on your system</comment>
49
+ <frontend_type>select</frontend_type>
50
+ <source_model>adminhtml/system_config_source_yesno</source_model>
51
+ <sort_order>10</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ </enabled>
56
+ <onescan_account translate="label comment">
57
+ <label>Onescan Account Key</label>
58
+ <comment>Onescan account key supplied when you created your account with Ensygnia</comment>
59
+ <frontend_type>text</frontend_type>
60
+ <sort_order>20</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
+ </onescan_account>
65
+ <onescan_secret translate="label comment">
66
+ <label>Onescan Secret</label>
67
+ <comment>Onescan secret supplied when you created your account with Ensygnia</comment>
68
+ <frontend_type>text</frontend_type>
69
+ <sort_order>30</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>1</show_in_store>
73
+ </onescan_secret>
74
+ <onescan_serverurl translate="label comment">
75
+ <label>Onescan Server URL</label>
76
+ <comment>Onescan server URL - do not change unless instructed to do so by Ensygnia</comment>
77
+ <frontend_type>text</frontend_type>
78
+ <sort_order>40</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ </onescan_serverurl>
83
+ <onescan_basket-logo-url translate="label comment">
84
+ <label>Basket Logo URL</label>
85
+ <comment>Basket logo URL - logo to appear on the Onescanner's device, 128px wide works best</comment>
86
+ <frontend_type>text</frontend_type>
87
+ <sort_order>45</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>1</show_in_store>
91
+ </onescan_basket-logo-url>
92
+ <onescan_register-success-message translate="label comment">
93
+ <label>Register Success Message</label>
94
+ <comment>Message to show after a successful registration</comment>
95
+ <frontend_type>text</frontend_type>
96
+ <sort_order>50</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ </onescan_register-success-message>
101
+ <onescan_skip-confirmation translate="label comment">
102
+ <label>Skip Confirmation Email</label>
103
+ <comment>Selects whether customers who register with Onescan skip the confirmation email. Has no effect if Require Emails Confirmation in Customer Configuration is set to "No".</comment>
104
+ <frontend_type>select</frontend_type>
105
+ <source_model>adminhtml/system_config_source_yesno</source_model>
106
+ <sort_order>60</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>1</show_in_store>
110
+ </onescan_skip-confirmation>
111
+ <onescan_email-exists-message translate="label comment">
112
+ <label>Email Exists Message</label>
113
+ <comment>Error message to show if a user attempts to register with an existing email address</comment>
114
+ <frontend_type>text</frontend_type>
115
+ <sort_order>70</sort_order>
116
+ <show_in_default>1</show_in_default>
117
+ <show_in_website>1</show_in_website>
118
+ <show_in_store>1</show_in_store>
119
+ </onescan_email-exists-message>
120
+ <onescan_unknown-region-message translate="label comment">
121
+ <label>Unknown Region Message</label>
122
+ <comment>Error message that is shown on the Onescanner's device if the county/state/region is unknown</comment>
123
+ <frontend_type>text</frontend_type>
124
+ <sort_order>75</sort_order>
125
+ <show_in_default>1</show_in_default>
126
+ <show_in_website>1</show_in_website>
127
+ <show_in_store>1</show_in_store>
128
+ </onescan_unknown-region-message>
129
+ <onescan_cannot-deliver-message translate="label comment">
130
+ <label>Cannot Deliver Message</label>
131
+ <comment>Error message that is shown on the Onescanner's device if the order cannot be delivered to the address that they supplied</comment>
132
+ <frontend_type>text</frontend_type>
133
+ <sort_order>80</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <show_in_store>1</show_in_store>
137
+ </onescan_cannot-deliver-message>
138
+ <onescan_login-success-message translate="label comment">
139
+ <label>Login Success Message</label>
140
+ <comment>Message to show after a successful login</comment>
141
+ <frontend_type>text</frontend_type>
142
+ <sort_order>90</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>1</show_in_store>
146
+ </onescan_login-success-message>
147
+ <onescan_email-not-confirmed-message translate="label comment">
148
+ <label>Email Not Confirmed Message</label>
149
+ <comment>Message to show after a login attempt when email address has not been confirmed (use %s for resend email URL).</comment>
150
+ <frontend_type>text</frontend_type>
151
+ <sort_order>100</sort_order>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </onescan_email-not-confirmed-message>
156
+ <onescan_customer-deleted-message translate="label comment">
157
+ <label>Customer Deleted Message</label>
158
+ <comment>Message to show after a login attempt when customer no longer exists.</comment>
159
+ <frontend_type>text</frontend_type>
160
+ <sort_order>110</sort_order>
161
+ <show_in_default>1</show_in_default>
162
+ <show_in_website>1</show_in_website>
163
+ <show_in_store>1</show_in_store>
164
+ </onescan_customer-deleted-message>
165
+ <onescan_basket-name translate="label comment">
166
+ <label>Shopping Basket Name</label>
167
+ <comment>The name of the shopping basket that appears on the Onescanner's device.</comment>
168
+ <frontend_type>text</frontend_type>
169
+ <sort_order>120</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>1</show_in_store>
173
+ </onescan_basket-name>
174
+ <show_on_cart_page translate="label">
175
+ <label>Show Onescan on cart page</label>
176
+ <comment>Display the Onescan padlock on the cart page.</comment>
177
+ <frontend_type>select</frontend_type>
178
+ <source_model>adminhtml/system_config_source_yesno</source_model>
179
+ <sort_order>130</sort_order>
180
+ <show_in_default>1</show_in_default>
181
+ <show_in_website>1</show_in_website>
182
+ <show_in_store>1</show_in_store>
183
+ </show_on_cart_page>
184
+ <show_on_mini_cart translate="label">
185
+ <label>Show Onescan in mini cart</label>
186
+ <comment>Display the Onescan padlock in the mini cart.</comment>
187
+ <frontend_type>select</frontend_type>
188
+ <source_model>adminhtml/system_config_source_yesno</source_model>
189
+ <sort_order>140</sort_order>
190
+ <show_in_default>1</show_in_default>
191
+ <show_in_website>1</show_in_website>
192
+ <show_in_store>1</show_in_store>
193
+ </show_on_mini_cart>
194
+ <show_now_accepting translate="label">
195
+ <label>Show now accepting Onescan</label>
196
+ <comment>Display the "Now accepting Onescan" block.</comment>
197
+ <frontend_type>select</frontend_type>
198
+ <source_model>adminhtml/system_config_source_yesno</source_model>
199
+ <sort_order>150</sort_order>
200
+ <show_in_default>1</show_in_default>
201
+ <show_in_website>1</show_in_website>
202
+ <show_in_store>1</show_in_store>
203
+ </show_now_accepting>
204
+ </fields>
205
+ </general>
206
+ </groups>
207
+ </onescantab>
208
+ </sections>
209
  </config>
package.xml CHANGED
@@ -1,26 +1,33 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ensygnia_Onescan</name>
4
- <version>1.0.11</version>
5
  <stability>stable</stability>
6
  <license uri="https://www.gnu.org/licenses/gpl.html">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Ensygnia's Onescan payment plugin allows online market shops to accept mobile payments in just one scan. Visitors no longer have to complete long registration forms or jump through security hoops in a long checkout process. Using their mobile phone, all customers have to do is scan our Onescan padlock using our Onescan app at checkout. With one scan of a padlock and in under 10 seconds payment is securely completed.</summary>
10
- <description>The Onescan payment plugin brings speed and security to the Magento platform, allowing customers to register, login or even purchase, with just one scan from their mobile phone.&#xD;
11
  &#xD;
12
  No usernames and passwords to remember, no security checks to pass, or tiresome forms to fill.&#xD;
13
  &#xD;
14
  All while improving the security of your site. And the burden of dealing with sensitive financial information is lifted. Payments are confirmed by a tokenised system: at no point do the details need to be shared.&#xD;
15
  &#xD;
16
  Thanks to Onescan, mobile phones become a secure proof of identity. Online, all customers have to do to login, register or even purchase an item is complete one simple scan. We take all the hassle out of online shopping and tear down the barriers between you and your customers.</description>
17
- <notes>Version 1.0.11 of the Onescan Payment Plugin extension.&#xD;
18
  &#xD;
19
  Changelog&#xD;
20
  ---------------&#xD;
21
  &#xD;
 
 
 
 
 
 
 
22
  1.0.11&#xD;
23
- Fixed syntax error.&#xD;
24
  &#xD;
25
  1.0.10&#xD;
26
  Purchase failure where delivery is to a country in which Magento requires state/region information to be present - fixed.&#xD;
@@ -41,7 +48,7 @@ Compatibility issue reported when installing into latest version of Magento - fi
41
  Prevented jQuery conflict for older versions of Magento&#xD;
42
  &#xD;
43
  1.0.6&#xD;
44
- Syntax error corrected&#xD;
45
  &#xD;
46
  1.0.5&#xD;
47
  Allows merchant to specify the image that will be displayed on the device during a purchase.&#xD;
@@ -69,9 +76,9 @@ Fixed potential installation problem.&#xD;
69
  1.0.0&#xD;
70
  Initial version.</notes>
71
  <authors><author><name>Ensygnia</name><user>MAG002660123</user><email>paul.newson@ensygnia.com</email></author></authors>
72
- <date>2015-06-25</date>
73
- <time>16:58:30</time>
74
- <contents><target name="magelocal"><dir name="Ensygnia"><dir name="Onescan"><dir name="Block"><file name="Abstract.php" hash="4488b86743ac3cd970d52a4dc857c4d6"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Cta.php" hash="433c964de85d708af211461033f7a5fc"/></dir></dir></dir><file name="Basket.php" hash="438f95ad093d4b5cde252eb4a8661035"/><file name="Login.php" hash="099ce7a3c3b483e0e509357949d0056d"/><file name="Logo.php" hash="fd58bed8012207372450577b137781ea"/><file name="Register.php" hash="a3ce5e2b5d4cb627f23a6d52dc3f5db9"/><dir name="Widget"><file name="Basket.php" hash="95fad0d733885b0c4651d7e41bc0039c"/><file name="Login.php" hash="225660cace8fc351da454b49d887e124"/><file name="Register.php" hash="89a1492f818fc787cdde4f1adc29702b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="6bf2bcc51f0639615a150835c182b014"/></dir><dir name="Model"><dir name="Callback"><file name="Abstract.php" hash="31b73999f34ffd0f7e539d9ed6499cce"/><file name="Login.php" hash="94f1d610a7c56a95e10694b58e84de31"/><file name="Purchase.php" hash="b4c4a7c5b18962537b7837efea5cec52"/><file name="Registration.php" hash="24fed90927c3a6b72c1503c2e94bce67"/></dir><dir name="Config"><file name="Abstract.php" hash="9e407f490c53651e5fe6b19c92cb5c1a"/><file name="Login.php" hash="6fbec423b7b3c6d72fa6e3b519163cd8"/><file name="Purchase.php" hash="0bd21ab4d83b48a31aa9003b473ed6db"/><file name="Registration.php" hash="4c39c0ee7690abc16c0519d3c950c5cb"/></dir><file name="Logintokens.php" hash="1a61be2e17f8ef9562cc205d525a473c"/><dir name="Method"><file name="Onescan.php" hash="9700daf18892390d3c6c73d1ad9349a9"/></dir><dir name="Resource"><dir name="Logintokens"><file name="Collection.php" hash="3767dcf1cbe12088186664ef7d1be309"/></dir><file name="Logintokens.php" hash="4f0fd6b83ee508a382a442641a357e31"/><dir name="Sessiondata"><file name="Collection.php" hash="0b62795cd0f7f7b6dba3ecf07599a9f6"/></dir><file name="Sessiondata.php" hash="48c60528f7accbf52da25030a7681fc0"/><file name="Setup.php" hash="e09e39a39405ebd80af368fefa013839"/></dir><file name="Sessiondata.php" hash="f5f6c2f7ea7fc3c6f033d5a5ff3b1666"/></dir><dir name="controllers"><file name="CallbackController.php" hash="dbbaebed3d7f7aa4e1431d22e2f6a541"/><file name="IndexController.php" hash="37d200f846305bed89a853d41e8f2c55"/></dir><dir name="etc"><file name="adminhtml.xml" hash="42e02288cfa5329abafb1ea0a98ef387"/><file name="config.xml" hash="89552afd530d463daf1257eb1e16c637"/><file name="system.xml" hash="c79ddda9a40da31dd431fbedacdc7263"/><file name="widget.xml" hash="2a9946cbc623b75b95eaf6d851d73c52"/></dir><file name="license.txt" hash="f075d971a6aa12e3ae52489ef961a7f5"/><dir name="sql"><dir name="onescan_setup"><file name="install-1.0.0.php" hash="08887eb2180ac838dcacd73b5cd2ab8b"/><file name="upgrade-1.0.4-1.0.5.php" hash="c55d900031db2717429a2e575ed4aa59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="onescan.xml" hash="419c0333c31ba849f2ed2a8ea57cb823"/></dir><dir name="template"><dir name="onescan"><dir name="system"><dir name="config"><file name="cta.phtml" hash="c99b3ce3333dbff286f2156a031f5401"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="onescan.xml" hash="3f702507b0dfc4ffd7e6c3e3647ee831"/></dir><dir name="template"><dir name="onescan"><file name="basket.phtml" hash="d561c70fd9ea873fa2e25f6bd90df1d4"/><file name="login.phtml" hash="06e2ba3a1101b46050a65553cf5b2758"/><file name="logo.phtml" hash="29e5cb387d8e2aaf676040a2c25b9596"/><file name="register.phtml" hash="17749f596a966ec18933d0c779b8b56b"/><file name="scripts.phtml" hash="e2c4469065c629b34a9280879f9da71e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ensygnia_Onescan.xml" hash="d0d96d5e505006873bdb9c1b4f4c591f"/></dir></target><target name="magelib"><dir name="Onescan"><dir name="core"><file name="onescan-Exceptions.php" hash="1733a8f40cdc6fbb7a2c77890f0fd197"/><file name="onescan-GUID.php" hash="732799426a921038f30f1485f5cd7264"/><file name="onescan-HMAC.php" hash="797d68c8879ee9574dcb06770947d19b"/><file name="onescan-HTTPClient.php" hash="59eee1d07c3796ad24126c0c85b35086"/><file name="onescan-Login.php" hash="deaf58a3c6c9bc30a0acc4f10d64ade0"/><file name="onescan-Message.php" hash="f978243be9032897fcf1a288a23ce837"/><file name="onescan-Onescan.php" hash="93120300b4add29f3cd44709d8cc32d6"/><file name="onescan-Process.php" hash="86d8ccd62a5261d86ae7c35a099b5c1f"/><file name="onescan-Session.php" hash="a365d6c0fc9d41f603e88384b0c15fea"/><file name="onescan-SessionState.php" hash="a0b3b8d6d8d433551340ede175d094cc"/><file name="onescan-Settings.php" hash="2c62dcbb810b2d1d02f5773db9184408"/></dir><dir name="login"><file name="LocalDataFactory.php" hash="a49582171443ca73b292317e2128e9ac"/><file name="onescan-LoginProcess.php" hash="c3552a34b51e879c535d7b67d541e0fd"/></dir><dir name="purchase"><file name="onescan-AdditionalChargesPayload.php" hash="cb1f2d49d560e1b46b866dffda932111"/><file name="onescan-CardInformation.php" hash="6c2fd7227533dfe986d93bd8bfeb4c1e"/><file name="onescan-CardType.php" hash="8e7765420c6a0de517949393b7360818"/><file name="onescan-Charge.php" hash="285cc0b1f0708f3a3dbc503447b7c0bd"/><file name="onescan-ConfirmPaymentPayload.php" hash="7eda3538cd471c41976732d462a2d84e"/><file name="onescan-CorePurchaseInfo.php" hash="08d943667c901189edaf8dc22406b7d8"/><file name="onescan-DeliveryOption.php" hash="8580b35f993b668c153b6488a9572bd4"/><file name="onescan-OrderAcceptedPayload.php" hash="c007ac8a0a78e51f516f9456d47c0129"/><file name="onescan-OrderDeclinedPayload.php" hash="1cfd9499b9cb167435a33766a5822909"/><file name="onescan-PaymentMethodCharge.php" hash="35f576d4ba1965a5ffc1155d28ba2ceb"/><file name="onescan-PaymentMethodInformation.php" hash="9c332bf6aa9395ec484a13a771101f94"/><file name="onescan-PaymentMethodType.php" hash="df5296173d5a34e55a425810072192dd"/><file name="onescan-PaymentOptins.php" hash="da07521ee0d52657a776ea8ecb705ac0"/><file name="onescan-PurchaseAction.php" hash="ca494c86fe5548b93ba2876a4e3b7aad"/><file name="onescan-PurchaseCharges.php" hash="1b67b353045ea1f93a7b18d2c1940b94"/><file name="onescan-PurchaseContextPayload.php" hash="0bdf109a37bd5104660d13ee3ea42d42"/><file name="onescan-PurchaseInclude.php" hash="a52385a7ceb5f056367a40eaff2a2d32"/><file name="onescan-PurchasePayload.php" hash="0970da6cfc0907c268218501d24f08d1"/><file name="onescan-PurchaseProcess.php" hash="e5108485d920ef899003d402f7bd5efd"/><file name="onescan-PurchaseSettings.php" hash="f3c3d6776d5da8a616eb417a9728fe61"/><file name="onescan-UserAddress.php" hash="4e1ec23d74d6f192a1edb31f3e3c9c8e"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="onescan"><dir name="css"><file name="onescan.css" hash="1f758b313e54a8782fcc96e34423caf5"/></dir><dir name="images"><file name="Thumbs.db" hash="0826f6fc160fc67ee19616235ad7a3c1"/><file name="logo-sml.png" hash="af6d80c8d752b68ffff5d2cedd60319f"/><file name="logo.png" hash="ad10933575eaa2f9e379c0aad2ac038e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="onescan.css" hash="c649f4ebbe1ccb865f3582e04b842c34"/></dir><dir name="images"><file name="logo.png" hash="658a845e0e5d71fb94c072680a42c74b"/></dir><dir name="js"><file name="onescan.js" hash="22e614add95533cbb8415d030cccfe2e"/></dir></dir></dir></dir></target></contents>
75
  <compatible/>
76
  <dependencies><required><php><min>5.2.13</min><max>5.6.1</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.0</min><max></max></package></required></dependencies>
77
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ensygnia_Onescan</name>
4
+ <version>1.0.12</version>
5
  <stability>stable</stability>
6
  <license uri="https://www.gnu.org/licenses/gpl.html">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Ensygnia's Onescan Payment Extension allows online market shops to accept mobile payments in just one scan. Visitors no longer have to complete long registration forms or jump through security hoops in a long checkout process. Using their mobile phone, all customers have to do is scan our Onescan padlock using our Onescan app at checkout. With one scan of a padlock and in under 10 seconds payment is securely completed.</summary>
10
+ <description>The Onescan Payment Extension brings speed and security to the Magento platform, allowing customers to register, login or even purchase, with just one scan from their mobile phone.&#xD;
11
  &#xD;
12
  No usernames and passwords to remember, no security checks to pass, or tiresome forms to fill.&#xD;
13
  &#xD;
14
  All while improving the security of your site. And the burden of dealing with sensitive financial information is lifted. Payments are confirmed by a tokenised system: at no point do the details need to be shared.&#xD;
15
  &#xD;
16
  Thanks to Onescan, mobile phones become a secure proof of identity. Online, all customers have to do to login, register or even purchase an item is complete one simple scan. We take all the hassle out of online shopping and tear down the barriers between you and your customers.</description>
17
+ <notes>Version 1.0.12 of the Onescan Payment Extension.&#xD;
18
  &#xD;
19
  Changelog&#xD;
20
  ---------------&#xD;
21
  &#xD;
22
+ 1.0.12&#xD;
23
+ Check Magento database to determine whether country of delivery requires state/region to be present.&#xD;
24
+ &#xD;
25
+ Added a new field to the configuration menu that allows the Magento store administrator to specify the message that is sent to the Onescanner's device if the state/region is not recognised.&#xD;
26
+ &#xD;
27
+ In some circumstances, the wrong delivery method was being stored in the Magento database&#xD;
28
+ &#xD;
29
  1.0.11&#xD;
30
+ Potential installation issue with some Magento instances fixed.&#xD;
31
  &#xD;
32
  1.0.10&#xD;
33
  Purchase failure where delivery is to a country in which Magento requires state/region information to be present - fixed.&#xD;
48
  Prevented jQuery conflict for older versions of Magento&#xD;
49
  &#xD;
50
  1.0.6&#xD;
51
+ Potential installation issue with some Magento instances fixed.&#xD;
52
  &#xD;
53
  1.0.5&#xD;
54
  Allows merchant to specify the image that will be displayed on the device during a purchase.&#xD;
76
  1.0.0&#xD;
77
  Initial version.</notes>
78
  <authors><author><name>Ensygnia</name><user>MAG002660123</user><email>paul.newson@ensygnia.com</email></author></authors>
79
+ <date>2015-07-03</date>
80
+ <time>11:14:14</time>
81
+ <contents><target name="magelocal"><dir name="Ensygnia"><dir name="Onescan"><dir name="Block"><file name="Abstract.php" hash="4488b86743ac3cd970d52a4dc857c4d6"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Cta.php" hash="433c964de85d708af211461033f7a5fc"/></dir></dir></dir><file name="Basket.php" hash="438f95ad093d4b5cde252eb4a8661035"/><file name="Login.php" hash="099ce7a3c3b483e0e509357949d0056d"/><file name="Logo.php" hash="fd58bed8012207372450577b137781ea"/><file name="Register.php" hash="a3ce5e2b5d4cb627f23a6d52dc3f5db9"/><dir name="Widget"><file name="Basket.php" hash="95fad0d733885b0c4651d7e41bc0039c"/><file name="Login.php" hash="225660cace8fc351da454b49d887e124"/><file name="Register.php" hash="89a1492f818fc787cdde4f1adc29702b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="6bf2bcc51f0639615a150835c182b014"/></dir><dir name="Model"><dir name="Callback"><file name="Abstract.php" hash="31b73999f34ffd0f7e539d9ed6499cce"/><file name="Login.php" hash="94f1d610a7c56a95e10694b58e84de31"/><file name="Purchase.php" hash="909e8b124e5a2eccb88bbee5425a0d20"/><file name="Registration.php" hash="7cf4b0cdd39e84e392cecaa38a35bd50"/></dir><dir name="Config"><file name="Abstract.php" hash="9e407f490c53651e5fe6b19c92cb5c1a"/><file name="Login.php" hash="6fbec423b7b3c6d72fa6e3b519163cd8"/><file name="Purchase.php" hash="0bd21ab4d83b48a31aa9003b473ed6db"/><file name="Registration.php" hash="4c39c0ee7690abc16c0519d3c950c5cb"/></dir><file name="Logintokens.php" hash="1a61be2e17f8ef9562cc205d525a473c"/><dir name="Method"><file name="Onescan.php" hash="9700daf18892390d3c6c73d1ad9349a9"/></dir><dir name="Resource"><dir name="Logintokens"><file name="Collection.php" hash="3767dcf1cbe12088186664ef7d1be309"/></dir><file name="Logintokens.php" hash="4f0fd6b83ee508a382a442641a357e31"/><dir name="Sessiondata"><file name="Collection.php" hash="0b62795cd0f7f7b6dba3ecf07599a9f6"/></dir><file name="Sessiondata.php" hash="48c60528f7accbf52da25030a7681fc0"/><file name="Setup.php" hash="e09e39a39405ebd80af368fefa013839"/></dir><file name="Sessiondata.php" hash="f5f6c2f7ea7fc3c6f033d5a5ff3b1666"/></dir><dir name="controllers"><file name="CallbackController.php" hash="dbbaebed3d7f7aa4e1431d22e2f6a541"/><file name="IndexController.php" hash="37d200f846305bed89a853d41e8f2c55"/></dir><dir name="etc"><file name="adminhtml.xml" hash="42e02288cfa5329abafb1ea0a98ef387"/><file name="config.xml" hash="d2813a606e387f055e16e507d3de453e"/><file name="system.xml" hash="92cb2fbfe0086273b664f181cabb2241"/><file name="widget.xml" hash="2a9946cbc623b75b95eaf6d851d73c52"/></dir><file name="license.txt" hash="f075d971a6aa12e3ae52489ef961a7f5"/><dir name="sql"><dir name="onescan_setup"><file name="install-1.0.0.php" hash="08887eb2180ac838dcacd73b5cd2ab8b"/><file name="upgrade-1.0.4-1.0.5.php" hash="c55d900031db2717429a2e575ed4aa59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="onescan.xml" hash="419c0333c31ba849f2ed2a8ea57cb823"/></dir><dir name="template"><dir name="onescan"><dir name="system"><dir name="config"><file name="cta.phtml" hash="c99b3ce3333dbff286f2156a031f5401"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="onescan.xml" hash="3f702507b0dfc4ffd7e6c3e3647ee831"/></dir><dir name="template"><dir name="onescan"><file name="basket.phtml" hash="d561c70fd9ea873fa2e25f6bd90df1d4"/><file name="login.phtml" hash="06e2ba3a1101b46050a65553cf5b2758"/><file name="logo.phtml" hash="29e5cb387d8e2aaf676040a2c25b9596"/><file name="register.phtml" hash="17749f596a966ec18933d0c779b8b56b"/><file name="scripts.phtml" hash="e2c4469065c629b34a9280879f9da71e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ensygnia_Onescan.xml" hash="d0d96d5e505006873bdb9c1b4f4c591f"/></dir></target><target name="magelib"><dir name="Onescan"><dir name="core"><file name="onescan-Exceptions.php" hash="1733a8f40cdc6fbb7a2c77890f0fd197"/><file name="onescan-GUID.php" hash="732799426a921038f30f1485f5cd7264"/><file name="onescan-HMAC.php" hash="797d68c8879ee9574dcb06770947d19b"/><file name="onescan-HTTPClient.php" hash="59eee1d07c3796ad24126c0c85b35086"/><file name="onescan-Login.php" hash="deaf58a3c6c9bc30a0acc4f10d64ade0"/><file name="onescan-Message.php" hash="f978243be9032897fcf1a288a23ce837"/><file name="onescan-Onescan.php" hash="93120300b4add29f3cd44709d8cc32d6"/><file name="onescan-Process.php" hash="86d8ccd62a5261d86ae7c35a099b5c1f"/><file name="onescan-Session.php" hash="a365d6c0fc9d41f603e88384b0c15fea"/><file name="onescan-SessionState.php" hash="a0b3b8d6d8d433551340ede175d094cc"/><file name="onescan-Settings.php" hash="2c62dcbb810b2d1d02f5773db9184408"/></dir><dir name="login"><file name="LocalDataFactory.php" hash="a49582171443ca73b292317e2128e9ac"/><file name="onescan-LoginProcess.php" hash="c3552a34b51e879c535d7b67d541e0fd"/></dir><dir name="purchase"><file name="onescan-AdditionalChargesPayload.php" hash="cb1f2d49d560e1b46b866dffda932111"/><file name="onescan-CardInformation.php" hash="6c2fd7227533dfe986d93bd8bfeb4c1e"/><file name="onescan-CardType.php" hash="8e7765420c6a0de517949393b7360818"/><file name="onescan-Charge.php" hash="285cc0b1f0708f3a3dbc503447b7c0bd"/><file name="onescan-ConfirmPaymentPayload.php" hash="7eda3538cd471c41976732d462a2d84e"/><file name="onescan-CorePurchaseInfo.php" hash="08d943667c901189edaf8dc22406b7d8"/><file name="onescan-DeliveryOption.php" hash="8580b35f993b668c153b6488a9572bd4"/><file name="onescan-OrderAcceptedPayload.php" hash="c007ac8a0a78e51f516f9456d47c0129"/><file name="onescan-OrderDeclinedPayload.php" hash="1cfd9499b9cb167435a33766a5822909"/><file name="onescan-PaymentMethodCharge.php" hash="35f576d4ba1965a5ffc1155d28ba2ceb"/><file name="onescan-PaymentMethodInformation.php" hash="9c332bf6aa9395ec484a13a771101f94"/><file name="onescan-PaymentMethodType.php" hash="df5296173d5a34e55a425810072192dd"/><file name="onescan-PaymentOptins.php" hash="da07521ee0d52657a776ea8ecb705ac0"/><file name="onescan-PurchaseAction.php" hash="ca494c86fe5548b93ba2876a4e3b7aad"/><file name="onescan-PurchaseCharges.php" hash="1b67b353045ea1f93a7b18d2c1940b94"/><file name="onescan-PurchaseContextPayload.php" hash="0bdf109a37bd5104660d13ee3ea42d42"/><file name="onescan-PurchaseInclude.php" hash="a52385a7ceb5f056367a40eaff2a2d32"/><file name="onescan-PurchasePayload.php" hash="0970da6cfc0907c268218501d24f08d1"/><file name="onescan-PurchaseProcess.php" hash="e5108485d920ef899003d402f7bd5efd"/><file name="onescan-PurchaseSettings.php" hash="f3c3d6776d5da8a616eb417a9728fe61"/><file name="onescan-UserAddress.php" hash="4e1ec23d74d6f192a1edb31f3e3c9c8e"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="onescan"><dir name="css"><file name="onescan.css" hash="1f758b313e54a8782fcc96e34423caf5"/></dir><dir name="images"><file name="Thumbs.db" hash="0826f6fc160fc67ee19616235ad7a3c1"/><file name="logo-sml.png" hash="af6d80c8d752b68ffff5d2cedd60319f"/><file name="logo.png" hash="ad10933575eaa2f9e379c0aad2ac038e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="onescan.css" hash="c649f4ebbe1ccb865f3582e04b842c34"/></dir><dir name="images"><file name="logo.png" hash="658a845e0e5d71fb94c072680a42c74b"/></dir><dir name="js"><file name="onescan.js" hash="22e614add95533cbb8415d030cccfe2e"/></dir></dir></dir></dir></target></contents>
82
  <compatible/>
83
  <dependencies><required><php><min>5.2.13</min><max>5.6.1</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.0</min><max></max></package></required></dependencies>
84
  </package>