Gene_Braintree - Version 1.0.5.4

Version Notes

Connect your Magento store to Braintree to accept Credit Cards & PayPal using V.Zero SDK

Download this release

Release Info

Developer Dave Macaulay
Extension Gene_Braintree
Version 1.0.5.4
Comparing to
See all releases


Code changes from version 1.0.5.3 to 1.0.5.4

app/code/community/Gene/Braintree/Model/Paymentmethod/Creditcard.php CHANGED
@@ -45,7 +45,27 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
45
  protected $_canManageRecurringProfiles = false;
46
 
47
  /**
48
- * Is the vault enabled?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  *
50
  * @return bool
51
  */
@@ -111,14 +131,16 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
111
  * Should we save this method in the database?
112
  *
113
  * @param \Varien_Object $payment
114
- * @param $paymentPost
115
  *
116
  * @return mixed
117
  */
118
- public function shouldSaveMethod($payment, $paymentPost)
119
  {
 
 
 
120
  $object = new Varien_Object();
121
- $object->setResponse(($this->isVaultEnabled() && isset($paymentPost['save_card']) && $paymentPost['save_card'] == 1));
122
 
123
  // Specific event for this method
124
  Mage::dispatchEvent('gene_braintree_creditcard_should_save_method', array('object' => $object, 'payment' => $payment));
@@ -129,6 +151,26 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
129
  return $object->getResponse();
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Validate payment method information object
134
  *
@@ -139,13 +181,10 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
139
  // Run the built in Magento validation
140
  parent::validate();
141
 
142
- // Retrieve the post data from the request
143
- $paymentPost = Mage::app()->getRequest()->getPost('payment');
144
-
145
  // Confirm that we have a nonce from Braintree
146
- if (!isset($paymentPost['card_payment_method_token']) || (isset($paymentPost['card_payment_method_token']) && $paymentPost['card_payment_method_token'] == 'threedsecure')) {
147
- if ((!isset($paymentPost['payment_method_nonce']) || empty($paymentPost['payment_method_nonce']))) {
148
 
 
149
  Gene_Braintree_Model_Debug::log('Card payment has failed, missing token/nonce');
150
  Gene_Braintree_Model_Debug::log($_SERVER['HTTP_USER_AGENT']);
151
 
@@ -153,7 +192,7 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
153
  $this->_getHelper()->__('Your card payment has failed, please try again.')
154
  );
155
  }
156
- } else if (isset($paymentPost['card_payment_method_token']) && empty($paymentPost['card_payment_method_token'])) {
157
 
158
  Gene_Braintree_Model_Debug::log('No saved card token present');
159
  Gene_Braintree_Model_Debug::log($_SERVER['HTTP_USER_AGENT']);
@@ -179,12 +218,6 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
179
  */
180
  protected function _authorize(Varien_Object $payment, $amount, $shouldCapture = false, $token = false)
181
  {
182
- // Retrieve the post data from the request
183
- $paymentPost = Mage::app()->getRequest()->getPost('payment');
184
-
185
- // Get the device data for fraud screening
186
- $deviceData = Mage::app()->getRequest()->getPost('device_data');
187
-
188
  // Init the environment
189
  $this->_getWrapper()->init();
190
 
@@ -192,11 +225,11 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
192
  try {
193
 
194
  // Check to see whether we're using a payment method token?
195
- if(isset($paymentPost['card_payment_method_token']) && !empty($paymentPost['card_payment_method_token']) && !in_array($paymentPost['card_payment_method_token'], array('other', 'threedsecure'))) {
196
 
197
  // Build our payment array
198
  $paymentArray = array(
199
- 'paymentMethodToken' => $paymentPost['card_payment_method_token'],
200
  );
201
 
202
  unset($paymentArray['cvv']);
@@ -205,7 +238,7 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
205
 
206
  // Build our payment array with a nonce
207
  $paymentArray = array(
208
- 'paymentMethodNonce' => $paymentPost['payment_method_nonce']
209
  );
210
 
211
  }
@@ -214,7 +247,7 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
214
  $threeDSecure = $this->is3DEnabled();
215
 
216
  // If the user is using a stored card with 3D secure, enable it in the request and remove CVV
217
- if(isset($paymentPost['card_payment_method_token']) && $paymentPost['card_payment_method_token'] == 'threedsecure') {
218
 
219
  // If we're using 3D secure token card don't send CVV
220
  unset($paymentArray['cvv']);
@@ -222,7 +255,7 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
222
  // Force 3D secure on
223
  $threeDSecure = true;
224
 
225
- } elseif(isset($paymentPost['card_payment_method_token']) && !empty($paymentPost['card_payment_method_token']) && $paymentPost['card_payment_method_token'] != 'other') {
226
 
227
  // Force 3D secure off
228
  $threeDSecure = false;
@@ -247,8 +280,8 @@ class Gene_Braintree_Model_Paymentmethod_Creditcard extends Gene_Braintree_Model
247
  $paymentArray,
248
  $payment->getOrder(),
249
  $shouldCapture,
250
- $deviceData,
251
- $this->shouldSaveMethod($payment, $paymentPost),
252
  $threeDSecure
253
  );
254
 
45
  protected $_canManageRecurringProfiles = false;
46
 
47
  /**
48
+ * Place Braintree specific data into the additional information of the payment instance object
49
+ *
50
+ * @param mixed $data
51
+ * @return Mage_Payment_Model_Info
52
+ */
53
+ public function assignData($data)
54
+ {
55
+ if (!($data instanceof Varien_Object)) {
56
+ $data = new Varien_Object($data);
57
+ }
58
+ $info = $this->getInfoInstance();
59
+ $info->setAdditionalInformation('card_payment_method_token', $data->getData('card_payment_method_token'))
60
+ ->setAdditionalInformation('payment_method_nonce', $data->getData('payment_method_nonce'))
61
+ ->setAdditionalInformation('save_card', $data->getData('save_card'))
62
+ ->setAdditionalInformation('device_data', $data->getData('device_data'));
63
+
64
+ return $this;
65
+ }
66
+
67
+ /**
68
+ * Determine whether or not the vault is enabled, can be modified by numerous events
69
  *
70
  * @return bool
71
  */
131
  * Should we save this method in the database?
132
  *
133
  * @param \Varien_Object $payment
 
134
  *
135
  * @return mixed
136
  */
137
+ public function shouldSaveMethod($payment)
138
  {
139
+ // Retrieve whether or not we should save the card from the info instance
140
+ $saveCard = $this->getInfoInstance()->getAdditionalInformation('save_card');
141
+
142
  $object = new Varien_Object();
143
+ $object->setResponse(($this->isVaultEnabled() && $saveCard == 1));
144
 
145
  // Specific event for this method
146
  Mage::dispatchEvent('gene_braintree_creditcard_should_save_method', array('object' => $object, 'payment' => $payment));
151
  return $object->getResponse();
152
  }
153
 
154
+ /**
155
+ * Return the payment method token from the info instance
156
+ *
157
+ * @return null|string
158
+ */
159
+ public function getPaymentMethodToken()
160
+ {
161
+ return $this->getInfoInstance()->getAdditionalInformation('card_payment_method_token');
162
+ }
163
+
164
+ /**
165
+ * Return the payment method nonce from the info instance
166
+ *
167
+ * @return null|string
168
+ */
169
+ public function getPaymentMethodNonce()
170
+ {
171
+ return $this->getInfoInstance()->getAdditionalInformation('payment_method_nonce');
172
+ }
173
+
174
  /**
175
  * Validate payment method information object
176
  *
181
  // Run the built in Magento validation
182
  parent::validate();
183
 
 
 
 
184
  // Confirm that we have a nonce from Braintree
185
+ if (!$this->getPaymentMethodToken() || ($this->getPaymentMethodToken() && $this->getPaymentMethodToken() == 'threedsecure')) {
 
186
 
187
+ if (!$this->getPaymentMethodNonce()) {
188
  Gene_Braintree_Model_Debug::log('Card payment has failed, missing token/nonce');
189
  Gene_Braintree_Model_Debug::log($_SERVER['HTTP_USER_AGENT']);
190
 
192
  $this->_getHelper()->__('Your card payment has failed, please try again.')
193
  );
194
  }
195
+ } else if (!$this->getPaymentMethodToken()) {
196
 
197
  Gene_Braintree_Model_Debug::log('No saved card token present');
198
  Gene_Braintree_Model_Debug::log($_SERVER['HTTP_USER_AGENT']);
218
  */
219
  protected function _authorize(Varien_Object $payment, $amount, $shouldCapture = false, $token = false)
220
  {
 
 
 
 
 
 
221
  // Init the environment
222
  $this->_getWrapper()->init();
223
 
225
  try {
226
 
227
  // Check to see whether we're using a payment method token?
228
+ if($this->getPaymentMethodToken() && !in_array($this->getPaymentMethodToken(), array('other', 'threedsecure'))) {
229
 
230
  // Build our payment array
231
  $paymentArray = array(
232
+ 'paymentMethodToken' => $this->getPaymentMethodToken(),
233
  );
234
 
235
  unset($paymentArray['cvv']);
238
 
239
  // Build our payment array with a nonce
240
  $paymentArray = array(
241
+ 'paymentMethodNonce' => $this->getPaymentMethodNonce()
242
  );
243
 
244
  }
247
  $threeDSecure = $this->is3DEnabled();
248
 
249
  // If the user is using a stored card with 3D secure, enable it in the request and remove CVV
250
+ if ($this->getPaymentMethodToken() && $this->getPaymentMethodToken() == 'threedsecure') {
251
 
252
  // If we're using 3D secure token card don't send CVV
253
  unset($paymentArray['cvv']);
255
  // Force 3D secure on
256
  $threeDSecure = true;
257
 
258
+ } elseif ($this->getPaymentMethodToken() && $this->getPaymentMethodToken() != 'other') {
259
 
260
  // Force 3D secure off
261
  $threeDSecure = false;
280
  $paymentArray,
281
  $payment->getOrder(),
282
  $shouldCapture,
283
+ $this->getInfoInstance()->getAdditionalInformation('device_data'),
284
+ $this->shouldSaveMethod($payment),
285
  $threeDSecure
286
  );
287
 
app/code/community/Gene/Braintree/Model/Paymentmethod/Paypal.php CHANGED
@@ -44,6 +44,26 @@ class Gene_Braintree_Model_Paymentmethod_Paypal extends Gene_Braintree_Model_Pay
44
  protected $_canCreateBillingAgreement = false;
45
  protected $_canManageRecurringProfiles = false;
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Return the PayPal payment type
49
  *
@@ -83,14 +103,16 @@ class Gene_Braintree_Model_Paymentmethod_Paypal extends Gene_Braintree_Model_Pay
83
  * Should we save this method in the database?
84
  *
85
  * @param \Varien_Object $payment
86
- * @param $paymentPost
87
  *
88
  * @return mixed
89
  */
90
- public function shouldSaveMethod($payment, $paymentPost)
91
  {
 
 
 
92
  $object = new Varien_Object();
93
- $object->setResponse(($this->isVaultEnabled() && isset($paymentPost['save_paypal']) && $paymentPost['save_paypal'] == 1));
94
 
95
  // Specific event for this method
96
  Mage::dispatchEvent('gene_braintree_paypal_should_save_method', array('object' => $object, 'payment' => $payment));
@@ -101,6 +123,26 @@ class Gene_Braintree_Model_Paymentmethod_Paypal extends Gene_Braintree_Model_Pay
101
  return $object->getResponse();
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  /**
105
  * Capture the payment on the checkout page
106
  *
@@ -111,36 +153,24 @@ class Gene_Braintree_Model_Paymentmethod_Paypal extends Gene_Braintree_Model_Pay
111
  */
112
  public function capture(Varien_Object $payment, $amount)
113
  {
114
- // Retrieve the payment data from the request
115
- $paymentPost = Mage::app()->getRequest()->getPost('payment');
116
-
117
  // Confirm that we have a nonce from Braintree
118
  // We cannot utilise the validate() function as these checks need to happen at the capture point
119
- if(!isset($paymentPost['paypal_payment_method_token'])) {
120
- if ((!isset($paymentPost['payment_method_nonce']) || empty($paymentPost['payment_method_nonce']))) {
121
- Mage::throwException(
122
- $this->_getHelper()->__('There has been an issue processing your PayPal payment, please try again.')
123
- );
124
- }
125
- } else if(isset($paymentPost['paypal_payment_method_token']) && empty($paymentPost['paypal_payment_method_token'])) {
126
  Mage::throwException(
127
  $this->_getHelper()->__('There has been an issue processing your PayPal payment, please try again.')
128
  );
129
  }
130
 
131
- // Get the device data for fraud screening
132
- $deviceData = Mage::app()->getRequest()->getPost('device_data');
133
-
134
  // Init the environment
135
  $this->_getWrapper()->init();
136
 
137
- if(isset($paymentPost['paypal_payment_method_token']) && !empty($paymentPost['paypal_payment_method_token']) && $paymentPost['paypal_payment_method_token'] != 'other') {
138
  $paymentArray = array(
139
- 'paymentMethodToken' => $paymentPost['paypal_payment_method_token']
140
  );
141
  } else {
142
  $paymentArray = array(
143
- 'paymentMethodNonce' => $paymentPost['payment_method_nonce']
144
  );
145
  }
146
 
@@ -155,8 +185,8 @@ class Gene_Braintree_Model_Paymentmethod_Paypal extends Gene_Braintree_Model_Pay
155
  $paymentArray,
156
  $payment->getOrder(),
157
  true,
158
- $deviceData,
159
- $this->shouldSaveMethod($payment, $paymentPost)
160
  );
161
 
162
  // Pass the sale array into a varien object
44
  protected $_canCreateBillingAgreement = false;
45
  protected $_canManageRecurringProfiles = false;
46
 
47
+ /**
48
+ * Place Braintree specific data into the additional information of the payment instance object
49
+ *
50
+ * @param mixed $data
51
+ * @return Mage_Payment_Model_Info
52
+ */
53
+ public function assignData($data)
54
+ {
55
+ if (!($data instanceof Varien_Object)) {
56
+ $data = new Varien_Object($data);
57
+ }
58
+ $info = $this->getInfoInstance();
59
+ $info->setAdditionalInformation('paypal_payment_method_token', $data->getData('paypal_payment_method_token'))
60
+ ->setAdditionalInformation('payment_method_nonce', $data->getData('payment_method_nonce'))
61
+ ->setAdditionalInformation('save_paypal', $data->getData('save_paypal'))
62
+ ->setAdditionalInformation('device_data', $data->getData('device_data'));
63
+
64
+ return $this;
65
+ }
66
+
67
  /**
68
  * Return the PayPal payment type
69
  *
103
  * Should we save this method in the database?
104
  *
105
  * @param \Varien_Object $payment
 
106
  *
107
  * @return mixed
108
  */
109
+ public function shouldSaveMethod($payment)
110
  {
111
+ // Retrieve whether or not we should save the card from the info instance
112
+ $savePaypal = $this->getInfoInstance()->getAdditionalInformation('save_paypal');
113
+
114
  $object = new Varien_Object();
115
+ $object->setResponse(($this->isVaultEnabled() && $savePaypal == 1));
116
 
117
  // Specific event for this method
118
  Mage::dispatchEvent('gene_braintree_paypal_should_save_method', array('object' => $object, 'payment' => $payment));
123
  return $object->getResponse();
124
  }
125
 
126
+ /**
127
+ * Return the payment method token from the info instance
128
+ *
129
+ * @return null|string
130
+ */
131
+ public function getPaymentMethodToken()
132
+ {
133
+ return $this->getInfoInstance()->getAdditionalInformation('paypal_payment_method_token');
134
+ }
135
+
136
+ /**
137
+ * Return the payment method nonce from the info instance
138
+ *
139
+ * @return null|string
140
+ */
141
+ public function getPaymentMethodNonce()
142
+ {
143
+ return $this->getInfoInstance()->getAdditionalInformation('payment_method_nonce');
144
+ }
145
+
146
  /**
147
  * Capture the payment on the checkout page
148
  *
153
  */
154
  public function capture(Varien_Object $payment, $amount)
155
  {
 
 
 
156
  // Confirm that we have a nonce from Braintree
157
  // We cannot utilise the validate() function as these checks need to happen at the capture point
158
+ if(!$this->getPaymentMethodToken() && !$this->getPaymentMethodNonce()) {
 
 
 
 
 
 
159
  Mage::throwException(
160
  $this->_getHelper()->__('There has been an issue processing your PayPal payment, please try again.')
161
  );
162
  }
163
 
 
 
 
164
  // Init the environment
165
  $this->_getWrapper()->init();
166
 
167
+ if($this->getPaymentMethodToken() && $this->getPaymentMethodToken() != 'other') {
168
  $paymentArray = array(
169
+ 'paymentMethodToken' => $this->getPaymentMethodToken()
170
  );
171
  } else {
172
  $paymentArray = array(
173
+ 'paymentMethodNonce' => $this->getPaymentMethodNonce()
174
  );
175
  }
176
 
185
  $paymentArray,
186
  $payment->getOrder(),
187
  true,
188
+ $this->getInfoInstance()->getAdditionalInformation('device_data'),
189
+ $this->shouldSaveMethod($payment)
190
  );
191
 
192
  // Pass the sale array into a varien object
app/code/community/Gene/Braintree/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Gene_Braintree>
5
- <version>1.0.5.3</version>
6
  </Gene_Braintree>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Gene_Braintree>
5
+ <version>1.0.5.4</version>
6
  </Gene_Braintree>
7
  </modules>
8
  <global>
app/code/community/Gene/Braintree/etc/system.xml CHANGED
@@ -73,7 +73,8 @@
73
  <show_in_store>1</show_in_store>
74
  <frontend_class>validate-config</frontend_class>
75
  <comment><![CDATA[
76
- If you're accepting different currencies across multiple store views/websites you'll need to adjust your merchant account ID in the correct scope, if you're using the Magento currency switcher you'll need to enable the section below.
 
77
  ]]></comment>
78
  </merchant_account_id>
79
 
73
  <show_in_store>1</show_in_store>
74
  <frontend_class>validate-config</frontend_class>
75
  <comment><![CDATA[
76
+ If you're accepting different currencies across multiple store views/websites you'll need to adjust your merchant account ID in the correct scope, if you're using the Magento currency switcher you'll need to enable the section below.<br />
77
+ <a href="https://articles.braintreepayments.com/control-panel/important-gateway-credentials#merchant-account-id" target="_blank">Find out more about merchant accounts.</a>
78
  ]]></comment>
79
  </merchant_account_id>
80
 
app/design/frontend/base/default/layout/gene/braintree.xml CHANGED
@@ -21,6 +21,26 @@
21
  </reference>
22
  </checkout_onepage_index>
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  <!-- We have to use a customized version of the js.phtml file for Amasty's checkout solution -->
25
  <amasty_onestep_checkout>
26
  <reference name="head">
@@ -168,7 +188,7 @@
168
  </reference>
169
  </unicode_onestep_checkout>
170
 
171
- <!-- Add in support for the Oye one step cehckout -->
172
  <oye_onestep_checkout>
173
  <reference name="head">
174
  <action method="removeItem"><type>skin_css</type><name>css/gene/braintree/default.css</name></action>
@@ -188,6 +208,27 @@
188
  </reference>
189
  </oye_onestep_checkout>
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  <checkout_onepage_paymentmethod>
192
  <reference name="root">
193
  <block type="core/text_list" name="additional" as="additional">
21
  </reference>
22
  </checkout_onepage_index>
23
 
24
+ <checkout_multishipping_billing>
25
+ <reference name="head">
26
+ <action method="addJs"><file>gene/braintree/braintree-0.1.js</file></action>
27
+ <action method="addJs"><file>gene/braintree/vzero-0.7-min.js</file></action>
28
+ <action method="addCss"><file>css/gene/braintree/default.css</file></action>
29
+ </reference>
30
+ <reference name="before_body_end">
31
+ <block type="gene_braintree/js" name="gene_braintree_setup" template="gene/braintree/js/setup.phtml" />
32
+ <block type="gene_braintree/js" name="gene_braintree_js" template="gene/braintree/js/multishipping.phtml" />
33
+
34
+ <!-- Set the payment form ID for the fraud prevention -->
35
+ <block type="gene_braintree/js" name="gene_braintree_data" template="gene/braintree/js/data.phtml">
36
+ <action method="setData">
37
+ <key>payment_form_id</key>
38
+ <value>multishipping-billing-form</value>
39
+ </action>
40
+ </block>
41
+ </reference>
42
+ </checkout_multishipping_billing>
43
+
44
  <!-- We have to use a customized version of the js.phtml file for Amasty's checkout solution -->
45
  <amasty_onestep_checkout>
46
  <reference name="head">
188
  </reference>
189
  </unicode_onestep_checkout>
190
 
191
+ <!-- Add in support for the Oye one step checkout -->
192
  <oye_onestep_checkout>
193
  <reference name="head">
194
  <action method="removeItem"><type>skin_css</type><name>css/gene/braintree/default.css</name></action>
208
  </reference>
209
  </oye_onestep_checkout>
210
 
211
+ <!-- Add in support for the FME QuickCheckout -->
212
+ <checkout_onestep_index>
213
+ <reference name="head">
214
+ <action method="addJs"><file>gene/braintree/braintree-0.1.js</file></action>
215
+ <action method="addJs"><file>gene/braintree/vzero-0.7-min.js</file></action>
216
+ <action method="addCss"><file>css/gene/braintree/fme.css</file></action>
217
+ </reference>
218
+ <reference name="before_body_end">
219
+ <block type="gene_braintree/js" name="gene_braintree_setup" template="gene/braintree/js/setup.phtml" />
220
+ <block type="gene_braintree/js" name="gene_braintree_js" template="gene/braintree/js/fme.phtml" />
221
+
222
+ <!-- We include device data at the end of the larger form -->
223
+ <block type="gene_braintree/js" name="gene_braintree_data" template="gene/braintree/js/data.phtml">
224
+ <action method="setData">
225
+ <key>payment_form_id</key>
226
+ <value>onestepcheckout-form</value>
227
+ </action>
228
+ </block>
229
+ </reference>
230
+ </checkout_onestep_index>
231
+
232
  <checkout_onepage_paymentmethod>
233
  <reference name="root">
234
  <block type="core/text_list" name="additional" as="additional">
app/design/frontend/base/default/template/gene/braintree/js/data.phtml CHANGED
@@ -16,6 +16,10 @@
16
  <?php endif; ?>
17
  BraintreeData.setup("<?php echo Mage::getStoreConfig(Gene_Braintree_Model_Wrapper_Braintree::BRAINTREE_MERCHANT_ID_PATH); ?>", '<?php echo ($this->getPaymentFormId() ? $this->getPaymentFormId() : 'co-payment-form'); ?>', braintreeDataEnv);
18
 
 
 
 
 
19
  }
20
  </script>
21
 
16
  <?php endif; ?>
17
  BraintreeData.setup("<?php echo Mage::getStoreConfig(Gene_Braintree_Model_Wrapper_Braintree::BRAINTREE_MERCHANT_ID_PATH); ?>", '<?php echo ($this->getPaymentFormId() ? $this->getPaymentFormId() : 'co-payment-form'); ?>', braintreeDataEnv);
18
 
19
+ // Update the device_data's field name to contain payment
20
+ if ($('device_data')) {
21
+ $('device_data').setAttribute('name', 'payment[device_data]');
22
+ }
23
  }
24
  </script>
25
 
app/design/frontend/base/default/template/gene/braintree/js/firecheckout.phtml CHANGED
@@ -58,6 +58,14 @@
58
  submitCheckout: function() {
59
  // Run the original checkouts submit action
60
  return checkout.save();
 
 
 
 
 
 
 
 
61
  }
62
 
63
  });
58
  submitCheckout: function() {
59
  // Run the original checkouts submit action
60
  return checkout.save();
61
+ },
62
+
63
+ /**
64
+ * Override the loading function to set the counter to 0 so the loader actually gets hidden
65
+ */
66
+ resetLoading: function() {
67
+ checkout.loadCounter=0;
68
+ checkout.setLoadWaiting(false);
69
  }
70
 
71
  });
app/design/frontend/base/default/template/gene/braintree/js/fme.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Add in support for FME Quick Checkout
4
+ * https://www.fmeextensions.com/one-step-checkout.html
5
+ * @author Dave Macaulay <dave@gene.co.uk>
6
+ */
7
+ ?>
8
+ <!-- FME QUCKCHECKOUT BRAINTREE SUPPORT -->
9
+ <script type="text/javascript">
10
+
11
+ vZeroIntegration.addMethods({
12
+
13
+ /**
14
+ * Validate the entire checkout
15
+ * Annoyingly IWD hasn't already wrapped this in a function
16
+ */
17
+ validateAll: function() {
18
+ var validation = new Validation(review.form);
19
+ return validation.validate();
20
+ },
21
+
22
+ /**
23
+ * Hook into the checkouts loading states
24
+ */
25
+ setLoading: function () {
26
+ return onestepcheckout.setLoadWaitingReview('saving_order');
27
+ },
28
+ resetLoading: function () {
29
+ return onestepcheckout.setLoadWaitingPayment(false);
30
+ },
31
+
32
+ /**
33
+ * Attach an observer to the submit action of the checkout to tokenize the card details
34
+ */
35
+ prepareSubmitObserver: function() {
36
+
37
+ // Store a pointer to the vZero integration
38
+ var vzeroIntegration = this;
39
+
40
+ // Store the old complete checkout function
41
+ var _originalSave = Review.prototype.save;
42
+
43
+ // Re-define the original method so we can do some jazz with it
44
+ Review.prototype.save = function () {
45
+
46
+ if (vzeroIntegration.shouldInterceptSubmit('creditcard')) {
47
+
48
+ // Store a pointer to the payment class
49
+ var paymentThis = this;
50
+ var paymentArguments = arguments;
51
+
52
+ // If everything was a success on the checkout end, let's submit the vZero integration
53
+ vzeroIntegration.submit('creditcard', function () {
54
+ return _originalSave.apply(paymentThis, paymentArguments);
55
+ });
56
+
57
+ } else {
58
+ // If not run the original code
59
+ return _originalSave.apply(this, arguments);
60
+ }
61
+
62
+ };
63
+
64
+ },
65
+
66
+ /**
67
+ * The action to run after the PayPal action has been completed
68
+ */
69
+ submitCheckout: function() {
70
+ // Run the original checkouts submit action
71
+ return review.save();
72
+ }
73
+
74
+ });
75
+
76
+ /**
77
+ * Start a new instance of our integration
78
+ *
79
+ * @type {vZeroIntegration}
80
+ */
81
+ new vZeroIntegration(
82
+ (window.vzero || false),
83
+ (window.vzeroPaypal || false),
84
+ '<div id="paypal-complete"><div id="paypal-container"></div><label id="paypal-label"><?php echo $this->__('Complete checkout with'); ?> </label></div>',
85
+ '#review-buttons-container .input_button',
86
+ true,
87
+ {
88
+ ignoreAjax: ['checkout/onestep/saveOrder']
89
+ }
90
+ );
91
+
92
+ </script>
app/design/frontend/base/default/template/gene/braintree/js/multishipping.phtml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Intercept various functions for the multi shipping checkout flow
4
+ * @author Dave Macaulay <dave@gene.co.uk>
5
+ */
6
+ ?>
7
+ <!-- MULTI SHIPPING BRAINTREE SUPPORT -->
8
+ <script type="text/javascript">
9
+
10
+ vZeroIntegration.addMethods({
11
+
12
+ setLoading: function () {
13
+
14
+ },
15
+
16
+ resetLoading: function () {
17
+
18
+ },
19
+
20
+ /**
21
+ * Attach an observer to the submit action of the checkout to tokenize the card details
22
+ */
23
+ prepareSubmitObserver: function () {
24
+
25
+ // Store a pointer to the vZero integration
26
+ var vzeroIntegration = this;
27
+
28
+ // Observe the click event
29
+ var _originalSubmitEvent = $('multishipping-billing-form').submit;
30
+ $('multishipping-billing-form').submit = function braintreeOverride() {
31
+
32
+ if (vzeroIntegration.shouldInterceptSubmit('creditcard')) {
33
+
34
+ // If everything was a success on the checkout end, let's submit the vZero integration
35
+ vzeroIntegration.submit('creditcard', function () {
36
+ return _originalSubmitEvent.call($('multishipping-billing-form'), arguments);
37
+ });
38
+
39
+ } else {
40
+ return _originalSubmitEvent.call($('multishipping-billing-form'), arguments);
41
+ }
42
+
43
+ };
44
+
45
+ },
46
+
47
+ /**
48
+ * Replace the PayPal button at the correct time
49
+ *
50
+ * This should be overridden within each checkouts .phtml file
51
+ * vZeroIntegration.prototype.preparePaymentMethodSwitchObserver = function() {}
52
+ */
53
+ preparePaymentMethodSwitchObserver: function() {
54
+ // Store a pointer to the vZero integration
55
+ var vzeroIntegration = this;
56
+
57
+ // Store the original payment method
58
+ var paymentSwitchOriginal = payment.switchMethod;
59
+
60
+ // Intercept the save function
61
+ payment.switchMethod = function (method) {
62
+
63
+ // Run our method switch function
64
+ vzeroIntegration.paymentMethodSwitch(method);
65
+
66
+ // Run the original function
67
+ return paymentSwitchOriginal.apply(this, arguments);
68
+ };
69
+ }
70
+
71
+ });
72
+
73
+ /**
74
+ * Start a new instance of our integration
75
+ *
76
+ * @type {vZeroIntegration}
77
+ */
78
+ new vZeroIntegration(
79
+ (window.vzero || false),
80
+ (window.vzeroPaypal || false),
81
+ '<div id="paypal-complete"><label id="paypal-label"><?php echo $this->__('Complete checkout with'); ?> </label><div id="paypal-container"></div></div>',
82
+ '#review-buttons-container button'
83
+ );
84
+
85
+ </script>
86
+ <style type="text/css">
87
+ #paypal-label {
88
+ line-height: 44px;
89
+ float: left;
90
+ margin-right: 12px;
91
+ }
92
+ #braintree-paypal-button {
93
+ line-height: initial;
94
+ padding: 0;
95
+ float: left;
96
+ }
97
+ #braintree-paypal-loggedin {
98
+ display: none!important;
99
+ }
100
+ #braintree-paypal-loggedout {
101
+ display: block!important;
102
+ }
103
+ </style>
js/gene/braintree/config.codekit CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
- "creatorBuild": "19076",
4
  "files": {
5
  "\/braintree-0.1.js": {
6
  "fileType": 64,
@@ -138,10 +138,18 @@
138
  "active": 0,
139
  "flagValue": -1
140
  },
 
 
 
 
141
  "no_plusplus": {
142
  "active": 0,
143
  "flagValue": -1
144
  },
 
 
 
 
145
  "no_stand_alone_at": {
146
  "active": 1,
147
  "flagValue": -1
@@ -150,6 +158,10 @@
150
  "active": 1,
151
  "flagValue": -1
152
  },
 
 
 
 
153
  "no_throwing_strings": {
154
  "active": 1,
155
  "flagValue": -1
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
+ "creatorBuild": "19115",
4
  "files": {
5
  "\/braintree-0.1.js": {
6
  "fileType": 64,
138
  "active": 0,
139
  "flagValue": -1
140
  },
141
+ "no_nested_string_interpolation": {
142
+ "active": 1,
143
+ "flagValue": -1
144
+ },
145
  "no_plusplus": {
146
  "active": 0,
147
  "flagValue": -1
148
  },
149
+ "no_private_function_fat_arrows": {
150
+ "active": 1,
151
+ "flagValue": -1
152
+ },
153
  "no_stand_alone_at": {
154
  "active": 1,
155
  "flagValue": -1
158
  "active": 1,
159
  "flagValue": -1
160
  },
161
+ "no_this": {
162
+ "active": 0,
163
+ "flagValue": -1
164
+ },
165
  "no_throwing_strings": {
166
  "active": 1,
167
  "flagValue": -1
js/gene/braintree/vzero-0.7-min.js CHANGED
@@ -1,2 +1,2 @@
1
- var vZero=Class.create();vZero.prototype={initialize:function(e,t,i,n,a,s,o,r,d){this.code=e,this.clientToken=t,this.threeDSecure=i,this.hostedFields=n,a&&(this.billingName=a),s&&(this.billingPostcode=s),o&&(this.quoteUrl=o),r&&(this.tokenizeUrl=r),d&&(this.vaultToNonceUrl=d),this._hostedFieldsTokenGenerated=!1,this.acceptedCards=!1,this.closeMethod=!1,this._hostedFieldsTimeout=!1,this._updateDataXhr=!1,this._updateDataCallbacks=[],this._updateDataParams={},this._vaultToNonceXhr=!1},init:function(){this.client=new braintree.api.Client({clientToken:this.clientToken})},initHostedFields:function(e){return $$('iframe[name^="braintree-"]').length>0?!1:null===$("braintree-hosted-submit")?!1:(this.integration=e,this._hostedFieldsTokenGenerated=!1,clearTimeout(this._hostedFieldsTimeout),void(this._hostedFieldsTimeout=setTimeout(function(){if(this._hostedIntegration!==!1)try{this._hostedIntegration.teardown(function(){this._hostedIntegration=!1,this.setupHostedFieldsClient()}.bind(this))}catch(e){this.setupHostedFieldsClient()}else this.setupHostedFieldsClient()}.bind(this),50)))},setupHostedFieldsClient:function(){if($$('iframe[name^="braintree-"]').length>0)return!1;this._hostedIntegration=!1;var e={id:this.integration.form,hostedFields:{styles:{input:{"font-size":"14pt",color:"#3A3A3A"},":focus":{color:"black"},".valid":{color:"green"},".invalid":{color:"red"}},number:{selector:"#card-number",placeholder:"0000 0000 0000 0000"},expirationMonth:{selector:"#expiration-month",placeholder:"MM"},expirationYear:{selector:"#expiration-year",placeholder:"YY"},onFieldEvent:this.hostedFieldsOnFieldEvent.bind(this)},onReady:function(e){this._hostedIntegration=e}.bind(this),onPaymentMethodReceived:this.hostedFieldsPaymentMethodReceived.bind(this),onError:this.hostedFieldsError.bind(this)};null!==$("cvv")&&(e.hostedFields.cvv={selector:"#cvv"}),braintree.setup(this.clientToken,"custom",e)},hostedFieldsOnFieldEvent:function(e){if("fieldStateChange"===e.type&&e.card){var t={visa:"VI","american-express":"AE","master-card":"MC",discovery:"DI",jcb:"JCB",maestro:"ME"};void 0!==typeof t[e.card.type]?this.updateCardType(!1,t[e.card.type]):this.updateCardType(!1,"card")}},vaultToNonce:function(nonce,callback){var parameters=this.getBillingAddress();parameters.nonce=nonce,new Ajax.Request(this.vaultToNonceUrl,{method:"post",parameters:parameters,onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}response.success&&response.nonce?callback(response.nonce):("function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),response.error?alert(response.error):alert("Something wen't wrong and we're currently unable to take your payment."))}}.bind(this),onFailure:function(){"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),alert("Something wen't wrong and we're currently unable to take your payment.")}.bind(this)})},hostedFieldsPaymentMethodReceived:function(e){this.threeDSecure?("function"==typeof this.integration.setLoading&&this.integration.setLoading(),this.updateData(function(){this.vaultToNonce(e.nonce,function(e){"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),this.verify3dSecureNonce(e,{onSuccess:function(e){this.hostedFieldsNonceReceived(e.nonce)}.bind(this),onFailure:function(e,t){alert(t)}.bind(this)})}.bind(this))}.bind(this))):this.hostedFieldsNonceReceived(e.nonce)},hostedFieldsNonceReceived:function(e){$("creditcard-payment-nonce").value=e,$("creditcard-payment-nonce").setAttribute("value",e),"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),this._hostedFieldsTokenGenerated=!0,"function"==typeof this.integration.afterHostedFieldsNonceReceived&&this.integration.afterHostedFieldsNonceReceived(e)},hostedFieldsError:function(e){return"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),"undefined"!=typeof e.message&&-1==e.message.indexOf("Cannot place two elements in")&&alert(e.message),this._hostedFieldsTokenGenerated=!1,"function"==typeof this.integration.afterHostedFieldsError&&this.integration.afterHostedFieldsError(e.message),!1},usingSavedCard:function(){return void 0!=$("creditcard-saved-accounts")&&void 0!=$$("#creditcard-saved-accounts input:checked[type=radio]").first()&&"other"!==$$("#creditcard-saved-accounts input:checked[type=radio]").first().value},setThreeDSecure:function(e){this.threeDSecure=e},setAmount:function(e){this.amount=parseFloat(e)},setBillingName:function(e){this.billingName=e},getBillingName:function(){return"object"==typeof this.billingName?this.combineElementsValues(this.billingName):this.billingName},setBillingPostcode:function(e){this.billingPostcode=e},getBillingPostcode:function(){return"object"==typeof this.billingPostcode?this.combineElementsValues(this.billingPostcode):this.billingPostcode},setAcceptedCards:function(e){this.acceptedCards=e},getBillingAddress:function(){if("function"==typeof this.integration.getBillingAddress)return this.integration.getBillingAddress();var e={};return null!==$("co-billing-form")?e="FORM"==$("co-billing-form").tagName?$("co-billing-form").serialize(!0):this.extractBilling($("co-billing-form").up("form").serialize(!0)):null!==$("billing:firstname")&&(e=this.extractBilling($("billing:firstname").up("form").serialize(!0))),e?e:void 0},extractBilling:function(e){var t={};return $H(e).each(function(e){0==e.key.indexOf("billing")&&-1==e.key.indexOf("password")&&(t[e.key]=e.value)}),t},getAcceptedCards:function(){return this.acceptedCards},combineElementsValues:function(e,t){t||(t=" ");var i=[];return e.each(function(e,t){void 0!==$(e)&&(i[t]=$(e).value)}),i.join(t)},updateCardType:function(e,t){if(t||(t=this.getCardType(e)),void 0!=$("gene_braintree_creditcard_cc_type")&&("card"==t?$("gene_braintree_creditcard_cc_type").value="":$("gene_braintree_creditcard_cc_type").value=t),void 0!=$("card-type-image")){var i=$("card-type-image").src.substring(0,$("card-type-image").src.lastIndexOf("/"));$("card-type-image").setAttribute("src",i+"/"+t+".png")}},observeCardType:function(){void 0!==$$('[data-genebraintree-name="number"]').first()&&(Element.observe($$('[data-genebraintree-name="number"]').first(),"keyup",function(){vzero.updateCardType(this.value)}),$$('[data-genebraintree-name="number"]').first().oninput=function(){var e=this.value.split(" ").join("");e.length>0&&(e=e.match(new RegExp(".{1,4}","g")).join(" ")),this.value=e})},observeAjaxRequests:function(e,t){Ajax.Responders.register({onComplete:function(i){return this.handleAjaxRequest(i.url,e,t)}.bind(this)}),window.jQuery&&jQuery(document).ajaxComplete(function(i,n,a){return this.handleAjaxRequest(a.url,e,t)}.bind(this))},handleAjaxRequest:function(e,t,i){if("undefined"!=typeof i&&i instanceof Array&&i.length>0){var n=!1;if(i.each(function(t){e&&-1!=e.indexOf(t)&&(n=!0)}),n===!0)return!1}e&&-1==e.indexOf("braintree")&&(t?t(e):this.updateData())},updateData:function(callback,params){this._updateDataCallbacks.push(callback),this._updateDataParams=params,this._updateDataXhr!==!1&&this._updateDataXhr.transport.abort(),this._updateDataXhr=new Ajax.Request(this.quoteUrl,{method:"post",parameters:this._updateDataParams,onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}void 0!=response.billingName&&(this.billingName=response.billingName),void 0!=response.billingPostcode&&(this.billingPostcode=response.billingPostcode),void 0!=response.grandTotal&&(this.amount=response.grandTotal),void 0!=response.threeDSecure&&this.setThreeDSecure(response.threeDSecure),"undefined"!=typeof vzeroPaypal&&void 0!=response.grandTotal&&void 0!=response.currencyCode&&vzeroPaypal.setPricing(response.grandTotal,response.currencyCode),this._updateDataParams={},this._updateDataXhr=!1,this._updateDataCallbacks.length&&(this._updateDataCallbacks.each(function(e){e(response)}.bind(this)),this._updateDataCallbacks=[])}}.bind(this),onFailure:function(){this._updateDataParams={},this._updateDataXhr=!1,this._updateDataCallbacks=[]}.bind(this)})},close3dSecureMethod:function(e){this.closeMethod=e},tokenize3dSavedCards:function(callback){if(this.threeDSecure)if(void 0!==$$("[data-token]").first()){var tokens=[];$$("[data-token]").each(function(e,t){tokens[t]=e.getAttribute("data-token")}),new Ajax.Request(this.tokenizeUrl,{method:"post",onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}response.success&&$H(response.tokens).each(function(e){void 0!=$$('[data-token="'+e.key+'"]').first()&&$$('[data-token="'+e.key+'"]').first().setAttribute("data-threedsecure-nonce",e.value)}),callback&&callback(response)}}.bind(this),parameters:{tokens:Object.toJSON(tokens)}})}else callback();else callback()},onUserClose3ds:function(){this._hostedFieldsTokenGenerated=!1,this.closeMethod?this.closeMethod():checkout.setLoadWaiting(!1)},verify3dSecureNonce:function(e,t){var i={amount:this.amount,creditCard:e,onUserClose:this.onUserClose3ds.bind(this)};this.client.verify3DS(i,function(e,i){e?t.onFailure&&t.onFailure(i,e.message):t.onSuccess&&t.onSuccess(i)})},verify3dSecure:function(e){var t={amount:this.amount,creditCard:{number:$$('[data-genebraintree-name="number"]').first().value,expirationMonth:$$('[data-genebraintree-name="expiration_month"]').first().value,expirationYear:$$('[data-genebraintree-name="expiration_year"]').first().value,cardholderName:this.getBillingName()},onUserClose:this.onUserClose3ds.bind(this)};void 0!=$$('[data-genebraintree-name="cvv"]').first()&&(t.creditCard.cvv=$$('[data-genebraintree-name="cvv"]').first().value),""!=this.getBillingPostcode()&&(t.creditCard.billingAddress={postalCode:this.getBillingPostcode()}),this.client.verify3DS(t,function(t,i){t?(alert(t.message),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)):($("creditcard-payment-nonce").value=i.nonce,$("creditcard-payment-nonce").setAttribute("value",i.nonce),e.onSuccess&&e.onSuccess())})},verify3dSecureVault:function(e){var t=$$("#creditcard-saved-accounts input:checked[type=radio]").first().getAttribute("data-threedsecure-nonce");t?this.client.verify3DS({amount:this.amount,creditCard:t},function(t,i){t?(alert(t.message),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)):($("creditcard-payment-nonce").removeAttribute("disabled"),$("creditcard-payment-nonce").value=i.nonce,$("creditcard-payment-nonce").setAttribute("value",i.nonce),e.onSuccess&&e.onSuccess())}):(alert("No payment nonce present."),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1))},processCard:function(e){var t={number:$$('[data-genebraintree-name="number"]').first().value,cardholderName:this.getBillingName(),expirationMonth:$$('[data-genebraintree-name="expiration_month"]').first().value,expirationYear:$$('[data-genebraintree-name="expiration_year"]').first().value};void 0!=$$('[data-genebraintree-name="cvv"]').first()&&(t.cvv=$$('[data-genebraintree-name="cvv"]').first().value),""!=this.getBillingPostcode()&&(t.billingAddress={postalCode:this.getBillingPostcode()}),this.client.tokenizeCard(t,function(t,i){if(t){for(var n=0;n<t.length;n++)alert(t[n].code+" "+t[n].message);e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)}else $("creditcard-payment-nonce").value=i,$("creditcard-payment-nonce").setAttribute("value",i),e.onSuccess&&e.onSuccess()})},shouldInterceptCreditCard:function(){return!0},shouldInterceptPayPal:function(){return!0},getCardType:function(e){if(e){if(null!=e.match(/^4/))return"VI";if(null!=e.match(/^(34|37)/))return"AE";if(null!=e.match(/^5[1-5]/))return"MC";if(null!=e.match(/^6011/))return"DI";if(null!=e.match(/^(?:2131|1800|35)/))return"JCB";if(null!=e.match(/^(5018|5020|5038|6304|67[0-9]{2})/))return"ME"}return"card"},process:function(e){e=e||{},this._hostedFieldsTokenGenerated?e.onSuccess&&e.onSuccess():this.usingSavedCard()&&$$("#creditcard-saved-accounts input:checked[type=radio]").first().hasAttribute("data-threedsecure-nonce")?this.verify3dSecureVault(e):this.usingSavedCard()?e.onSuccess&&e.onSuccess():1==this.threeDSecure?this.verify3dSecure(e):this.processCard(e)},creditCardLoaded:function(){return!1},paypalLoaded:function(){return!1}};var vZeroPayPalButton=Class.create();vZeroPayPalButton.prototype={initialize:function(e,t,i,n,a){this.clientToken=e,this.storeFrontName=t,this.singleUse=i,this.locale=n,this.futureSingleUse=a,this._paypalOptions={},this._paypalIntegration=!1,this._rebuildTimer=!1,this._rebuildCount=0},setPricing:function(e,t){this.amount=parseFloat(e),this.currency=t,this.rebuildButton()},rebuildButton:function(){if(clearTimeout(this._rebuildTimer),this._paypalIntegration!==!1)try{this._paypalIntegration.teardown(function(){this._paypalIntegration=!1,this.addPayPalButton(this._paypalOptions)}.bind(this))}catch(e){if("Cannot teardown integration more than once"==e.message)this._paypalIntegration=!1,this.addPayPalButton(this._paypalOptions);else{if(this._rebuildCount>=10)return!1;this._rebuildTimer=setTimeout(function(){++this._rebuildCount,this.rebuildButton()}.bind(this),200)}}},addPayPalButton:function(e){if(null===$("paypal-container"))return!1;this._paypalOptions=e,this._paypalIntegration=!1;var t={container:"paypal-container",paymentMethodNonceInputField:"paypal-payment-nonce",displayName:this.storeFrontName,onPaymentMethodReceived:function(t){"function"==typeof e.onSuccess?e.onSuccess(t):(payment.switchMethod("gene_braintree_paypal"),$("paypal-payment-nonce").removeAttribute("disabled"),$("paypal-complete").remove(),window.review&&review.save())},onUnsupported:function(){alert("You need to link your PayPal account with your Braintree account in your Braintree control panel to utilise the PayPal functionality of this extension.")},onReady:function(t){this._paypalIntegration=t,"function"==typeof e.onReady&&e.onReady(t)}.bind(this)};this.locale&&(t.locale=this.locale),1==this.singleUse?(t.singleUse=!0,t.amount=this.amount,t.currency=this.currency):1==this.futureSingleUse?t.singleUse=!0:t.singleUse=!1,braintree.setup(this.clientToken,"paypal",t)},closePayPalWindow:function(e){}};var vZeroIntegration=Class.create();vZeroIntegration.prototype={initialize:function(e,t,i,n,a,s,o){return vZeroIntegration.prototype.loaded?(console.error("Your checkout is including the Braintree resources multiple times, please resolve this."),!1):(vZeroIntegration.prototype.loaded=!0,this.vzero=e||!1,this.vzeroPaypal=t||!1,this.vzero===!1&&this.vzeroPaypal===!1?(console.warn("The vzero and vzeroPaypal objects are not initiated."),!1):(this.paypalMarkUp=i||!1,this.paypalButtonClass=n||!1,this.isOnepage=a||!1,this.config=s||{},this._methodSwitchTimeout=!1,this._hostedFieldsInit=!1,document.observe("dom:loaded",function(){this.prepareSubmitObserver(),this.preparePaymentMethodSwitchObserver()}.bind(this)),this.hostedFieldsGenerated=!1,this.vzero.close3dSecureMethod(function(){this.vzero._hostedFieldsValidationRunning=!1,this.vzero.tokenize3dSavedCards(function(){this.threeDTokenizationComplete()}.bind(this))}.bind(this)),this.isOnepage&&(this.vzero.observeCardType(),this.observeAjaxRequests(),document.observe("dom:loaded",function(){this.initSavedPayPal(),this.initDefaultMethod(),null!==$("braintree-hosted-submit")&&this.initHostedFields()}.bind(this))),void document.observe("dom:loaded",function(){this.initSavedMethods()}.bind(this))))},initSavedMethods:function(){$$('#creditcard-saved-accounts input[type="radio"], #paypal-saved-accounts input[type="radio"]').each(function(e){var t="",i="";void 0!==e.up("#creditcard-saved-accounts")?(t="#creditcard-saved-accounts",i="#credit-card-form"):void 0!==e.up("#paypal-saved-accounts")&&(t="#paypal-saved-accounts",i=".paypal-info"),$(e).stopObserving("change").observe("change",function(e){return this.showHideOtherMethod(t,i)}.bind(this))}.bind(this))},showHideOtherMethod:function(e,t){void 0!==$$(e+" input:checked[type=radio]").first()&&"other"==$$(e+" input:checked[type=radio]").first().value?void 0!==$$(t).first()&&($$(t).first().show(),$$(t+" input, "+t+" select").each(function(e){e.removeAttribute("disabled")})):void 0!==$$(e+" input:checked[type=radio]").first()&&void 0!==$$(t).first()&&($$(t).first().hide(),$$(t+" input, "+t+" select").each(function(e){e.setAttribute("disabled","disabled")}))},checkSavedOther:function(){var e="",t="";"gene_braintree_creditcard"==this.getPaymentMethod()?(e="#creditcard-saved-accounts",t="#credit-card-form"):"gene_braintree_paypal"==this.getPaymentMethod()&&(e="#paypal-saved-accounts",t=".paypal-info"),void 0!==$$(e).first()&&this.showHideOtherMethod(e,t)},initHostedFields:function(){this.vzero.hostedFields&&null!==$("braintree-hosted-submit")&&(void 0!==$("braintree-hosted-submit").up("form")?(this._hostedFieldsInit=!0,this.form=$("braintree-hosted-submit").up("form"),this.vzero.initHostedFields(this)):console.error("Hosted Fields cannot be initialized as we're unable to locate the parent form."))},afterHostedFieldsNonceReceived:function(e){return this.resetLoading(),this.vzero._hostedFieldsTokenGenerated=!0,this.hostedFieldsGenerated=!0,this.isOnepage?this.submitCheckout():this.submitPayment()},afterHostedFieldsError:function(e){return this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,!1},initDefaultMethod:function(){this.shouldAddPayPalButton(!1)&&(this.setLoading(),this.vzero.updateData(function(){this.resetLoading(),this.updatePayPalButton("add")}.bind(this)))},observeAjaxRequests:function(){this.vzero.observeAjaxRequests(function(){this.vzero.updateData(function(){this.isOnepage&&(this.initSavedPayPal(),this.rebuildPayPalButton(),this.checkSavedOther(),this.vzero.hostedFields&&this.initHostedFields()),this.initSavedMethods()}.bind(this))}.bind(this),"undefined"!=typeof this.config.ignoreAjax?this.config.ignoreAjax:!1)},rebuildPayPalButton:function(){null==$("paypal-container")&&this.updatePayPalButton()},initSavedPayPal:function(){void 0!==$$("#paypal-saved-accounts input[type=radio]").first()&&$("paypal-saved-accounts").on("change","input[type=radio]",function(e){this.updatePayPalButton(!1,"gene_braintree_paypal")}.bind(this))},prepareSubmitObserver:function(){return!1},beforeSubmit:function(e){return this._beforeSubmit(e)},_beforeSubmit:function(e){if(this.hostedFieldsGenerated===!1&&this.vzero.hostedFields&&(void 0===$$("#creditcard-saved-accounts input:checked[type=radio]").first()||void 0!==$$("#creditcard-saved-accounts input:checked[type=radio]").first()&&"other"==$$("#creditcard-saved-accounts input:checked[type=radio]").first().value)){var t=$("braintree-hosted-submit").down("button");t.removeAttribute("disabled"),t.click()}else e()},afterSubmit:function(){return!1},submit:function(e,t,i,n){this.shouldInterceptSubmit(e)&&(this.validateAll()?(this.setLoading(),this.beforeSubmit(function(){void 0!=$$('[data-genebraintree-name="number"]').first()&&this.vzero.updateCardType($$('[data-genebraintree-name="number"]').first().value),this.vzero.updateData(function(){this.updateBilling(),this.vzero.process({onSuccess:function(){if(this.enableDeviceData(),this.disableCreditCardForm(),this.resetLoading(),this.afterSubmit(),this.enableDisableNonce(),this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,"function"==typeof t)var e=t();return this.setLoading(),this.enableCreditCardForm(),e}.bind(this),onFailure:function(){return this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,this.resetLoading(),this.afterSubmit(),"function"==typeof i?i():void 0}.bind(this)})}.bind(this),this.getUpdateDataParams())}.bind(this))):(this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,this.resetLoading(),"function"==typeof n&&n()))},submitCheckout:function(){window.review&&review.save()},submitPayment:function(){payment.save&&payment.save()},enableDisableNonce:function(){"gene_braintree_creditcard"==this.getPaymentMethod()?(null!==$("creditcard-payment-nonce")&&$("creditcard-payment-nonce").removeAttribute("disabled"),null!==$("paypal-payment-nonce")&&$("paypal-payment-nonce").setAttribute("disabled","disabled")):"gene_braintree_paypal"==this.getPaymentMethod()&&(null!==$("creditcard-payment-nonce")&&$("creditcard-payment-nonce").setAttribute("disabled","disabled"),null!==$("paypal-payment-nonce")&&$("paypal-payment-nonce").removeAttribute("disabled"))},preparePaymentMethodSwitchObserver:function(){return this.defaultPaymentMethodSwitch()},defaultPaymentMethodSwitch:function(){var e=this,t=Payment.prototype.switchMethod;Payment.prototype.switchMethod=function(i){return e.paymentMethodSwitch(i),t.apply(this,arguments)}},paymentMethodSwitch:function(e){clearTimeout(this._methodSwitchTimeout),this._methodSwitchTimeout=setTimeout(function(){this.shouldAddPayPalButton(e)?this.updatePayPalButton("add",e):this.updatePayPalButton("remove",e),"gene_braintree_creditcard"==(e?e:this.getPaymentMethod())&&this.initHostedFields(),this.checkSavedOther()}.bind(this),50)},completePayPal:function(e){return this.enableDisableNonce(),this.enableDeviceData(),e.nonce&&null!==$("paypal-payment-nonce")?($("paypal-payment-nonce").value=e.nonce,$("paypal-payment-nonce").setAttribute("value",e.nonce)):console.warn("Unable to update PayPal nonce, please verify that the nonce input field has the ID: paypal-payment-nonce"),this.afterPayPalComplete(),!1},afterPayPalComplete:function(){return this.resetLoading(),this.submitCheckout()},updatePayPalButton:function(e,t){if(this.paypalMarkUp===!1)return!1;if("refresh"==e)return this.updatePayPalButton("remove"),this.updatePayPalButton("add"),!0;if(this.shouldAddPayPalButton(t)&&"remove"!=e||"add"==e)if(void 0!==$$(this.paypalButtonClass).first()){if(void 0!==$$("#paypal-complete").first()&&$$("#paypal-complete").first().visible())return!0;$$(this.paypalButtonClass).first().hide(),$$(this.paypalButtonClass).first().insert({after:this.paypalMarkUp});var i={onSuccess:this.completePayPal.bind(this),onReady:this.paypalOnReady.bind(this)};this.vzeroPaypal.addPayPalButton(i)}else console.warn("We're unable to find the element "+this.paypalButtonClass+". Please check your integration.");else void 0!==$$(this.paypalButtonClass).first()&&$$(this.paypalButtonClass).first().show(),void 0!==$$("#paypal-complete").first()&&$("paypal-complete").remove()},paypalOnReady:function(e){null!=$("braintree-paypal-button")&&$("braintree-paypal-button").stopObserving("click").on("click",function(e){return this.validateAll()?void 0:(Event.stop(e),!1)}.bind(this))},setLoading:function(){checkout.setLoadWaiting("payment")},resetLoading:function(){checkout.setLoadWaiting(!1)},enableDeviceData:function(){null!==$("device_data")&&$("device_data").removeAttribute("disabled")},disableCreditCardForm:function(){$$("#credit-card-form input, #credit-card-form select").each(function(e){"creditcard-payment-nonce"!=e.id&&"gene_braintree_creditcard_store_in_vault"!=e.id&&e.setAttribute("disabled","disabled")})},enableCreditCardForm:function(){$$("#credit-card-form input, #credit-card-form select").each(function(e){e.removeAttribute("disabled")})},updateBilling:function(){(null!==$("billing-address-select")&&""==$("billing-address-select").value||null===$("billing-address-select"))&&(null!==$("billing:firstname")&&null!==$("billing:lastname")&&this.vzero.setBillingName($("billing:firstname").value+" "+$("billing:lastname").value),null!==$("billing:postcode")&&this.vzero.setBillingPostcode($("billing:postcode").value))},getUpdateDataParams:function(){var e={};return null!==$("billing-address-select")&&""!=$("billing-address-select").value&&(e.addressId=$("billing-address-select").value),e},getPaymentMethod:function(){return payment.currentMethod},shouldInterceptSubmit:function(e){switch(e){case"creditcard":return"gene_braintree_creditcard"==this.getPaymentMethod()&&this.vzero.shouldInterceptCreditCard();break;case"paypal":return"gene_braintree_paypal"==this.getPaymentMethod()&&this.vzero.shouldInterceptCreditCard()}return!1},shouldAddPayPalButton:function(e){return"gene_braintree_paypal"==(e?e:this.getPaymentMethod())&&null===$("paypal-saved-accounts")||"gene_braintree_paypal"==(e?e:this.getPaymentMethod())&&void 0!==$$("#paypal-saved-accounts input:checked[type=radio]").first()&&"other"==$$("#paypal-saved-accounts input:checked[type=radio]").first().value},threeDTokenizationComplete:function(){this.resetLoading()},validateAll:function(){return!0}},function(){for(var e,t=function(){},i=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],n=i.length,a=window.console=window.console||{};n--;)e=i[n],a[e]||(a[e]=t)}();
2
  //# sourceMappingURL=./vzero-0.7-min.js.map
1
+ var vZero=Class.create();vZero.prototype={initialize:function(e,t,i,n,a,s,o,r,d){this.code=e,this.clientToken=t,this.threeDSecure=i,this.hostedFields=n,a&&(this.billingName=a),s&&(this.billingPostcode=s),o&&(this.quoteUrl=o),r&&(this.tokenizeUrl=r),d&&(this.vaultToNonceUrl=d),this._hostedFieldsTokenGenerated=!1,this.acceptedCards=!1,this.closeMethod=!1,this._hostedFieldsTimeout=!1,this._updateDataXhr=!1,this._updateDataCallbacks=[],this._updateDataParams={},this._vaultToNonceXhr=!1},init:function(){this.client=new braintree.api.Client({clientToken:this.clientToken})},initHostedFields:function(e){return $$('iframe[name^="braintree-"]').length>0?!1:null===$("braintree-hosted-submit")?!1:(this.integration=e,this._hostedFieldsTokenGenerated=!1,clearTimeout(this._hostedFieldsTimeout),void(this._hostedFieldsTimeout=setTimeout(function(){if(this._hostedIntegration!==!1)try{this._hostedIntegration.teardown(function(){this._hostedIntegration=!1,this.setupHostedFieldsClient()}.bind(this))}catch(e){this.setupHostedFieldsClient()}else this.setupHostedFieldsClient()}.bind(this),50)))},setupHostedFieldsClient:function(){if($$('iframe[name^="braintree-"]').length>0)return!1;this._hostedIntegration=!1;var e={id:this.integration.form,hostedFields:{styles:{input:{"font-size":"14pt",color:"#3A3A3A"},":focus":{color:"black"},".valid":{color:"green"},".invalid":{color:"red"}},number:{selector:"#card-number",placeholder:"0000 0000 0000 0000"},expirationMonth:{selector:"#expiration-month",placeholder:"MM"},expirationYear:{selector:"#expiration-year",placeholder:"YY"},onFieldEvent:this.hostedFieldsOnFieldEvent.bind(this)},onReady:function(e){this._hostedIntegration=e}.bind(this),onPaymentMethodReceived:this.hostedFieldsPaymentMethodReceived.bind(this),onError:this.hostedFieldsError.bind(this)};null!==$("cvv")&&(e.hostedFields.cvv={selector:"#cvv"}),braintree.setup(this.clientToken,"custom",e)},hostedFieldsOnFieldEvent:function(e){if("fieldStateChange"===e.type&&e.card){var t={visa:"VI","american-express":"AE","master-card":"MC",discover:"DI",jcb:"JCB",maestro:"ME"};void 0!==typeof t[e.card.type]?this.updateCardType(!1,t[e.card.type]):this.updateCardType(!1,"card")}},vaultToNonce:function(nonce,callback){var parameters=this.getBillingAddress();parameters.nonce=nonce,new Ajax.Request(this.vaultToNonceUrl,{method:"post",parameters:parameters,onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}response.success&&response.nonce?callback(response.nonce):("function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),response.error?alert(response.error):alert("Something wen't wrong and we're currently unable to take your payment."))}}.bind(this),onFailure:function(){"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),alert("Something wen't wrong and we're currently unable to take your payment.")}.bind(this)})},hostedFieldsPaymentMethodReceived:function(e){this.threeDSecure?("function"==typeof this.integration.setLoading&&this.integration.setLoading(),this.updateData(function(){this.vaultToNonce(e.nonce,function(e){"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),this.verify3dSecureNonce(e,{onSuccess:function(e){this.hostedFieldsNonceReceived(e.nonce)}.bind(this),onFailure:function(e,t){alert(t)}.bind(this)})}.bind(this))}.bind(this))):this.hostedFieldsNonceReceived(e.nonce)},hostedFieldsNonceReceived:function(e){$("creditcard-payment-nonce").value=e,$("creditcard-payment-nonce").setAttribute("value",e),"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),this._hostedFieldsTokenGenerated=!0,"function"==typeof this.integration.afterHostedFieldsNonceReceived&&this.integration.afterHostedFieldsNonceReceived(e)},hostedFieldsError:function(e){return"function"==typeof this.integration.resetLoading&&this.integration.resetLoading(),"undefined"!=typeof e.message&&-1==e.message.indexOf("Cannot place two elements in")&&alert(e.message),this._hostedFieldsTokenGenerated=!1,"function"==typeof this.integration.afterHostedFieldsError&&this.integration.afterHostedFieldsError(e.message),!1},usingSavedCard:function(){return void 0!=$("creditcard-saved-accounts")&&void 0!=$$("#creditcard-saved-accounts input:checked[type=radio]").first()&&"other"!==$$("#creditcard-saved-accounts input:checked[type=radio]").first().value},setThreeDSecure:function(e){this.threeDSecure=e},setAmount:function(e){this.amount=parseFloat(e)},setBillingName:function(e){this.billingName=e},getBillingName:function(){return"object"==typeof this.billingName?this.combineElementsValues(this.billingName):this.billingName},setBillingPostcode:function(e){this.billingPostcode=e},getBillingPostcode:function(){return"object"==typeof this.billingPostcode?this.combineElementsValues(this.billingPostcode):this.billingPostcode},setAcceptedCards:function(e){this.acceptedCards=e},getBillingAddress:function(){if("function"==typeof this.integration.getBillingAddress)return this.integration.getBillingAddress();var e={};return null!==$("co-billing-form")?e="FORM"==$("co-billing-form").tagName?$("co-billing-form").serialize(!0):this.extractBilling($("co-billing-form").up("form").serialize(!0)):null!==$("billing:firstname")&&(e=this.extractBilling($("billing:firstname").up("form").serialize(!0))),e?e:void 0},extractBilling:function(e){var t={};return $H(e).each(function(e){0==e.key.indexOf("billing")&&-1==e.key.indexOf("password")&&(t[e.key]=e.value)}),t},getAcceptedCards:function(){return this.acceptedCards},combineElementsValues:function(e,t){t||(t=" ");var i=[];return e.each(function(e,t){void 0!==$(e)&&(i[t]=$(e).value)}),i.join(t)},updateCardType:function(e,t){if(t||(t=this.getCardType(e)),void 0!=$("gene_braintree_creditcard_cc_type")&&("card"==t?$("gene_braintree_creditcard_cc_type").value="":$("gene_braintree_creditcard_cc_type").value=t),void 0!=$("card-type-image")){var i=$("card-type-image").src.substring(0,$("card-type-image").src.lastIndexOf("/"));$("card-type-image").setAttribute("src",i+"/"+t+".png")}},observeCardType:function(){void 0!==$$('[data-genebraintree-name="number"]').first()&&(Element.observe($$('[data-genebraintree-name="number"]').first(),"keyup",function(){vzero.updateCardType(this.value)}),$$('[data-genebraintree-name="number"]').first().oninput=function(){var e=this.value.split(" ").join("");e.length>0&&(e=e.match(new RegExp(".{1,4}","g")).join(" ")),this.value=e})},observeAjaxRequests:function(e,t){Ajax.Responders.register({onComplete:function(i){return this.handleAjaxRequest(i.url,e,t)}.bind(this)}),window.jQuery&&jQuery(document).ajaxComplete(function(i,n,a){return this.handleAjaxRequest(a.url,e,t)}.bind(this))},handleAjaxRequest:function(e,t,i){if("undefined"!=typeof i&&i instanceof Array&&i.length>0){var n=!1;if(i.each(function(t){e&&-1!=e.indexOf(t)&&(n=!0)}),n===!0)return!1}e&&-1==e.indexOf("braintree")&&(t?t(e):this.updateData())},updateData:function(callback,params){this._updateDataCallbacks.push(callback),this._updateDataParams=params,this._updateDataXhr!==!1&&this._updateDataXhr.transport.abort(),this._updateDataXhr=new Ajax.Request(this.quoteUrl,{method:"post",parameters:this._updateDataParams,onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}void 0!=response.billingName&&(this.billingName=response.billingName),void 0!=response.billingPostcode&&(this.billingPostcode=response.billingPostcode),void 0!=response.grandTotal&&(this.amount=response.grandTotal),void 0!=response.threeDSecure&&this.setThreeDSecure(response.threeDSecure),"undefined"!=typeof vzeroPaypal&&void 0!=response.grandTotal&&void 0!=response.currencyCode&&vzeroPaypal.setPricing(response.grandTotal,response.currencyCode),this._updateDataParams={},this._updateDataXhr=!1,this._updateDataCallbacks.length&&(this._updateDataCallbacks.each(function(e){e(response)}.bind(this)),this._updateDataCallbacks=[])}}.bind(this),onFailure:function(){this._updateDataParams={},this._updateDataXhr=!1,this._updateDataCallbacks=[]}.bind(this)})},close3dSecureMethod:function(e){this.closeMethod=e},tokenize3dSavedCards:function(callback){if(this.threeDSecure)if(void 0!==$$("[data-token]").first()){var tokens=[];$$("[data-token]").each(function(e,t){tokens[t]=e.getAttribute("data-token")}),new Ajax.Request(this.tokenizeUrl,{method:"post",onSuccess:function(transport){if(transport&&transport.responseText){try{response=eval("("+transport.responseText+")")}catch(e){response={}}response.success&&$H(response.tokens).each(function(e){void 0!=$$('[data-token="'+e.key+'"]').first()&&$$('[data-token="'+e.key+'"]').first().setAttribute("data-threedsecure-nonce",e.value)}),callback&&callback(response)}}.bind(this),parameters:{tokens:Object.toJSON(tokens)}})}else callback();else callback()},onUserClose3ds:function(){this._hostedFieldsTokenGenerated=!1,this.closeMethod?this.closeMethod():checkout.setLoadWaiting(!1)},verify3dSecureNonce:function(e,t){var i={amount:this.amount,creditCard:e,onUserClose:this.onUserClose3ds.bind(this)};this.client.verify3DS(i,function(e,i){e?t.onFailure&&t.onFailure(i,e.message):t.onSuccess&&t.onSuccess(i)})},verify3dSecure:function(e){var t={amount:this.amount,creditCard:{number:$$('[data-genebraintree-name="number"]').first().value,expirationMonth:$$('[data-genebraintree-name="expiration_month"]').first().value,expirationYear:$$('[data-genebraintree-name="expiration_year"]').first().value,cardholderName:this.getBillingName()},onUserClose:this.onUserClose3ds.bind(this)};void 0!=$$('[data-genebraintree-name="cvv"]').first()&&(t.creditCard.cvv=$$('[data-genebraintree-name="cvv"]').first().value),""!=this.getBillingPostcode()&&(t.creditCard.billingAddress={postalCode:this.getBillingPostcode()}),this.client.verify3DS(t,function(t,i){t?(alert(t.message),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)):($("creditcard-payment-nonce").value=i.nonce,$("creditcard-payment-nonce").setAttribute("value",i.nonce),e.onSuccess&&e.onSuccess())})},verify3dSecureVault:function(e){var t=$$("#creditcard-saved-accounts input:checked[type=radio]").first().getAttribute("data-threedsecure-nonce");t?this.client.verify3DS({amount:this.amount,creditCard:t},function(t,i){t?(alert(t.message),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)):($("creditcard-payment-nonce").removeAttribute("disabled"),$("creditcard-payment-nonce").value=i.nonce,$("creditcard-payment-nonce").setAttribute("value",i.nonce),e.onSuccess&&e.onSuccess())}):(alert("No payment nonce present."),e.onFailure?e.onFailure():checkout.setLoadWaiting(!1))},processCard:function(e){var t={number:$$('[data-genebraintree-name="number"]').first().value,cardholderName:this.getBillingName(),expirationMonth:$$('[data-genebraintree-name="expiration_month"]').first().value,expirationYear:$$('[data-genebraintree-name="expiration_year"]').first().value};void 0!=$$('[data-genebraintree-name="cvv"]').first()&&(t.cvv=$$('[data-genebraintree-name="cvv"]').first().value),""!=this.getBillingPostcode()&&(t.billingAddress={postalCode:this.getBillingPostcode()}),this.client.tokenizeCard(t,function(t,i){if(t){for(var n=0;n<t.length;n++)alert(t[n].code+" "+t[n].message);e.onFailure?e.onFailure():checkout.setLoadWaiting(!1)}else $("creditcard-payment-nonce").value=i,$("creditcard-payment-nonce").setAttribute("value",i),e.onSuccess&&e.onSuccess()})},shouldInterceptCreditCard:function(){return!0},shouldInterceptPayPal:function(){return!0},getCardType:function(e){if(e){if(null!=e.match(/^4/))return"VI";if(null!=e.match(/^(34|37)/))return"AE";if(null!=e.match(/^5[1-5]/))return"MC";if(null!=e.match(/^6011/))return"DI";if(null!=e.match(/^(?:2131|1800|35)/))return"JCB";if(null!=e.match(/^(5018|5020|5038|6304|67[0-9]{2})/))return"ME"}return"card"},process:function(e){e=e||{},this._hostedFieldsTokenGenerated?e.onSuccess&&e.onSuccess():this.usingSavedCard()&&$$("#creditcard-saved-accounts input:checked[type=radio]").first().hasAttribute("data-threedsecure-nonce")?this.verify3dSecureVault(e):this.usingSavedCard()?e.onSuccess&&e.onSuccess():1==this.threeDSecure?this.verify3dSecure(e):this.processCard(e)},creditCardLoaded:function(){return!1},paypalLoaded:function(){return!1}};var vZeroPayPalButton=Class.create();vZeroPayPalButton.prototype={initialize:function(e,t,i,n,a){this.clientToken=e,this.storeFrontName=t,this.singleUse=i,this.locale=n,this.futureSingleUse=a,this._paypalOptions={},this._paypalIntegration=!1,this._rebuildTimer=!1,this._rebuildCount=0},setPricing:function(e,t){this.amount=parseFloat(e),this.currency=t,this.rebuildButton()},rebuildButton:function(){if(clearTimeout(this._rebuildTimer),this._paypalIntegration!==!1)try{this._paypalIntegration.teardown(function(){this._paypalIntegration=!1,this.addPayPalButton(this._paypalOptions)}.bind(this))}catch(e){if("Cannot teardown integration more than once"==e.message)this._paypalIntegration=!1,this.addPayPalButton(this._paypalOptions);else{if(this._rebuildCount>=10)return!1;this._rebuildTimer=setTimeout(function(){++this._rebuildCount,this.rebuildButton()}.bind(this),200)}}},addPayPalButton:function(e){if(null===$("paypal-container"))return!1;this._paypalOptions=e,this._paypalIntegration=!1;var t={container:"paypal-container",paymentMethodNonceInputField:"paypal-payment-nonce",displayName:this.storeFrontName,onPaymentMethodReceived:function(t){"function"==typeof e.onSuccess?e.onSuccess(t):(payment.switchMethod("gene_braintree_paypal"),$("paypal-payment-nonce").removeAttribute("disabled"),$("paypal-complete").remove(),window.review&&review.save())},onUnsupported:function(){alert("You need to link your PayPal account with your Braintree account in your Braintree control panel to utilise the PayPal functionality of this extension.")},onReady:function(t){this._paypalIntegration=t,"function"==typeof e.onReady&&e.onReady(t)}.bind(this)};this.locale&&(t.locale=this.locale),1==this.singleUse?(t.singleUse=!0,t.amount=this.amount,t.currency=this.currency):1==this.futureSingleUse?t.singleUse=!0:t.singleUse=!1,braintree.setup(this.clientToken,"paypal",t)},closePayPalWindow:function(e){}};var vZeroIntegration=Class.create();vZeroIntegration.prototype={initialize:function(e,t,i,n,a,s,o){return vZeroIntegration.prototype.loaded?(console.error("Your checkout is including the Braintree resources multiple times, please resolve this."),!1):(vZeroIntegration.prototype.loaded=!0,this.vzero=e||!1,this.vzeroPaypal=t||!1,this.vzero===!1&&this.vzeroPaypal===!1?(console.warn("The vzero and vzeroPaypal objects are not initiated."),!1):(this.paypalMarkUp=i||!1,this.paypalButtonClass=n||!1,this.isOnepage=a||!1,this.config=s||{},this._methodSwitchTimeout=!1,this._hostedFieldsInit=!1,document.observe("dom:loaded",function(){this.prepareSubmitObserver(),this.preparePaymentMethodSwitchObserver()}.bind(this)),this.hostedFieldsGenerated=!1,this.vzero.close3dSecureMethod(function(){this.vzero._hostedFieldsValidationRunning=!1,this.vzero.tokenize3dSavedCards(function(){this.threeDTokenizationComplete()}.bind(this))}.bind(this)),this.isOnepage&&(this.vzero.observeCardType(),this.observeAjaxRequests(),document.observe("dom:loaded",function(){this.initSavedPayPal(),this.initDefaultMethod(),null!==$("braintree-hosted-submit")&&this.initHostedFields()}.bind(this))),void document.observe("dom:loaded",function(){this.initSavedMethods()}.bind(this))))},initSavedMethods:function(){$$('#creditcard-saved-accounts input[type="radio"], #paypal-saved-accounts input[type="radio"]').each(function(e){var t="",i="";void 0!==e.up("#creditcard-saved-accounts")?(t="#creditcard-saved-accounts",i="#credit-card-form"):void 0!==e.up("#paypal-saved-accounts")&&(t="#paypal-saved-accounts",i=".paypal-info"),$(e).stopObserving("change").observe("change",function(e){return this.showHideOtherMethod(t,i)}.bind(this))}.bind(this))},showHideOtherMethod:function(e,t){void 0!==$$(e+" input:checked[type=radio]").first()&&"other"==$$(e+" input:checked[type=radio]").first().value?void 0!==$$(t).first()&&($$(t).first().show(),$$(t+" input, "+t+" select").each(function(e){e.removeAttribute("disabled")})):void 0!==$$(e+" input:checked[type=radio]").first()&&void 0!==$$(t).first()&&($$(t).first().hide(),$$(t+" input, "+t+" select").each(function(e){e.setAttribute("disabled","disabled")}))},checkSavedOther:function(){var e="",t="";"gene_braintree_creditcard"==this.getPaymentMethod()?(e="#creditcard-saved-accounts",t="#credit-card-form"):"gene_braintree_paypal"==this.getPaymentMethod()&&(e="#paypal-saved-accounts",t=".paypal-info"),void 0!==$$(e).first()&&this.showHideOtherMethod(e,t)},initHostedFields:function(){this.vzero.hostedFields&&null!==$("braintree-hosted-submit")&&(void 0!==$("braintree-hosted-submit").up("form")?(this._hostedFieldsInit=!0,this.form=$("braintree-hosted-submit").up("form"),this.vzero.initHostedFields(this)):console.error("Hosted Fields cannot be initialized as we're unable to locate the parent form."))},afterHostedFieldsNonceReceived:function(e){return this.resetLoading(),this.vzero._hostedFieldsTokenGenerated=!0,this.hostedFieldsGenerated=!0,this.isOnepage?this.submitCheckout():this.submitPayment()},afterHostedFieldsError:function(e){return this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,!1},initDefaultMethod:function(){this.shouldAddPayPalButton(!1)&&(this.setLoading(),this.vzero.updateData(function(){this.resetLoading(),this.updatePayPalButton("add")}.bind(this)))},observeAjaxRequests:function(){this.vzero.observeAjaxRequests(function(){this.vzero.updateData(function(){this.isOnepage&&(this.initSavedPayPal(),this.rebuildPayPalButton(),this.checkSavedOther(),this.vzero.hostedFields&&this.initHostedFields()),this.initSavedMethods()}.bind(this))}.bind(this),"undefined"!=typeof this.config.ignoreAjax?this.config.ignoreAjax:!1)},rebuildPayPalButton:function(){null==$("paypal-container")&&this.updatePayPalButton()},initSavedPayPal:function(){void 0!==$$("#paypal-saved-accounts input[type=radio]").first()&&$("paypal-saved-accounts").on("change","input[type=radio]",function(e){this.updatePayPalButton(!1,"gene_braintree_paypal")}.bind(this))},prepareSubmitObserver:function(){return!1},beforeSubmit:function(e){return this._beforeSubmit(e)},_beforeSubmit:function(e){if(this.hostedFieldsGenerated===!1&&this.vzero.hostedFields&&(void 0===$$("#creditcard-saved-accounts input:checked[type=radio]").first()||void 0!==$$("#creditcard-saved-accounts input:checked[type=radio]").first()&&"other"==$$("#creditcard-saved-accounts input:checked[type=radio]").first().value)){var t=$("braintree-hosted-submit").down("button");t.removeAttribute("disabled"),t.click()}else e()},afterSubmit:function(){return!1},submit:function(e,t,i,n){this.shouldInterceptSubmit(e)&&(this.validateAll()?(this.setLoading(),this.beforeSubmit(function(){void 0!=$$('[data-genebraintree-name="number"]').first()&&this.vzero.updateCardType($$('[data-genebraintree-name="number"]').first().value),this.vzero.updateData(function(){this.updateBilling(),this.vzero.process({onSuccess:function(){if(this.enableDeviceData(),this.disableCreditCardForm(),this.resetLoading(),this.afterSubmit(),this.enableDisableNonce(),this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,"function"==typeof t)var e=t();return this.setLoading(),this.enableCreditCardForm(),e}.bind(this),onFailure:function(){return this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,this.resetLoading(),this.afterSubmit(),"function"==typeof i?i():void 0}.bind(this)})}.bind(this),this.getUpdateDataParams())}.bind(this))):(this.vzero._hostedFieldsTokenGenerated=!1,this.hostedFieldsGenerated=!1,this.resetLoading(),"function"==typeof n&&n()))},submitCheckout:function(){window.review&&review.save()},submitPayment:function(){payment.save&&payment.save()},enableDisableNonce:function(){"gene_braintree_creditcard"==this.getPaymentMethod()?(null!==$("creditcard-payment-nonce")&&$("creditcard-payment-nonce").removeAttribute("disabled"),null!==$("paypal-payment-nonce")&&$("paypal-payment-nonce").setAttribute("disabled","disabled")):"gene_braintree_paypal"==this.getPaymentMethod()&&(null!==$("creditcard-payment-nonce")&&$("creditcard-payment-nonce").setAttribute("disabled","disabled"),null!==$("paypal-payment-nonce")&&$("paypal-payment-nonce").removeAttribute("disabled"))},preparePaymentMethodSwitchObserver:function(){return this.defaultPaymentMethodSwitch()},defaultPaymentMethodSwitch:function(){var e=this,t=Payment.prototype.switchMethod;Payment.prototype.switchMethod=function(i){return e.paymentMethodSwitch(i),t.apply(this,arguments)}},paymentMethodSwitch:function(e){clearTimeout(this._methodSwitchTimeout),this._methodSwitchTimeout=setTimeout(function(){this.shouldAddPayPalButton(e)?this.updatePayPalButton("add",e):this.updatePayPalButton("remove",e),"gene_braintree_creditcard"==(e?e:this.getPaymentMethod())&&this.initHostedFields(),this.checkSavedOther()}.bind(this),50)},completePayPal:function(e){return this.enableDisableNonce(),this.enableDeviceData(),e.nonce&&null!==$("paypal-payment-nonce")?($("paypal-payment-nonce").value=e.nonce,$("paypal-payment-nonce").setAttribute("value",e.nonce)):console.warn("Unable to update PayPal nonce, please verify that the nonce input field has the ID: paypal-payment-nonce"),this.afterPayPalComplete(),!1},afterPayPalComplete:function(){return this.resetLoading(),this.submitCheckout()},updatePayPalButton:function(e,t){if(this.paypalMarkUp===!1)return!1;if("refresh"==e)return this.updatePayPalButton("remove"),this.updatePayPalButton("add"),!0;if(this.shouldAddPayPalButton(t)&&"remove"!=e||"add"==e)if(void 0!==$$(this.paypalButtonClass).first()){if(void 0!==$$("#paypal-complete").first()&&$$("#paypal-complete").first().visible())return!0;$$(this.paypalButtonClass).first().hide(),$$(this.paypalButtonClass).first().insert({after:this.paypalMarkUp});var i={onSuccess:this.completePayPal.bind(this),onReady:this.paypalOnReady.bind(this)};this.vzeroPaypal.addPayPalButton(i)}else console.warn("We're unable to find the element "+this.paypalButtonClass+". Please check your integration.");else void 0!==$$(this.paypalButtonClass).first()&&$$(this.paypalButtonClass).first().show(),void 0!==$$("#paypal-complete").first()&&$("paypal-complete").remove()},paypalOnReady:function(e){null!=$("braintree-paypal-button")&&$("braintree-paypal-button").stopObserving("click").on("click",function(e){return this.validateAll()?void 0:(Event.stop(e),!1)}.bind(this))},setLoading:function(){checkout.setLoadWaiting("payment")},resetLoading:function(){checkout.setLoadWaiting(!1)},enableDeviceData:function(){null!==$("device_data")&&($("device_data").setAttribute("name","payment[device_data]"),$("device_data").removeAttribute("disabled"))},disableCreditCardForm:function(){$$("#credit-card-form input, #credit-card-form select").each(function(e){"creditcard-payment-nonce"!=e.id&&"gene_braintree_creditcard_store_in_vault"!=e.id&&e.setAttribute("disabled","disabled")})},enableCreditCardForm:function(){$$("#credit-card-form input, #credit-card-form select").each(function(e){e.removeAttribute("disabled")})},updateBilling:function(){(null!==$("billing-address-select")&&""==$("billing-address-select").value||null===$("billing-address-select"))&&(null!==$("billing:firstname")&&null!==$("billing:lastname")&&this.vzero.setBillingName($("billing:firstname").value+" "+$("billing:lastname").value),null!==$("billing:postcode")&&this.vzero.setBillingPostcode($("billing:postcode").value))},getUpdateDataParams:function(){var e={};return null!==$("billing-address-select")&&""!=$("billing-address-select").value&&(e.addressId=$("billing-address-select").value),e},getPaymentMethod:function(){return payment.currentMethod},shouldInterceptSubmit:function(e){switch(e){case"creditcard":return"gene_braintree_creditcard"==this.getPaymentMethod()&&this.vzero.shouldInterceptCreditCard();break;case"paypal":return"gene_braintree_paypal"==this.getPaymentMethod()&&this.vzero.shouldInterceptCreditCard()}return!1},shouldAddPayPalButton:function(e){return"gene_braintree_paypal"==(e?e:this.getPaymentMethod())&&null===$("paypal-saved-accounts")||"gene_braintree_paypal"==(e?e:this.getPaymentMethod())&&void 0!==$$("#paypal-saved-accounts input:checked[type=radio]").first()&&"other"==$$("#paypal-saved-accounts input:checked[type=radio]").first().value},threeDTokenizationComplete:function(){this.resetLoading()},validateAll:function(){return!0}},function(){for(var e,t=function(){},i=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],n=i.length,a=window.console=window.console||{};n--;)e=i[n],a[e]||(a[e]=t)}();
2
  //# sourceMappingURL=./vzero-0.7-min.js.map
js/gene/braintree/vzero-0.7-min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["vzero-0.7.js"],"names":["vZero","Class","create","prototype","initialize","code","clientToken","threeDSecure","hostedFields","billingName","billingPostcode","quoteUrl","tokenizeUrl","vaultToNonceUrl","this","_hostedFieldsTokenGenerated","acceptedCards","closeMethod","_hostedFieldsTimeout","_updateDataXhr","_updateDataCallbacks","_updateDataParams","_vaultToNonceXhr","init","client","braintree","api","Client","initHostedFields","integration","$$","length","$","clearTimeout","setTimeout","_hostedIntegration","teardown","setupHostedFieldsClient","bind","e","hostedFieldsConfiguration","id","form","styles","input","font-size","color",":focus",".valid",".invalid","number","selector","placeholder","expirationMonth","expirationYear","onFieldEvent","hostedFieldsOnFieldEvent","onReady","onPaymentMethodReceived","hostedFieldsPaymentMethodReceived","onError","hostedFieldsError","cvv","setup","event","type","card","cardMapping","visa","american-express","master-card","discovery","jcb","maestro","undefined","updateCardType","vaultToNonce","nonce","callback","parameters","getBillingAddress","Ajax","Request","method","onSuccess","transport","responseText","response","eval","success","resetLoading","error","alert","onFailure","setLoading","updateData","verify3dSecureNonce","hostedFieldsNonceReceived","value","setAttribute","afterHostedFieldsNonceReceived","message","indexOf","afterHostedFieldsError","usingSavedCard","first","setThreeDSecure","flag","setAmount","amount","parseFloat","setBillingName","getBillingName","combineElementsValues","setBillingPostcode","getBillingPostcode","setAcceptedCards","cards","billingAddress","tagName","serialize","extractBilling","up","formData","billing","$H","each","data","key","getAcceptedCards","elements","seperator","element","index","join","cardNumber","cardType","getCardType","skinImageUrl","src","substring","lastIndexOf","observeCardType","Element","observe","vzero","oninput","split","match","RegExp","observeAjaxRequests","ignore","Responders","register","onComplete","handleAjaxRequest","url","window","jQuery","document","ajaxComplete","xhr","settings","Array","shouldIgnore","params","push","abort","grandTotal","vzeroPaypal","currencyCode","setPricing","close3dSecureMethod","tokenize3dSavedCards","tokens","getAttribute","Object","toJSON","onUserClose3ds","checkout","setLoadWaiting","options","threeDSecureRequest","creditCard","onUserClose","verify3DS","verify3dSecure","cardholderName","postalCode","verify3dSecureVault","paymentNonce","removeAttribute","processCard","tokenizeRequest","tokenizeCard","errors","i","shouldInterceptCreditCard","shouldInterceptPayPal","process","hasAttribute","creditCardLoaded","paypalLoaded","vZeroPayPalButton","storeFrontName","singleUse","locale","futureSingleUse","_paypalOptions","_paypalIntegration","_rebuildTimer","_rebuildCount","currency","rebuildButton","addPayPalButton","setupConfiguration","container","paymentMethodNonceInputField","displayName","obj","payment","switchMethod","remove","review","save","onUnsupported","closePayPalWindow","vZeroIntegration","paypalMarkUp","paypalButtonClass","isOnepage","config","loaded","console","warn","_methodSwitchTimeout","_hostedFieldsInit","prepareSubmitObserver","preparePaymentMethodSwitchObserver","hostedFieldsGenerated","_hostedFieldsValidationRunning","threeDTokenizationComplete","initSavedPayPal","initDefaultMethod","initSavedMethods","parentElement","targetElement","stopObserving","showHideOtherMethod","show","formElement","hide","checkSavedOther","getPaymentMethod","submitCheckout","submitPayment","shouldAddPayPalButton","updatePayPalButton","rebuildPayPalButton","ignoreAjax","on","beforeSubmit","_beforeSubmit","button","down","click","afterSubmit","submit","successCallback","failedCallback","validateFailedCallback","shouldInterceptSubmit","validateAll","updateBilling","enableDeviceData","disableCreditCardForm","enableDisableNonce","enableCreditCardForm","getUpdateDataParams","defaultPaymentMethodSwitch","vzeroIntegration","paymentSwitchOriginal","Payment","paymentMethodSwitch","apply","arguments","completePayPal","afterPayPalComplete","action","visible","insert","after","buttonParams","paypalOnReady","Event","stop","addressId","currentMethod","noop","methods"],"mappings":"AAOA,GAAIA,OAAQC,MAAMC,QAClBF,OAAMG,WAeFC,WAAY,SAAUC,EAAMC,EAAaC,EAAcC,EAAcC,EAAaC,EAAiBC,EAAUC,EAAaC,GACtHC,KAAKT,KAAOA,EACZS,KAAKR,YAAcA,EACnBQ,KAAKP,aAAeA,EACpBO,KAAKN,aAAeA,EAEhBC,IACAK,KAAKL,YAAcA,GAEnBC,IACAI,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BAAoBkE,SAUhEoL,oBAAqB,WACjB,GAAIvM,KAOJ,OAJoC,QAAhC/C,EAAE,2BAA2E,IAArCA,EAAE,0BAA0BkE,QACpEnB,EAAWyN,UAAYxQ,EAAE,0BAA0BkE,OAGhDnB,GAQX8K,iBAAkB,WACd,MAAOjC,SAAQ6E,eASnB1B,sBAAuB,SAAS9M,GAC5B,OAAOA,GACH,IAAK,aACD,MAAmC,6BAA3BnD,KAAK+O,oBAAqD/O,KAAKmI,MAAMoD,2BAC7E,MACJ,KAAK,SACD,MAAmC,yBAA3BvL,KAAK+O,oBAAiD/O,KAAKmI,MAAMoD,4BAGjF,OAAO,GAOX2D,sBAAuB,SAAS7K,GAC5B,MAAwD,0BAA9CA,EAASA,EAASrE,KAAK+O,qBAAiF,OAA/B7N,EAAE,0BAAsF,0BAA9CmD,EAASA,EAASrE,KAAK+O,qBAAsHnL,SAAnE5C,GAAG,oDAAoD2E,SAAiG,SAAxE3E,GAAG,oDAAoD2E,QAAQP,OAM1V+I,2BAA4B,WACxBnO,KAAK4E,gBAQTsL,YAAa,WACT,OAAO,IAMd,WAYG,IAXA,GAAI7L,GACAuN,EAAO,aACPC,GACA,SAAU,QAAS,QAAS,QAAS,MAAO,SAAU,QACtD,YAAa,QAAS,iBAAkB,WAAY,OAAQ,MAC5D,eAAgB,UAAW,aAAc,QAAS,OAAQ,UAC1D,YAAa,QAAS,QAEtB5Q,EAAS4Q,EAAQ5Q,OACjB0M,EAAW5E,OAAO4E,QAAU5E,OAAO4E,YAEhC1M,KACHoD,EAASwN,EAAQ5Q,GAGZ0M,EAAQtJ,KACTsJ,EAAQtJ,GAAUuN","file":"vzero-0.7-min.js"}
1
+ {"version":3,"sources":["vzero-0.7.js"],"names":["vZero","Class","create","prototype","initialize","code","clientToken","threeDSecure","hostedFields","billingName","billingPostcode","quoteUrl","tokenizeUrl","vaultToNonceUrl","this","_hostedFieldsTokenGenerated","acceptedCards","closeMethod","_hostedFieldsTimeout","_updateDataXhr","_updateDataCallbacks","_updateDataParams","_vaultToNonceXhr","init","client","braintree","api","Client","initHostedFields","integration","$$","length","$","clearTimeout","setTimeout","_hostedIntegration","teardown","setupHostedFieldsClient","bind","e","hostedFieldsConfiguration","id","form","styles","input","font-size","color",":focus",".valid",".invalid","number","selector","placeholder","expirationMonth","expirationYear","onFieldEvent","hostedFieldsOnFieldEvent","onReady","onPaymentMethodReceived","hostedFieldsPaymentMethodReceived","onError","hostedFieldsError","cvv","setup","event","type","card","cardMapping","visa","american-express","master-card","discover","jcb","maestro","undefined","updateCardType","vaultToNonce","nonce","callback","parameters","getBillingAddress","Ajax","Request","method","onSuccess","transport","responseText","response","eval","success","resetLoading","error","alert","onFailure","setLoading","updateData","verify3dSecureNonce","hostedFieldsNonceReceived","value","setAttribute","afterHostedFieldsNonceReceived","message","indexOf","afterHostedFieldsError","usingSavedCard","first","setThreeDSecure","flag","setAmount","amount","parseFloat","setBillingName","getBillingName","combineElementsValues","setBillingPostcode","getBillingPostcode","setAcceptedCards","cards","billingAddress","tagName","serialize","extractBilling","up","formData","billing","$H","each","data","key","getAcceptedCards","elements","seperator","element","index","join","cardNumber","cardType","getCardType","skinImageUrl","src","substring","lastIndexOf","observeCardType","Element","observe","vzero","oninput","split","match","RegExp","observeAjaxRequests","ignore","Responders","register","onComplete","handleAjaxRequest","url","window","jQuery","document","ajaxComplete","xhr","settings","Array","shouldIgnore","params","push","abort","grandTotal","vzeroPaypal","currencyCode","setPricing","close3dSecureMethod","tokenize3dSavedCards","tokens","getAttribute","Object","toJSON","onUserClose3ds","checkout","setLoadWaiting","options","threeDSecureRequest","creditCard","onUserClose","verify3DS","verify3dSecure","cardholderName","postalCode","verify3dSecureVault","paymentNonce","removeAttribute","processCard","tokenizeRequest","tokenizeCard","errors","i","shouldInterceptCreditCard","shouldInterceptPayPal","process","hasAttribute","creditCardLoaded","paypalLoaded","vZeroPayPalButton","storeFrontName","singleUse","locale","futureSingleUse","_paypalOptions","_paypalIntegration","_rebuildTimer","_rebuildCount","currency","rebuildButton","addPayPalButton","setupConfiguration","container","paymentMethodNonceInputField","displayName","obj","payment","switchMethod","remove","review","save","onUnsupported","closePayPalWindow","vZeroIntegration","paypalMarkUp","paypalButtonClass","isOnepage","config","loaded","console","warn","_methodSwitchTimeout","_hostedFieldsInit","prepareSubmitObserver","preparePaymentMethodSwitchObserver","hostedFieldsGenerated","_hostedFieldsValidationRunning","threeDTokenizationComplete","initSavedPayPal","initDefaultMethod","initSavedMethods","parentElement","targetElement","stopObserving","showHideOtherMethod","show","formElement","hide","checkSavedOther","getPaymentMethod","submitCheckout","submitPayment","shouldAddPayPalButton","updatePayPalButton","rebuildPayPalButton","ignoreAjax","on","beforeSubmit","_beforeSubmit","button","down","click","afterSubmit","submit","successCallback","failedCallback","validateFailedCallback","shouldInterceptSubmit","validateAll","updateBilling","enableDeviceData","disableCreditCardForm","enableDisableNonce","enableCreditCardForm","getUpdateDataParams","defaultPaymentMethodSwitch","vzeroIntegration","paymentSwitchOriginal","Payment","paymentMethodSwitch","apply","arguments","completePayPal","afterPayPalComplete","action","visible","insert","after","buttonParams","paypalOnReady","Event","stop","addressId","currentMethod","noop","methods"],"mappings":"AAOA,GAAIA,OAAQC,MAAMC,QAClBF,OAAMG,WAeFC,WAAY,SAAUC,EAAMC,EAAaC,EAAcC,EAAcC,EAAaC,EAAiBC,EAAUC,EAAaC,GACtHC,KAAKT,KAAOA,EACZS,KAAKR,YAAcA,EACnBQ,KAAKP,aAAeA,EACpBO,KAAKN,aAAeA,EAEhBC,IACAK,KAAKL,YAAcA,GAEnBC,IACAI,KAAKJ,gBAAkBA,GAEvBC,IACAG,KAAKH,SAAWA,GAEhBC,IACAE,KAAKF,YAAcA,GAEpBC,IACCC,KAAKD,gBAAkBA,GAG3BC,KAAKC,6BAA8B,EAEnCD,KAAKE,eAAgB,EAErBF,KAAKG,aAAc,EAGnBH,KAAKI,sBAAuB,EAG5BJ,KAAKK,gBAAiB,EACtBL,KAAKM,wBACLN,KAAKO,qBAELP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GAC5B,OAAOA,GACH,IAAK,aACD,MAAmC,6BAA3BnD,KAAK+O,oBAAqD/O,KAAKmI,MAAMoD,2BAC7E,MACJ,KAAK,SACD,MAAmC,yBAA3BvL,KAAK+O,oBAAiD/O,KAAKmI,MAAMoD,4BAGjF,OAAO,GAOX2D,sBAAuB,SAAS7K,GAC5B,MAAwD,0BAA9CA,EAASA,EAASrE,KAAK+O,qBAAiF,OAA/B7N,EAAE,0BAAsF,0BAA9CmD,EAASA,EAASrE,KAAK+O,qBAAsHnL,SAAnE5C,GAAG,oDAAoD2E,SAAiG,SAAxE3E,GAAG,oDAAoD2E,QAAQP,OAM1V+I,2BAA4B,WACxBnO,KAAK4E,gBAQTsL,YAAa,WACT,OAAO,IAMd,WAYG,IAXA,GAAI7L,GACAuN,EAAO,aACPC,GACA,SAAU,QAAS,QAAS,QAAS,MAAO,SAAU,QACtD,YAAa,QAAS,iBAAkB,WAAY,OAAQ,MAC5D,eAAgB,UAAW,aAAc,QAAS,OAAQ,UAC1D,YAAa,QAAS,QAEtB5Q,EAAS4Q,EAAQ5Q,OACjB0M,EAAW5E,OAAO4E,QAAU5E,OAAO4E,YAEhC1M,KACHoD,EAASwN,EAAQ5Q,GAGZ0M,EAAQtJ,KACTsJ,EAAQtJ,GAAUuN","file":"vzero-0.7-min.js"}
js/gene/braintree/vzero-0.7.js CHANGED
@@ -190,7 +190,7 @@ vZero.prototype = {
190
  'visa': 'VI',
191
  'american-express': 'AE',
192
  'master-card': 'MC',
193
- 'discovery': 'DI',
194
  'jcb': 'JCB',
195
  'maestro': 'ME'
196
  };
@@ -2017,6 +2017,7 @@ vZeroIntegration.prototype = {
2017
  */
2018
  enableDeviceData: function() {
2019
  if ($('device_data') !== null) {
 
2020
  $('device_data').removeAttribute('disabled');
2021
  }
2022
  },
190
  'visa': 'VI',
191
  'american-express': 'AE',
192
  'master-card': 'MC',
193
+ 'discover': 'DI',
194
  'jcb': 'JCB',
195
  'maestro': 'ME'
196
  };
2017
  */
2018
  enableDeviceData: function() {
2019
  if ($('device_data') !== null) {
2020
+ $('device_data').setAttribute('name', 'payment[device_data]');
2021
  $('device_data').removeAttribute('disabled');
2022
  }
2023
  },
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Gene_Braintree</name>
4
- <version>1.0.5.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
@@ -36,9 +36,9 @@ Easily add PayPal to your checkout. We've built the best PayPal integration arou
36
  &lt;/ul&gt;</description>
37
  <notes>Connect your Magento store to Braintree to accept Credit Cards &amp;amp; PayPal using V.Zero SDK</notes>
38
  <authors><author><name>Dave Macaulay</name><user>dave</user><email>magento@gene.co.uk</email></author></authors>
39
- <date>2016-02-04</date>
40
- <time>17:07:53</time>
41
- <contents><target name="magecommunity"><dir name="Gene"><dir name="Braintree"><dir name="Block"><dir name="Adminhtml"><dir name="Report"><dir name="Transactions"><file name="Grid.php" hash="32b32086548f62ae4aca4baf456b9ed2"/><file name="Search.php" hash="81d57c3744530f36c37782ce9d0f3a70"/></dir><file name="Transactions.php" hash="7afe45b49353e52b432aa0392d76a08e"/></dir><dir name="System"><dir name="Config"><dir name="Braintree"><file name="Config.php" hash="eaaf6c74be4233a315d5aa5932f7c9ca"/><file name="Currency.php" hash="9ffa8a2ded53be75e88a60a024883b07"/><file name="Moduleversion.php" hash="fe3836bde24bb31c4c4585f2cd2f20ed"/><file name="Version.php" hash="ce58278a4faf965301cc2d8b2da4483c"/></dir></dir></dir></dir><dir name="Cart"><file name="Totals.php" hash="a03c441e8143896f92d02931a809f666"/></dir><dir name="Creditcard"><file name="Info.php" hash="6faf4be87ad62f13373a6b2e852a478b"/><file name="Threedsecure.php" hash="7848d4ecac743be985f328fa969318bf"/></dir><file name="Creditcard.php" hash="3d9dd20d9617a891084950f9a8aa1309"/><file name="Info.php" hash="4d9513f53e20bf7752c1f826bbd63b0e"/><file name="Js.php" hash="cef4a5a297b95969b882d42c04773a69"/><dir name="Paypal"><file name="Info.php" hash="0874c0839a27c14ec9be47fed152e880"/></dir><file name="Paypal.php" hash="b507a5f3340e3cc06ffba03d07ff87cd"/><file name="Saved.php" hash="782f17589219da087e57035a1c0b9a4a"/></dir><dir name="Helper"><file name="Data.php" hash="4dfe4c3a7f186640c77b79cedf273f76"/></dir><dir name="Model"><file name="Debug.php" hash="f3360f71e2346881f93424792ed9f209"/><file name="Observer.php" hash="b2486212947330ce2e5c8d84f725a90c"/><dir name="Paymentmethod"><file name="Abstract.php" hash="0bd5c8409d4dad2c24368891af67b7a3"/><file name="Creditcard.php" hash="e4d1a181c9dabf64d76595e9c186a5de"/><file name="Paypal.php" hash="b23e53d2312d27332b0b10d97a247c2a"/></dir><file name="Saved.php" hash="b0ed5312b1e5efa93eb4bfc82bef8892"/><dir name="Source"><file name="Cctype.php" hash="d76aa6c3a4bd798e3a47695f579d21d4"/><dir name="Creditcard"><file name="CaptureAction.php" hash="6444cfc430de44f06e85bd9c8b80d77b"/><file name="FormIntegration.php" hash="4f137002a98c8f1f352b02abc4506b3b"/><file name="PaymentAction.php" hash="a2f3f3d36a98df4d12f76b6ab77f9c47"/></dir><file name="Environment.php" hash="02567d2ddba74d06ac000b4ddb12723a"/><dir name="Paypal"><file name="Locale.php" hash="adc0ab30619eb3a34d8f5fe1087b07b0"/><file name="Paymenttype.php" hash="fe1fe4ee89d5b7a87c7c28716bb2f1cb"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Currency.php" hash="73cb15b1de303e88c487db4c585ef94e"/></dir></dir></dir><dir name="Wrapper"><file name="Braintree.php" hash="1f723e134bee735228dd517a2b096d93"/></dir><file name=".DS_Store" hash="cc4c7586697ffb0a3228c23a17787dc8"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BraintreeController.php" hash="7c621fa1548c04e24bb1136bcbbe1d72"/></dir><file name="CheckoutController.php" hash="02a35bc3ccacba6ba820842508835569"/><file name="SavedController.php" hash="036e97703c853a5bae064dd7cf5030a8"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c9c940beffa0ec19e4a1499a66f7fd12"/><file name="config.xml" hash="6fc62830e717e1f66b816bd90a356b77"/><file name="system.xml" hash="3d0aa2c3a5ed4359db74c11c6073c5d4"/></dir><dir name="sql"><dir name="gene_braintree_setup"><file name="install-0.1.0.php" hash="7ef62b7c19b9da5990974da6edb3e77c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="gene"><file name="braintree.xml" hash="6dfbf6ea8004e1c02dbf91eece6c8dc8"/></dir></dir><dir name="template"><dir name="gene"><dir name="braintree"><dir name="creditcard"><file name="hostedfields.phtml" hash="10757415338b805700d36b25296c90c5"/><file name="info.phtml" hash="2ae1e397b3a633dd305bc26c7b9c1065"/><file name="threedsecure.phtml" hash="ee8ad689afde041c39dd92ffa5274883"/></dir><file name="creditcard.phtml" hash="e019b6da4d3c50fbc570d446b18962c5"/><dir name="customer"><file name="methods.phtml" hash="eb5e2d8f4a0f419fcf720c12062f808a"/><file name="saved.phtml" hash="691162b89ed085599f76072226ca2307"/></dir><dir name="js"><file name="aheadworks.phtml" hash="c024bdbf79bfb5dda71ad6acbbcb58d1"/><file name="amasty.phtml" hash="905800a115f06a681a1d31cb0696b2d7"/><file name="data.phtml" hash="2d575380d05455c6eae90d3644b525dc"/><file name="default.phtml" hash="d2375da07bf8f1d50f5b38ba8fab70aa"/><file name="firecheckout.phtml" hash="6295ce2e602c91dc5fbe14e849e7791f"/><file name="idev.phtml" hash="54358bd2916ca3e5c705b8a63d8b1373"/><file name="iwd.phtml" hash="48474604fe3b0a3923f77a0ebd82ef70"/><file name="magestore.phtml" hash="9d15ccd68804eb72a5db280793922668"/><file name="oye.phtml" hash="dd728b78f535c9a1d81d77d2ca2bb0f5"/><file name="setup.phtml" hash="f39b3e066b1c1eef36834d41b59174f7"/><file name="unicode.phtml" hash="caeae3b5031ee8539185f78fd4554765"/></dir><dir name="paypal"><file name="info.phtml" hash="5149b273730121e4dec3c3179820f747"/></dir><file name="paypal.phtml" hash="c81c90096517a5a844306345b3c648ca"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="gene"><file name="braintree.xml" hash="d46837b097a58abb640376057ca14596"/></dir></dir><dir name="template"><dir name="gene"><dir name="braintree"><dir name="creditcard"><file name="hostedfields.phtml" hash="3e835a116317449620a90964d2b34b5e"/><file name="info.phtml" hash="24c67bab482ea7383ce57d9a06bb9d6f"/></dir><file name="creditcard.phtml" hash="e95b7ff1b2db6ed33190b879ad547a45"/><file name="js.phtml" hash="4f547da52ab1888485cea4f376aa9d5a"/><dir name="paypal"><file name="info.phtml" hash="a8f92f312f8aa5a9463f1d5c2a38cd1b"/></dir><dir name="transactions"><file name="index.phtml" hash="1791b6393f319616dd79c0b46e391847"/><file name="search.phtml" hash="1682ce6200681681f0ce3c848e2e6694"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gene_Braintree.xml" hash="8c0ffda8566dca2f0b98a999921e3e55"/></dir></target><target name="mageweb"><dir name="js"><dir name="gene"><dir name="braintree"><file name="braintree-0.1.js" hash="a72cc4545d0d01dd0947dae1474516dd"/><file name="config.codekit" hash="884bc0caecd1b95d339340c36203b3ef"/><file name="vzero-0.7-min.js" hash="71a553559ebd8ea8239d3d69b08de597"/><file name="vzero-0.7-min.js.map" hash="1fc5d50c5cdcb138131930ac92362053"/><file name="vzero-0.7.js" hash="b70a277a5a9d56952170cd6f13433b04"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="gene"><dir name="braintree"><file name="AE.png" hash="6b6f405105413b0723a62ee498f88bf6"/><file name="DI.png" hash="d8e3c3022dda9e723f466b8976ae428f"/><file name="JCB.png" hash="3aa9a71ed8a1d6610bbe0dfe2040e29e"/><file name="MC.png" hash="1fcd14928245139962b72f9368bdbe32"/><file name="ME.png" hash="b9389913c47b9546a67f907fcca73706"/><file name="PP.png" hash="b4946bccba574e86c9716a4986e21c36"/><file name="VI.png" hash="c9f74d1d54e61ab2c748f45a4bdface0"/><file name="card.png" hash="66e16f8c573fad93bb0d62258dce28bb"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir><dir name="css"><dir name="gene"><dir name="braintree"><file name="aheadworks.css" hash="6a9d989e354e4069c1a93301460e4151"/><file name="amasty.css" hash="4c7d73736d10dd1d6be077c091e6511d"/><file name="default.css" hash="17035148ee7da331e11f321f8962536b"/><file name="firecheckout.css" hash="9cd93a2534ca4dc6d049c4146bee4f25"/><file name="idev.css" hash="542423bbb2c61c09331717808cd8c841"/><file name="iwd.css" hash="3774db6ec06341de440a5c73b04ca488"/><file name="magestore.css" hash="47bc1ec7b9bd6ac0cf44f0711bf950a9"/><file name="oye.css" hash="33157880b52f3f67d1203d2eb5e8e343"/><file name="unicode.css" hash="582421c71dbcd123916cb35c4c0d2618"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Braintree"><file name="AddOn.php" hash="e8bbb6db343ba99192346b1dcbf45677"/><file name="AddOnGateway.php" hash="d8698ffe89c01fba78a8a06a2fc68122"/><file name="Address.php" hash="004d3d36d39fc6fcc3d510f4b15b1fca"/><file name="AddressGateway.php" hash="41b5a3be7bdb2fe326a49a1554e1b0c3"/><file name="AndroidPayCard.php" hash="7a1de1da0aa0733277a87b75307bb201"/><file name="ApplePayCard.php" hash="06eea10b110792c18d692e482445ffe4"/><file name="Base.php" hash="60d52fd1bef5655bcb607fba45bb4c1c"/><file name="ClientToken.php" hash="358c0a1dba687baf635db818cb7d1dac"/><file name="ClientTokenGateway.php" hash="6f2259a51415a779a072719288811c16"/><file name="CoinbaseAccount.php" hash="ee5cb6963f675a9a71293c453b128866"/><file name="Collection.php" hash="0e7d31ffcbd9780fb554186bd2c194b0"/><file name="Configuration.php" hash="cce5e6b7e215c73767127d3d8441cc8f"/><file name="CredentialsParser.php" hash="c4bb2248a33129d8523a6120ce44108b"/><file name="CreditCard.php" hash="d32b8d8e64b2d046d3d9e4f00c67f1ed"/><file name="CreditCardGateway.php" hash="0d120ed06f06fd614468d6e3f0ad22d2"/><file name="CreditCardVerification.php" hash="48d6ea546914278f4bea2fefb75e7836"/><file name="CreditCardVerificationGateway.php" hash="6a07430c9437f6e6c1516d5b4572a749"/><file name="CreditCardVerificationSearch.php" hash="18efe7d508c2bd5fea1c0e68fc26182f"/><file name="Customer.php" hash="62d0937de86f7a14a512ad66edba7569"/><file name="CustomerGateway.php" hash="1232a22dd6de6ad1446c6fbb9b0f79c3"/><file name="CustomerSearch.php" hash="8aacc83dac341cd9afec5a3deab17593"/><file name="Descriptor.php" hash="3f5db5e817280ce7f2fa18a205281ad9"/><file name="Digest.php" hash="9d12d067770f55b123b8498fce4478fa"/><file name="Disbursement.php" hash="ad122f0f33b27dfd98bcdd38ea138ae4"/><file name="DisbursementDetails.php" hash="ae632207d0982e288a83aed401c880d9"/><file name="Discount.php" hash="763b3f9cde0ff3af3e8795cac4097595"/><file name="DiscountGateway.php" hash="47796edb8ac2fa68e9af8fb8a13aacb1"/><dir name="Dispute"><file name="TransactionDetails.php" hash="7fdea673a1295055508f42286ad57f4e"/></dir><file name="Dispute.php" hash="c3a4e93fa2b3b0e20ddcb593dcdc7b2b"/><file name="EqualityNode.php" hash="cfd6aa184186233b8d6d1ec0f0e79298"/><dir name="Error"><file name="Codes.php" hash="a7f98ff690e725b7fcd198b4b22d0637"/><file name="ErrorCollection.php" hash="e28d638db56524f5bf3609fa725e6d55"/><file name="Validation.php" hash="bf4e2198300019c52ba56f16269d66ce"/><file name="ValidationErrorCollection.php" hash="9ef25d0126a0b4f6951da5334ae6f0dc"/></dir><dir name="Exception"><file name="Authentication.php" hash="f9e13654988452cca2ac5228a80adae4"/><file name="Authorization.php" hash="5f8c017c6e9fd79a556dade8e15a72e8"/><file name="Configuration.php" hash="b50f67e8ea36cff0d9f6ad718126c6fc"/><file name="DownForMaintenance.php" hash="7fd30b1f8976ed7e38b7e9fae5c20f03"/><file name="ForgedQueryString.php" hash="6884dbae1e86767834b77c821df2db62"/><file name="InvalidChallenge.php" hash="1c283a1c9dac65feb137594d0dcf0e35"/><file name="InvalidSignature.php" hash="b83f5b16735cb3a8e0a8111c4f32711e"/><file name="NotFound.php" hash="f832f771d20b381c2780eb2a572b9f44"/><file name="SSLCaFileNotFound.php" hash="e927c7307bf1761814dc8a755238070d"/><file name="SSLCertificate.php" hash="d509b6a6206bd7c5563ac142dfe3801f"/><file name="ServerError.php" hash="b4645290229ab228a257047d08ef63d7"/><file name="Unexpected.php" hash="01ea2800fb91995ec2a15aee5024611e"/><file name="UpgradeRequired.php" hash="7f40b174df891cc3b3e206d1be884a58"/><file name="ValidationsFailed.php" hash="cd2d30c69911f81b55279c3d6bf88c61"/></dir><file name="Exception.php" hash="f14c94bf67206184eb3e4e7aeb4a608a"/><file name="Gateway.php" hash="103156f5646a8193ed548405f5ac476f"/><file name="Http.php" hash="1baa32e0efcae13c4d6294d1233512a1"/><file name="Instance.php" hash="f0603b3f9213b53687e079c5621ac8f3"/><file name="IsNode.php" hash="e4b1f7bbfcbd24b1d08b97f94df592be"/><file name="KeyValueNode.php" hash="255595ec01a16906dd0c49faf67d9efb"/><file name="Merchant.php" hash="5053ebe889c854d11f2686bffdeb58be"/><dir name="MerchantAccount"><file name="AddressDetails.php" hash="1d265d864a884ebcf2504f55207cc0dd"/><file name="BusinessDetails.php" hash="3e80148bac9fda676844aa19d5b2dc28"/><file name="FundingDetails.php" hash="7368f653fcbcc3d87924447b1763e616"/><file name="IndividualDetails.php" hash="777b6f28f643e78616c7ed753a39c0cd"/></dir><file name="MerchantAccount.php" hash="496c93182d824bb2967cc9366dec1ac3"/><file name="MerchantAccountGateway.php" hash="e2073aff6f8b3c5f2e64b23b210c44f7"/><file name="MerchantGateway.php" hash="e0a2e3a28c68dac8bd082973b269ed1b"/><file name="Modification.php" hash="0abe992d4f821327f617ca883c4eb2d1"/><file name="MultipleValueNode.php" hash="92700fa03011eaa9561010b3a160449c"/><file name="MultipleValueOrTextNode.php" hash="ef06bac18e2bc40974bdc0bcb854890f"/><file name="OAuthCredentials.php" hash="e992dca9dfedb27e3d050af55971a968"/><file name="OAuthGateway.php" hash="e2e238d067f43c0f28fcb25c2de4a274"/><file name="PartialMatchNode.php" hash="370c7e0ab8a445cfeef6b19ef1755f4d"/><file name="PartnerMerchant.php" hash="bdb69ebdc75d67009710be9703a47e80"/><file name="PayPalAccount.php" hash="672a7d424f94e590c5e66a21e62d7bc2"/><file name="PayPalAccountGateway.php" hash="d73f5744ebaca6cc882c42d0e9c1a05e"/><file name="PaymentInstrumentType.php" hash="be97a30c7d8fbbb180864dc4efea71f2"/><file name="PaymentMethod.php" hash="5bc31d3e97610e7218c95aba2422cc9a"/><file name="PaymentMethodGateway.php" hash="1ce13a8b1ec93cf32b8029c55ea26fa2"/><file name="PaymentMethodNonce.php" hash="e99302e2468f55c8fb4b2ceeb1bce68e"/><file name="PaymentMethodNonceGateway.php" hash="22a0d89eee071a28b530c6be477dcc6e"/><file name="Plan.php" hash="22ab0117d462352aecb9531d4a26619e"/><file name="PlanGateway.php" hash="95e093b55ad20f8b652ee5f2fc2a0fcf"/><file name="RangeNode.php" hash="4ad9a92547423b3d54d69097114c3daf"/><file name="ResourceCollection.php" hash="8f437cb5014148c0e2f6049347ae795c"/><dir name="Result"><file name="CreditCardVerification.php" hash="7c41787025ec7cffb269f53e3ce479e2"/><file name="Error.php" hash="0e0460f1eea017bc7591e05351f51eb0"/><file name="Successful.php" hash="03f1c379fcedaef499296ab7778d1e36"/></dir><file name="RiskData.php" hash="8bef1074f9f1c50c841a7c7cf627c9cf"/><file name="SettlementBatchSummary.php" hash="388d88e8cea7bec61ee78f388fb78c2c"/><file name="SettlementBatchSummaryGateway.php" hash="bc54658b75fa0505e072331799c2d9ad"/><file name="SignatureService.php" hash="4b78d3e5897e715dcc877c5f65b3cfae"/><dir name="Subscription"><file name="StatusDetails.php" hash="29e375f02150bfd7147591f0eb27cb4f"/></dir><file name="Subscription.php" hash="cde05aa61192d5b930b57330db308835"/><file name="SubscriptionGateway.php" hash="bd1b2aa2d4d41a595463bead64ed34e0"/><file name="SubscriptionSearch.php" hash="1874ebe5cb42d7d2836617810cced1af"/><dir name="Test"><file name="CreditCardNumbers.php" hash="676a9100354eb679e7ca1e0f0d67293f"/><file name="MerchantAccount.php" hash="612e7e30cca364c0d14cbff3b54ebf3f"/><file name="Nonces.php" hash="230dc3687abaf95e9f516573b1836f4a"/><file name="TransactionAmounts.php" hash="ed9bf1f57d871542c32d11de9e031f05"/><file name="VenmoSdk.php" hash="6ce94deccd1f968596011487c7e69cc7"/></dir><file name="TextNode.php" hash="94c95ec9645de57acace2179fef7fb43"/><file name="ThreeDSecureInfo.php" hash="542550c4e03a24551d00e8aad5493035"/><dir name="Transaction"><file name="AddressDetails.php" hash="ff52a4a48248085b7ea92e992160e413"/><file name="AndroidPayCardDetails.php" hash="4dab3acc0cc35b5a6f12f95004074374"/><file name="ApplePayCardDetails.php" hash="c4dd87cd46fe7269e1bd51c867adf7cb"/><file name="CoinbaseDetails.php" hash="d19a625f8de98698b8277c25660358f0"/><file name="CreditCardDetails.php" hash="aac5eb1f5804d4f979b9c71f7b98cb36"/><file name="CustomerDetails.php" hash="e137895c646127312be44292c84a2d81"/><file name="PayPalDetails.php" hash="ede299e376bce7714838d79ca3d40842"/><file name="StatusDetails.php" hash="7c6e719c51bf13bdfd07615030100ac6"/><file name="SubscriptionDetails.php" hash="1cf1f511d1545a2e27b8d3f4bee800ca"/></dir><file name="Transaction.php" hash="09b9e7a574d304e9edebe578173f2994"/><file name="TransactionGateway.php" hash="4282d7497100c26afcd709fd77eae0bd"/><file name="TransactionSearch.php" hash="3101c79514520a1a500e4623f4ca1c32"/><file name="TransparentRedirect.php" hash="154c9850be5175a5cd1b35bdf78ae939"/><file name="TransparentRedirectGateway.php" hash="5ead181bf0d5484db5eb305efa13bec4"/><file name="UnknownPaymentMethod.php" hash="9107498774ab5bc2b25de98838736b47"/><file name="Util.php" hash="9832a44da18b97a55248cadc4bb9a4ad"/><file name="Version.php" hash="2f088b43efe46edb3262b89b7d40d051"/><file name="WebhookNotification.php" hash="4097fb57d46368d903c42bb20fbd49ca"/><file name="WebhookTesting.php" hash="c40311458bb64e37b4c08eb88df37805"/><dir name="Xml"><file name="Generator.php" hash="19f9c9b9b61d4f97f65775f527ac408d"/><file name="Parser.php" hash="c06b1ae155ac7687eaa856fac472656d"/></dir><file name="Xml.php" hash="dc69e05bea21e3d1185d45d53e4747db"/></dir><dir name="."><file name="Braintree.php" hash="424b8ccb072fda0ddf3459be6279734a"/></dir><dir name="ssl"><file name="api_braintreegateway_com.ca.crt" hash="04beb23c767547e980c76eb68c7eab15"/><file name="sandbox_braintreegateway_com.ca.crt" hash="f1b529883c7c2cbb4251658f5da7b4c9"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Gene_Braintree.csv" hash="00ae6dc359bc0d9c48bfc90a865232a3"/></dir></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php><package><name/><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
44
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Gene_Braintree</name>
4
+ <version>1.0.5.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
36
  &lt;/ul&gt;</description>
37
  <notes>Connect your Magento store to Braintree to accept Credit Cards &amp;amp; PayPal using V.Zero SDK</notes>
38
  <authors><author><name>Dave Macaulay</name><user>dave</user><email>magento@gene.co.uk</email></author></authors>
39
+ <date>2016-02-15</date>
40
+ <time>12:25:35</time>
41
+ <contents><target name="magecommunity"><dir name="Gene"><dir name="Braintree"><dir name="Block"><dir name="Adminhtml"><dir name="Report"><dir name="Transactions"><file name="Grid.php" hash="32b32086548f62ae4aca4baf456b9ed2"/><file name="Search.php" hash="81d57c3744530f36c37782ce9d0f3a70"/></dir><file name="Transactions.php" hash="7afe45b49353e52b432aa0392d76a08e"/></dir><dir name="System"><dir name="Config"><dir name="Braintree"><file name="Config.php" hash="eaaf6c74be4233a315d5aa5932f7c9ca"/><file name="Currency.php" hash="9ffa8a2ded53be75e88a60a024883b07"/><file name="Moduleversion.php" hash="fe3836bde24bb31c4c4585f2cd2f20ed"/><file name="Version.php" hash="ce58278a4faf965301cc2d8b2da4483c"/></dir></dir></dir></dir><dir name="Cart"><file name="Totals.php" hash="a03c441e8143896f92d02931a809f666"/></dir><dir name="Creditcard"><file name="Info.php" hash="6faf4be87ad62f13373a6b2e852a478b"/><file name="Threedsecure.php" hash="7848d4ecac743be985f328fa969318bf"/></dir><file name="Creditcard.php" hash="3d9dd20d9617a891084950f9a8aa1309"/><file name="Info.php" hash="4d9513f53e20bf7752c1f826bbd63b0e"/><file name="Js.php" hash="cef4a5a297b95969b882d42c04773a69"/><dir name="Paypal"><file name="Info.php" hash="0874c0839a27c14ec9be47fed152e880"/></dir><file name="Paypal.php" hash="b507a5f3340e3cc06ffba03d07ff87cd"/><file name="Saved.php" hash="782f17589219da087e57035a1c0b9a4a"/></dir><dir name="Helper"><file name="Data.php" hash="4dfe4c3a7f186640c77b79cedf273f76"/></dir><dir name="Model"><file name="Debug.php" hash="f3360f71e2346881f93424792ed9f209"/><file name="Observer.php" hash="b2486212947330ce2e5c8d84f725a90c"/><dir name="Paymentmethod"><file name="Abstract.php" hash="0bd5c8409d4dad2c24368891af67b7a3"/><file name="Creditcard.php" hash="19c99d48f960eb0e4fcba5edf062d208"/><file name="Paypal.php" hash="24a0f9dbe319be0c49cbf2837fd70850"/></dir><file name="Saved.php" hash="b0ed5312b1e5efa93eb4bfc82bef8892"/><dir name="Source"><file name="Cctype.php" hash="d76aa6c3a4bd798e3a47695f579d21d4"/><dir name="Creditcard"><file name="CaptureAction.php" hash="6444cfc430de44f06e85bd9c8b80d77b"/><file name="FormIntegration.php" hash="4f137002a98c8f1f352b02abc4506b3b"/><file name="PaymentAction.php" hash="a2f3f3d36a98df4d12f76b6ab77f9c47"/></dir><file name="Environment.php" hash="02567d2ddba74d06ac000b4ddb12723a"/><dir name="Paypal"><file name="Locale.php" hash="adc0ab30619eb3a34d8f5fe1087b07b0"/><file name="Paymenttype.php" hash="fe1fe4ee89d5b7a87c7c28716bb2f1cb"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Currency.php" hash="73cb15b1de303e88c487db4c585ef94e"/></dir></dir></dir><dir name="Wrapper"><file name="Braintree.php" hash="1f723e134bee735228dd517a2b096d93"/></dir><file name=".DS_Store" hash="cc4c7586697ffb0a3228c23a17787dc8"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BraintreeController.php" hash="7c621fa1548c04e24bb1136bcbbe1d72"/></dir><file name="CheckoutController.php" hash="02a35bc3ccacba6ba820842508835569"/><file name="SavedController.php" hash="036e97703c853a5bae064dd7cf5030a8"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c9c940beffa0ec19e4a1499a66f7fd12"/><file name="config.xml" hash="584f8e8d664c6c73da1f0a65af41a1c0"/><file name="system.xml" hash="cf2637e8e86ebe0ef58c1e3c7200a21b"/></dir><dir name="sql"><dir name="gene_braintree_setup"><file name="install-0.1.0.php" hash="7ef62b7c19b9da5990974da6edb3e77c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="gene"><file name="braintree.xml" hash="7651f0c08130f09fb52780833bb0b8bc"/></dir></dir><dir name="template"><dir name="gene"><dir name="braintree"><dir name="creditcard"><file name="hostedfields.phtml" hash="10757415338b805700d36b25296c90c5"/><file name="info.phtml" hash="2ae1e397b3a633dd305bc26c7b9c1065"/><file name="threedsecure.phtml" hash="ee8ad689afde041c39dd92ffa5274883"/></dir><file name="creditcard.phtml" hash="e019b6da4d3c50fbc570d446b18962c5"/><dir name="customer"><file name="methods.phtml" hash="eb5e2d8f4a0f419fcf720c12062f808a"/><file name="saved.phtml" hash="691162b89ed085599f76072226ca2307"/></dir><dir name="js"><file name="aheadworks.phtml" hash="c024bdbf79bfb5dda71ad6acbbcb58d1"/><file name="amasty.phtml" hash="905800a115f06a681a1d31cb0696b2d7"/><file name="data.phtml" hash="f8b04e3d0d7154cc75332eb5bec3e54e"/><file name="default.phtml" hash="d2375da07bf8f1d50f5b38ba8fab70aa"/><file name="firecheckout.phtml" hash="483541347c83ad3b5466d897ee155471"/><file name="fme.phtml" hash="d80dc389a6936c37642e9ad5d0a9ee4c"/><file name="idev.phtml" hash="54358bd2916ca3e5c705b8a63d8b1373"/><file name="iwd.phtml" hash="48474604fe3b0a3923f77a0ebd82ef70"/><file name="magestore.phtml" hash="9d15ccd68804eb72a5db280793922668"/><file name="multishipping.phtml" hash="b3464d35f42fca64b41b1b085548bcb6"/><file name="oye.phtml" hash="dd728b78f535c9a1d81d77d2ca2bb0f5"/><file name="setup.phtml" hash="f39b3e066b1c1eef36834d41b59174f7"/><file name="unicode.phtml" hash="caeae3b5031ee8539185f78fd4554765"/></dir><dir name="paypal"><file name="info.phtml" hash="5149b273730121e4dec3c3179820f747"/></dir><file name="paypal.phtml" hash="c81c90096517a5a844306345b3c648ca"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="gene"><file name="braintree.xml" hash="d46837b097a58abb640376057ca14596"/></dir></dir><dir name="template"><dir name="gene"><dir name="braintree"><dir name="creditcard"><file name="hostedfields.phtml" hash="3e835a116317449620a90964d2b34b5e"/><file name="info.phtml" hash="24c67bab482ea7383ce57d9a06bb9d6f"/></dir><file name="creditcard.phtml" hash="e95b7ff1b2db6ed33190b879ad547a45"/><file name="js.phtml" hash="4f547da52ab1888485cea4f376aa9d5a"/><dir name="paypal"><file name="info.phtml" hash="a8f92f312f8aa5a9463f1d5c2a38cd1b"/></dir><dir name="transactions"><file name="index.phtml" hash="1791b6393f319616dd79c0b46e391847"/><file name="search.phtml" hash="1682ce6200681681f0ce3c848e2e6694"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gene_Braintree.xml" hash="8c0ffda8566dca2f0b98a999921e3e55"/></dir></target><target name="mageweb"><dir name="js"><dir name="gene"><dir name="braintree"><file name="braintree-0.1.js" hash="a72cc4545d0d01dd0947dae1474516dd"/><file name="config.codekit" hash="ae566568bb3325d2eefda5315da4a2be"/><file name="vzero-0.7-min.js" hash="bc98b0f8c9f48a765a702bbfa4b7263e"/><file name="vzero-0.7-min.js.map" hash="409035d8fb3405504d0d80e530fdc240"/><file name="vzero-0.7.js" hash="58cacde99c5171114fa25a8716d5f33e"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="gene"><dir name="braintree"><file name="AE.png" hash="6b6f405105413b0723a62ee498f88bf6"/><file name="DI.png" hash="d8e3c3022dda9e723f466b8976ae428f"/><file name="JCB.png" hash="3aa9a71ed8a1d6610bbe0dfe2040e29e"/><file name="MC.png" hash="1fcd14928245139962b72f9368bdbe32"/><file name="ME.png" hash="b9389913c47b9546a67f907fcca73706"/><file name="PP.png" hash="b4946bccba574e86c9716a4986e21c36"/><file name="VI.png" hash="c9f74d1d54e61ab2c748f45a4bdface0"/><file name="card.png" hash="66e16f8c573fad93bb0d62258dce28bb"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir><dir name="css"><dir name="gene"><dir name="braintree"><file name="aheadworks.css" hash="6a9d989e354e4069c1a93301460e4151"/><file name="amasty.css" hash="4c7d73736d10dd1d6be077c091e6511d"/><file name="default.css" hash="17035148ee7da331e11f321f8962536b"/><file name="firecheckout.css" hash="9cd93a2534ca4dc6d049c4146bee4f25"/><file name="fme.css" hash="4301ab44b4acf26ece94ccc99f10adf1"/><file name="idev.css" hash="542423bbb2c61c09331717808cd8c841"/><file name="iwd.css" hash="3774db6ec06341de440a5c73b04ca488"/><file name="magestore.css" hash="47bc1ec7b9bd6ac0cf44f0711bf950a9"/><file name="oye.css" hash="33157880b52f3f67d1203d2eb5e8e343"/><file name="unicode.css" hash="582421c71dbcd123916cb35c4c0d2618"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Braintree"><file name="AddOn.php" hash="e8bbb6db343ba99192346b1dcbf45677"/><file name="AddOnGateway.php" hash="d8698ffe89c01fba78a8a06a2fc68122"/><file name="Address.php" hash="004d3d36d39fc6fcc3d510f4b15b1fca"/><file name="AddressGateway.php" hash="41b5a3be7bdb2fe326a49a1554e1b0c3"/><file name="AndroidPayCard.php" hash="7a1de1da0aa0733277a87b75307bb201"/><file name="ApplePayCard.php" hash="06eea10b110792c18d692e482445ffe4"/><file name="Base.php" hash="60d52fd1bef5655bcb607fba45bb4c1c"/><file name="ClientToken.php" hash="358c0a1dba687baf635db818cb7d1dac"/><file name="ClientTokenGateway.php" hash="6f2259a51415a779a072719288811c16"/><file name="CoinbaseAccount.php" hash="ee5cb6963f675a9a71293c453b128866"/><file name="Collection.php" hash="0e7d31ffcbd9780fb554186bd2c194b0"/><file name="Configuration.php" hash="cce5e6b7e215c73767127d3d8441cc8f"/><file name="CredentialsParser.php" hash="c4bb2248a33129d8523a6120ce44108b"/><file name="CreditCard.php" hash="d32b8d8e64b2d046d3d9e4f00c67f1ed"/><file name="CreditCardGateway.php" hash="0d120ed06f06fd614468d6e3f0ad22d2"/><file name="CreditCardVerification.php" hash="48d6ea546914278f4bea2fefb75e7836"/><file name="CreditCardVerificationGateway.php" hash="6a07430c9437f6e6c1516d5b4572a749"/><file name="CreditCardVerificationSearch.php" hash="18efe7d508c2bd5fea1c0e68fc26182f"/><file name="Customer.php" hash="62d0937de86f7a14a512ad66edba7569"/><file name="CustomerGateway.php" hash="1232a22dd6de6ad1446c6fbb9b0f79c3"/><file name="CustomerSearch.php" hash="8aacc83dac341cd9afec5a3deab17593"/><file name="Descriptor.php" hash="3f5db5e817280ce7f2fa18a205281ad9"/><file name="Digest.php" hash="9d12d067770f55b123b8498fce4478fa"/><file name="Disbursement.php" hash="ad122f0f33b27dfd98bcdd38ea138ae4"/><file name="DisbursementDetails.php" hash="ae632207d0982e288a83aed401c880d9"/><file name="Discount.php" hash="763b3f9cde0ff3af3e8795cac4097595"/><file name="DiscountGateway.php" hash="47796edb8ac2fa68e9af8fb8a13aacb1"/><dir name="Dispute"><file name="TransactionDetails.php" hash="7fdea673a1295055508f42286ad57f4e"/></dir><file name="Dispute.php" hash="c3a4e93fa2b3b0e20ddcb593dcdc7b2b"/><file name="EqualityNode.php" hash="cfd6aa184186233b8d6d1ec0f0e79298"/><dir name="Error"><file name="Codes.php" hash="a7f98ff690e725b7fcd198b4b22d0637"/><file name="ErrorCollection.php" hash="e28d638db56524f5bf3609fa725e6d55"/><file name="Validation.php" hash="bf4e2198300019c52ba56f16269d66ce"/><file name="ValidationErrorCollection.php" hash="9ef25d0126a0b4f6951da5334ae6f0dc"/></dir><dir name="Exception"><file name="Authentication.php" hash="f9e13654988452cca2ac5228a80adae4"/><file name="Authorization.php" hash="5f8c017c6e9fd79a556dade8e15a72e8"/><file name="Configuration.php" hash="b50f67e8ea36cff0d9f6ad718126c6fc"/><file name="DownForMaintenance.php" hash="7fd30b1f8976ed7e38b7e9fae5c20f03"/><file name="ForgedQueryString.php" hash="6884dbae1e86767834b77c821df2db62"/><file name="InvalidChallenge.php" hash="1c283a1c9dac65feb137594d0dcf0e35"/><file name="InvalidSignature.php" hash="b83f5b16735cb3a8e0a8111c4f32711e"/><file name="NotFound.php" hash="f832f771d20b381c2780eb2a572b9f44"/><file name="SSLCaFileNotFound.php" hash="e927c7307bf1761814dc8a755238070d"/><file name="SSLCertificate.php" hash="d509b6a6206bd7c5563ac142dfe3801f"/><file name="ServerError.php" hash="b4645290229ab228a257047d08ef63d7"/><file name="Unexpected.php" hash="01ea2800fb91995ec2a15aee5024611e"/><file name="UpgradeRequired.php" hash="7f40b174df891cc3b3e206d1be884a58"/><file name="ValidationsFailed.php" hash="cd2d30c69911f81b55279c3d6bf88c61"/></dir><file name="Exception.php" hash="f14c94bf67206184eb3e4e7aeb4a608a"/><file name="Gateway.php" hash="103156f5646a8193ed548405f5ac476f"/><file name="Http.php" hash="1baa32e0efcae13c4d6294d1233512a1"/><file name="Instance.php" hash="f0603b3f9213b53687e079c5621ac8f3"/><file name="IsNode.php" hash="e4b1f7bbfcbd24b1d08b97f94df592be"/><file name="KeyValueNode.php" hash="255595ec01a16906dd0c49faf67d9efb"/><file name="Merchant.php" hash="5053ebe889c854d11f2686bffdeb58be"/><dir name="MerchantAccount"><file name="AddressDetails.php" hash="1d265d864a884ebcf2504f55207cc0dd"/><file name="BusinessDetails.php" hash="3e80148bac9fda676844aa19d5b2dc28"/><file name="FundingDetails.php" hash="7368f653fcbcc3d87924447b1763e616"/><file name="IndividualDetails.php" hash="777b6f28f643e78616c7ed753a39c0cd"/></dir><file name="MerchantAccount.php" hash="496c93182d824bb2967cc9366dec1ac3"/><file name="MerchantAccountGateway.php" hash="e2073aff6f8b3c5f2e64b23b210c44f7"/><file name="MerchantGateway.php" hash="e0a2e3a28c68dac8bd082973b269ed1b"/><file name="Modification.php" hash="0abe992d4f821327f617ca883c4eb2d1"/><file name="MultipleValueNode.php" hash="92700fa03011eaa9561010b3a160449c"/><file name="MultipleValueOrTextNode.php" hash="ef06bac18e2bc40974bdc0bcb854890f"/><file name="OAuthCredentials.php" hash="e992dca9dfedb27e3d050af55971a968"/><file name="OAuthGateway.php" hash="e2e238d067f43c0f28fcb25c2de4a274"/><file name="PartialMatchNode.php" hash="370c7e0ab8a445cfeef6b19ef1755f4d"/><file name="PartnerMerchant.php" hash="bdb69ebdc75d67009710be9703a47e80"/><file name="PayPalAccount.php" hash="672a7d424f94e590c5e66a21e62d7bc2"/><file name="PayPalAccountGateway.php" hash="d73f5744ebaca6cc882c42d0e9c1a05e"/><file name="PaymentInstrumentType.php" hash="be97a30c7d8fbbb180864dc4efea71f2"/><file name="PaymentMethod.php" hash="5bc31d3e97610e7218c95aba2422cc9a"/><file name="PaymentMethodGateway.php" hash="1ce13a8b1ec93cf32b8029c55ea26fa2"/><file name="PaymentMethodNonce.php" hash="e99302e2468f55c8fb4b2ceeb1bce68e"/><file name="PaymentMethodNonceGateway.php" hash="22a0d89eee071a28b530c6be477dcc6e"/><file name="Plan.php" hash="22ab0117d462352aecb9531d4a26619e"/><file name="PlanGateway.php" hash="95e093b55ad20f8b652ee5f2fc2a0fcf"/><file name="RangeNode.php" hash="4ad9a92547423b3d54d69097114c3daf"/><file name="ResourceCollection.php" hash="8f437cb5014148c0e2f6049347ae795c"/><dir name="Result"><file name="CreditCardVerification.php" hash="7c41787025ec7cffb269f53e3ce479e2"/><file name="Error.php" hash="0e0460f1eea017bc7591e05351f51eb0"/><file name="Successful.php" hash="03f1c379fcedaef499296ab7778d1e36"/></dir><file name="RiskData.php" hash="8bef1074f9f1c50c841a7c7cf627c9cf"/><file name="SettlementBatchSummary.php" hash="388d88e8cea7bec61ee78f388fb78c2c"/><file name="SettlementBatchSummaryGateway.php" hash="bc54658b75fa0505e072331799c2d9ad"/><file name="SignatureService.php" hash="4b78d3e5897e715dcc877c5f65b3cfae"/><dir name="Subscription"><file name="StatusDetails.php" hash="29e375f02150bfd7147591f0eb27cb4f"/></dir><file name="Subscription.php" hash="cde05aa61192d5b930b57330db308835"/><file name="SubscriptionGateway.php" hash="bd1b2aa2d4d41a595463bead64ed34e0"/><file name="SubscriptionSearch.php" hash="1874ebe5cb42d7d2836617810cced1af"/><dir name="Test"><file name="CreditCardNumbers.php" hash="676a9100354eb679e7ca1e0f0d67293f"/><file name="MerchantAccount.php" hash="612e7e30cca364c0d14cbff3b54ebf3f"/><file name="Nonces.php" hash="230dc3687abaf95e9f516573b1836f4a"/><file name="TransactionAmounts.php" hash="ed9bf1f57d871542c32d11de9e031f05"/><file name="VenmoSdk.php" hash="6ce94deccd1f968596011487c7e69cc7"/></dir><file name="TextNode.php" hash="94c95ec9645de57acace2179fef7fb43"/><file name="ThreeDSecureInfo.php" hash="542550c4e03a24551d00e8aad5493035"/><dir name="Transaction"><file name="AddressDetails.php" hash="ff52a4a48248085b7ea92e992160e413"/><file name="AndroidPayCardDetails.php" hash="4dab3acc0cc35b5a6f12f95004074374"/><file name="ApplePayCardDetails.php" hash="c4dd87cd46fe7269e1bd51c867adf7cb"/><file name="CoinbaseDetails.php" hash="d19a625f8de98698b8277c25660358f0"/><file name="CreditCardDetails.php" hash="aac5eb1f5804d4f979b9c71f7b98cb36"/><file name="CustomerDetails.php" hash="e137895c646127312be44292c84a2d81"/><file name="PayPalDetails.php" hash="ede299e376bce7714838d79ca3d40842"/><file name="StatusDetails.php" hash="7c6e719c51bf13bdfd07615030100ac6"/><file name="SubscriptionDetails.php" hash="1cf1f511d1545a2e27b8d3f4bee800ca"/></dir><file name="Transaction.php" hash="09b9e7a574d304e9edebe578173f2994"/><file name="TransactionGateway.php" hash="4282d7497100c26afcd709fd77eae0bd"/><file name="TransactionSearch.php" hash="3101c79514520a1a500e4623f4ca1c32"/><file name="TransparentRedirect.php" hash="154c9850be5175a5cd1b35bdf78ae939"/><file name="TransparentRedirectGateway.php" hash="5ead181bf0d5484db5eb305efa13bec4"/><file name="UnknownPaymentMethod.php" hash="9107498774ab5bc2b25de98838736b47"/><file name="Util.php" hash="9832a44da18b97a55248cadc4bb9a4ad"/><file name="Version.php" hash="2f088b43efe46edb3262b89b7d40d051"/><file name="WebhookNotification.php" hash="4097fb57d46368d903c42bb20fbd49ca"/><file name="WebhookTesting.php" hash="c40311458bb64e37b4c08eb88df37805"/><dir name="Xml"><file name="Generator.php" hash="19f9c9b9b61d4f97f65775f527ac408d"/><file name="Parser.php" hash="c06b1ae155ac7687eaa856fac472656d"/></dir><file name="Xml.php" hash="dc69e05bea21e3d1185d45d53e4747db"/></dir><dir name="."><file name="Braintree.php" hash="424b8ccb072fda0ddf3459be6279734a"/></dir><dir name="ssl"><file name="api_braintreegateway_com.ca.crt" hash="04beb23c767547e980c76eb68c7eab15"/><file name="sandbox_braintreegateway_com.ca.crt" hash="f1b529883c7c2cbb4251658f5da7b4c9"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Gene_Braintree.csv" hash="00ae6dc359bc0d9c48bfc90a865232a3"/></dir></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php><package><name/><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
44
  </package>
skin/frontend/base/default/css/gene/braintree/fme.css ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #braintree-paypal-button {
2
+ line-height: unset;
3
+ padding: 0;
4
+ margin: 0 auto;
5
+ }
6
+ #paypal-complete {
7
+ margin-top: 12px;
8
+ text-align: center;
9
+ float: left;
10
+ width: 100%;
11
+ }
12
+ #paypal-container iframe {
13
+ display: none;
14
+ }
15
+ #paypal-label {
16
+ line-height: 32px;
17
+ margin-right: 12px;
18
+ float: right;
19
+ }
20
+ #paypal-container {
21
+ float: right;
22
+ }
23
+ #creditcard-saved-accounts td, #paypal-saved-accounts td {
24
+ vertical-align: middle;
25
+ }
26
+ #gene_braintree_creditcard_cc_number {
27
+ text-indent: 62px!important;
28
+ }
29
+
30
+ #payment_form_gene_braintree_paypal, #payment_form_gene_braintree_creditcard {
31
+ padding-top: 6px;
32
+ padding-bottom: 6px;
33
+ }
34
+
35
+ /* Saved Accounts */
36
+ #creditcard-saved-accounts, #paypal-saved-accounts {
37
+ font-size: 0;
38
+ width: 100%;
39
+ }
40
+ #creditcard-saved-accounts tr, #paypal-saved-accounts tr {
41
+ border-bottom: 1px dotted lightgrey;
42
+ }
43
+ #creditcard-saved-accounts tr.other-row, #paypal-saved-accounts tr.other-row {
44
+ border-bottom: 0;
45
+ }
46
+ #creditcard-saved-accounts label {
47
+ padding: 14px 0;
48
+ line-height: 48px;
49
+ width: auto;
50
+ }
51
+ #creditcard-saved-accounts tr.other-row label, #paypal-saved-accounts tr.other-row label {
52
+ padding: 18px 0;
53
+ }
54
+ #paypal-saved-accounts label {
55
+ padding: 8px 0;
56
+ line-height: 48px;
57
+ width: auto;
58
+ }
59
+ #creditcard-saved-accounts label img {
60
+ float: left;
61
+ }
62
+ #creditcard-saved-accounts label .saved-card-info, #paypal-saved-accounts label .saved-paypal-email {
63
+ margin-left: 12px;
64
+ float: left;
65
+ }
66
+ #creditcard-saved-accounts label .saved-card-info span {
67
+ display: block;
68
+ line-height: 24px;
69
+ }
70
+ #creditcard-saved-accounts label .saved-card-info span.saved-expiry-date {
71
+ font-size: 12px;
72
+ }
73
+
74
+ /* Hosted Fields */
75
+ #braintree-hosted-submit {
76
+ display: none;
77
+ }
78
+ .braintree-input-field {
79
+ height: 42px;
80
+ max-width: 340px;
81
+ padding: 0 10px;
82
+ border: 1px solid lightgrey;
83
+ background: white;
84
+ }
85
+ .braintree-card-input-field {
86
+ height: 50px;
87
+ width: 100%;
88
+ max-width: 372px;
89
+ border: 1px solid lightgrey;
90
+ position: relative;
91
+ background: white;
92
+ }
93
+ .braintree-card-input-field .card-type {
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+ bottom: 0;
98
+ padding: 0 10px 0 8px;
99
+ }
100
+ .braintree-card-input-field .card-type img {
101
+ height: 48px;
102
+ }
103
+ .braintree-card-input-field #card-number {
104
+ float: left;
105
+ height: 48px;
106
+ width: 100%;
107
+ padding-left: 66px;
108
+ box-sizing: border-box;
109
+ }
110
+ #braintree-expiration-container {
111
+ display: block;
112
+ width: 100%;
113
+ vertical-align: middle;
114
+ font-size: 0;
115
+ }
116
+ .braintree-expiration {
117
+ width: 70px;
118
+ display: inline-block;
119
+ *zoom: 1;
120
+ *display: inline;
121
+ }
122
+ .braintree-expiration-seperator {
123
+ vertical-align: top;
124
+ line-height: 42px;
125
+ display: inline-block;
126
+ *zoom: 1;
127
+ *display: inline;
128
+ font-size: 30px;
129
+ padding: 0 8px;
130
+ }
131
+ .braintree-cvv {
132
+ width: 80px;
133
+ }
134
+ .braintree-hostedfield .cvv-what-is-this {
135
+ margin-left: 0;
136
+ }