login_and_pay_for_magento - Version 1.2.0

Version Notes

v1.2.0 Release
Login and Pay for Magento now support asynchronous authorizations!
-In the admin configuration, you enable Asynchronous mode by setting the 'Asynchronous Mode' to 'Yes' Now when buyers checkout, the call is asynchronous and the state returned from any Authorize call is 'Pending'
-The system uses Magento's built-in cron job functionality to poll Amazon systems for the status of any Open orders. See http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cro n_job for more information.
-NOTE Orders will never update to their correct status if you do not have cron enabled as specified in the Magento documentation.
--The polling interval is 5 minutes and when the cron job executes, it will get the new status, update the order in Magento appropriately to your configured 'New Order Status' and, if Authorize and Capture is configured, create the Invoice in Magento.
-When should you use async vs sync?
--You should use async when you have large average order values, on the order of > $500-$1000
--You might also consider using async to speed up checkout since the authorizations come back
immediately with a 'Pending' status.
--Only merchants who have an existing workflow for reaching out to customer's whose payment method was declined should use the asynchronous model.
Other Features
-Developer client restrictions
--#78 Implement Developer Client Restrictions
-Sort order variable
--#75 Fire/Onestep/IWD : Add sort order variable that determines where Amazon Payments shows up in list
-Works with iwd onepage checkout/firecheckout
--#77 Fire/Onestep/IWD : Amazon address pulled into form when buyer bails out of Amazon flow
--#74 Fire/Onestep/IWD : Launch amazon checkout (login) on radio button select

Bug Fixes
--#88 Standalone Checkout with Modal: Content blocked when account verification required
--#85 PaymentPlanNotSet exception when invalid payment method.
--#83 CE v1.5 missing core public method lookupTransaction
--#82 Orders break when plugin disabled.
--#81 Display as Payment Option setting is not respected in Onestepcheckout
--#80 Use CSS !Important for Place Order Button
See https://github.com/amzn/amazon-payments-magento-plugin/issues?q=is%3Aissue+is%3Aclosed for more information

Download this release

Release Info

Developer Amazon Payments
Extension login_and_pay_for_magento
Version 1.2.0
Comparing to
See all releases


Code changes from version 1.1.3 to 1.2.0

app/code/community/Amazon/Login/Block/Verify.php CHANGED
@@ -18,7 +18,7 @@ class Amazon_Login_Block_Verify extends Mage_Core_Block_Template
18
 
19
  public function getPostActionUrl()
20
  {
21
- return $this->helper('amazon_login')->getVerifyUrl() . '?redirect=' . $this->getRequest()->getParam('redirect');
22
  }
23
 
24
  public function getForgotPasswordUrl()
18
 
19
  public function getPostActionUrl()
20
  {
21
+ return $this->helper('amazon_login')->getVerifyUrl() . '?redirect=' . htmlentities($this->getRequest()->getParam('redirect'));
22
  }
23
 
24
  public function getForgotPasswordUrl()
app/code/community/Amazon/Login/Model/Customer.php CHANGED
@@ -75,6 +75,12 @@ class Amazon_Login_Model_Customer extends Mage_Customer_Model_Customer
75
  */
76
  public function getAmazonName($name)
77
  {
 
 
 
 
 
 
78
  $firstName = substr($name, 0, strrpos($name, ' '));
79
  $lastName = substr($name, strlen($firstName) + 1);
80
  return array($firstName, $lastName);
75
  */
76
  public function getAmazonName($name)
77
  {
78
+ // if the user only has a first name, handle accordingly
79
+ $trimmedName = trim($name);
80
+ if(strpos($trimmedName,' ')===false) {
81
+ return array($trimmedName,'.');
82
+ }
83
+
84
  $firstName = substr($name, 0, strrpos($name, ' '));
85
  $lastName = substr($name, strlen($firstName) + 1);
86
  return array($firstName, $lastName);
app/code/community/Amazon/Login/etc/config.xml CHANGED
@@ -63,7 +63,11 @@
63
  </global>
64
 
65
 
 
66
  <frontend>
 
 
 
67
  <routers>
68
  <amazon_login>
69
  <use>standard</use>
63
  </global>
64
 
65
 
66
+
67
  <frontend>
68
+ <secure_url>
69
+ <amazon_login_verify>/amazon_login/customer/verify</amazon_login_verify>
70
+ </secure_url>
71
  <routers>
72
  <amazon_login>
73
  <use>standard</use>
app/code/community/Amazon/Payments/Block/Adminhtml/Notifications.php CHANGED
@@ -57,5 +57,26 @@ class Amazon_Payments_Block_Adminhtml_Notifications extends Mage_Adminhtml_Block
57
  return $this->getUrl('adminhtml/system_config/edit/section/payment');
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  }
61
 
57
  return $this->getUrl('adminhtml/system_config/edit/section/payment');
58
  }
59
 
60
+ /**
61
+ * Is patch requried for 1.5?
62
+ *
63
+ * @return string
64
+ */
65
+ public function isPaymentPatchRequired()
66
+ {
67
+ $version = Mage::getVersionInfo();
68
+
69
+ if ($version['major'] == '1' && $version['minor'] == '5') {
70
+ $payment = Mage::getSingleton('sales/order_payment');
71
+
72
+ if (!method_exists($payment, 'lookupTransaction')) {
73
+ return true;
74
+ }
75
+
76
+ return false;
77
+ }
78
+ }
79
+
80
+
81
  }
82
 
app/code/community/Amazon/Payments/Block/Button.php CHANGED
@@ -107,8 +107,11 @@ class Amazon_Payments_Block_Button extends Mage_Core_Block_Template
107
  */
108
  public function isAmazonPayButtonEnabled()
109
  {
 
 
 
110
  // Viewing single product
111
- if (Mage::registry('current_product')) {
112
  return $this->helper('amazon_payments')->isEnableProductPayments();
113
  }
114
  else {
107
  */
108
  public function isAmazonPayButtonEnabled()
109
  {
110
+ if (!Mage::getSingleton('amazon_payments/config')->isEnabled()) {
111
+ return false;
112
+ }
113
  // Viewing single product
114
+ else if (Mage::registry('current_product')) {
115
  return $this->helper('amazon_payments')->isEnableProductPayments();
116
  }
117
  else {
app/code/community/Amazon/Payments/Controller/Checkout.php CHANGED
@@ -27,7 +27,7 @@ abstract class Amazon_Payments_Controller_Checkout extends Mage_Checkout_Control
27
  public function preDispatch()
28
  {
29
  parent::preDispatch();
30
- $this->_amazonOrderReferenceId = $this->getRequest()->getParam('amazon_order_reference_id');
31
 
32
  if (!$this->_amazonOrderReferenceId) {
33
  $this->_amazonOrderReferenceId = Mage::getSingleton('checkout/session')->getAmazonOrderReferenceId();
@@ -38,7 +38,7 @@ abstract class Amazon_Payments_Controller_Checkout extends Mage_Checkout_Control
38
 
39
  // User is logging in...
40
 
41
- $token = $this->getRequest()->getParam('access_token');
42
 
43
  if ($token) {
44
  $_amazonLogin = Mage::getModel('amazon_login/customer');
27
  public function preDispatch()
28
  {
29
  parent::preDispatch();
30
+ $this->_amazonOrderReferenceId = htmlentities($this->getRequest()->getParam('amazon_order_reference_id'));
31
 
32
  if (!$this->_amazonOrderReferenceId) {
33
  $this->_amazonOrderReferenceId = Mage::getSingleton('checkout/session')->getAmazonOrderReferenceId();
38
 
39
  // User is logging in...
40
 
41
+ $token = htmlentities($this->getRequest()->getParam('access_token'));
42
 
43
  if ($token) {
44
  $_amazonLogin = Mage::getModel('amazon_login/customer');
app/code/community/Amazon/Payments/Model/Api.php CHANGED
@@ -12,6 +12,13 @@ class Amazon_Payments_Model_Api
12
  {
13
  const ORDER_PLATFORM_ID = 'A2K7HE1S3M5XJ';
14
 
 
 
 
 
 
 
 
15
  protected $api;
16
  protected $log_file = 'amazon.log';
17
 
@@ -143,9 +150,12 @@ class Amazon_Payments_Model_Api
143
  'CurrencyCode' => $authorizationCurrency
144
  ),
145
  'CaptureNow' => $captureNow,
146
- 'TransactionTimeout' => 0, // Synchronous Mode
147
  );
148
 
 
 
 
 
149
  if ($softDescriptor) {
150
  $request['SoftDescriptor'] = $softDescriptor;
151
  }
@@ -186,9 +196,12 @@ class Amazon_Payments_Model_Api
186
  'Amount' => $captureAmount,
187
  'CurrencyCode' => $captureCurrency
188
  ),
189
- 'TransactionTimeout' => 0, // Synchronous Mode
190
  );
191
 
 
 
 
 
192
  if ($softDescriptor) {
193
  $request['SoftDescriptor'] = $softDescriptor;
194
  }
12
  {
13
  const ORDER_PLATFORM_ID = 'A2K7HE1S3M5XJ';
14
 
15
+ // Amazon Authorization Order States
16
+ const AUTH_STATUS_PENDING = 'Pending';
17
+ const AUTH_STATUS_OPEN = 'Open';
18
+ const AUTH_STATUS_DECLINED = 'Declined';
19
+ const AUTH_STATUS_CLOSED = 'Closed';
20
+ const AUTH_STATUS_COMPLETED = 'Completed';
21
+
22
  protected $api;
23
  protected $log_file = 'amazon.log';
24
 
150
  'CurrencyCode' => $authorizationCurrency
151
  ),
152
  'CaptureNow' => $captureNow,
 
153
  );
154
 
155
+ if (!$this->getConfig()->isAsync()) {
156
+ $request['TransactionTimeout'] = 0; // Synchronous Mode
157
+ }
158
+
159
  if ($softDescriptor) {
160
  $request['SoftDescriptor'] = $softDescriptor;
161
  }
196
  'Amount' => $captureAmount,
197
  'CurrencyCode' => $captureCurrency
198
  ),
 
199
  );
200
 
201
+ if (!$this->getConfig()->isAsync()) {
202
+ $request['TransactionTimeout'] = 0; // Synchronous Mode
203
+ }
204
+
205
  if ($softDescriptor) {
206
  $request['SoftDescriptor'] = $softDescriptor;
207
  }
app/code/community/Amazon/Payments/Model/Async.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Amazon Payments
4
+ *
5
+ * @category Amazon
6
+ * @package Amazon_Payments
7
+ * @copyright Copyright (c) 2014 Amazon.com
8
+ * @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
9
+ */
10
+
11
+ class Amazon_Payments_Model_Async extends Mage_Core_Model_Abstract
12
+ {
13
+
14
+ /**
15
+ * Return Amazon API
16
+ */
17
+ protected function _getApi()
18
+ {
19
+ return Mage::getSingleton('amazon_payments/api');
20
+ }
21
+
22
+ /**
23
+ * Create invoice
24
+ */
25
+ protected function _createInvoice(Mage_Sales_Model_Order $order, $captureReferenceIds)
26
+ {
27
+ if ($order->canInvoice()) {
28
+ $transactionSave = Mage::getModel('core/resource_transaction');
29
+
30
+ // Create invoice
31
+ $invoice = $order
32
+ ->prepareInvoice()
33
+ ->register();
34
+ $invoice->setTransactionId(current($captureReferenceIds));
35
+
36
+ $transactionSave
37
+ ->addObject($invoice)
38
+ ->addObject($invoice->getOrder());
39
+
40
+ return $transactionSave->save();
41
+ }
42
+
43
+ return false;
44
+ }
45
+
46
+ /**
47
+ * Poll Amazon API to receive order status and update Magento order.
48
+ */
49
+ public function syncOrderStatus(Mage_Sales_Model_Order $order, $isManualSync = false)
50
+ {
51
+ $amazonOrderReference = $order->getPayment()->getAdditionalInformation('order_reference');
52
+
53
+ $_api = $this->_getApi();
54
+ $message = '';
55
+
56
+ $result = $this->_getApi()->getOrderReferenceDetails($amazonOrderReference);
57
+
58
+ if ($result) {
59
+ $status = $result->getOrderReferenceStatus()->getState();
60
+
61
+ $message = Mage::helper('payment')->__('Sync with Amazon: Amazon order status is %s.', $status);
62
+
63
+ if ($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
64
+
65
+ $order->setStatus($_api->getConfig()->getNewOrderStatus());
66
+
67
+ // Payment accepted...
68
+ if ($status == Amazon_Payments_Model_Api::AUTH_STATUS_OPEN) {
69
+
70
+ // Authorize & Capture -- create invoice
71
+ if ($_api->getConfig()->getPaymentAction() == Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE) {
72
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
73
+
74
+ if ($this->_createInvoice($order, $result->getIdList()->getmember())) {
75
+ $message .= ' ' . Mage::helper('payment')->__('Invoice created.');
76
+ }
77
+ }
78
+ // Capture only
79
+ else {
80
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW);
81
+ }
82
+ }
83
+ // Declined
84
+ elseif ($status == Amazon_Payments_Model_Api::AUTH_STATUS_DECLINED) {
85
+ $order->setState(Mage_Sales_Model_Order::STATE_HOLDED);
86
+ $order->setStatus(Mage_Sales_Model_Order::ACTION_FLAG_HOLD);
87
+ $message .= ' Order placed on hold. Please direct customer to Amazon Payments site to update their payment method.';
88
+ }
89
+
90
+
91
+ $order->addStatusToHistory($order->getStatus(), $message, false);
92
+
93
+ $order->save();
94
+ }
95
+
96
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
97
+ }
98
+ }
99
+
100
+ /**
101
+ * Magento cron to sync Amazon orders
102
+ */
103
+ public function cron()
104
+ {
105
+ if ($this->_getApi()->getConfig()->isAsync()) {
106
+
107
+ $orderCollection = Mage::getModel('sales/order_payment')
108
+ ->getCollection()
109
+ ->join(array('order'=>'sales/order'), 'main_table.parent_id=order.entity_id', 'state')
110
+ ->addFieldToFilter('method', 'amazon_payments')
111
+ ->addFieldToFilter('state', Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) // Async
112
+ ;
113
+
114
+ foreach ($orderCollection as $orderRow) {
115
+ $order = Mage::getModel('sales/order')->load($orderRow->getId());
116
+ $this->syncOrderStatus($order);
117
+ }
118
+ }
119
+ }
120
+ }
app/code/community/Amazon/Payments/Model/Config.php CHANGED
@@ -14,25 +14,30 @@ class Amazon_Payments_Model_Config
14
  * Paths to Payment Method config
15
  */
16
 
17
- const CONFIG_XML_PATH_ENABLED = 'payment/amazon_payments/enabled';
18
- const CONFIG_XML_PATH_CLIENT_ID = 'payment/amazon_payments/client_id';
19
- const CONFIG_XML_PATH_CLIENT_SECRET = 'payment/amazon_payments/client_secret';
20
- const CONFIG_XML_PATH_SELLER_ID = 'payment/amazon_payments/seller_id';
21
- const CONFIG_XML_PATH_ACCESS_KEY = 'payment/amazon_payments/access_key';
22
- const CONFIG_XML_PATH_ACCESS_SECRET = 'payment/amazon_payments/access_secret';
23
- const CONFIG_XML_PATH_REGION = 'payment/amazon_payments/region';
24
- const CONFIG_XML_PATH_SANDBOX = 'payment/amazon_payments/sandbox';
25
- const CONFIG_XML_PATH_DEBUG = 'payment/amazon_payments/debug';
26
- const CONFIG_XML_PATH_CHECKOUT_PAGE = 'payment/amazon_payments/checkout_page';
27
- const CONFIG_XML_PATH_SHOW_PAY_CART = 'payment/amazon_payments/show_pay_cart';
28
- const CONFIG_XML_PATH_STORE_NAME = 'payment/amazon_payments/store_name';
29
- const CONFIG_XML_PATH_SECURE_CART = 'payment/amazon_payments/secure_cart';
 
 
 
 
30
 
31
  const CONFIG_XML_PATH_BUTTON_TYPE = 'payment/amazon_payments/button_type';
32
  const CONFIG_XML_PATH_BUTTON_COLOR = 'payment/amazon_payments/button_color';
33
  const CONFIG_XML_PATH_BUTTON_SIZE = 'payment/amazon_payments/button_size';
34
 
35
- const CONFIG_XML_PATH_LOGIN_ENABLED = 'amazon_login/settings/enabled';
 
36
 
37
  /**
38
  * Retrieve config value for store by path
@@ -65,6 +70,13 @@ class Amazon_Payments_Model_Config
65
  */
66
  public function isEnabled($store = null)
67
  {
 
 
 
 
 
 
 
68
  return ($this->_getStoreConfig(self::CONFIG_XML_PATH_ENABLED, $store) && $this->getClientId($store) && $this->getClientSecret($store));
69
  }
70
 
@@ -171,6 +183,28 @@ class Amazon_Payments_Model_Config
171
  return $this->_getStoreConfig(self::CONFIG_XML_PATH_CHECKOUT_PAGE, $store);
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /**
175
  * Get customzied store name, if used
176
  *
@@ -232,6 +266,17 @@ class Amazon_Payments_Model_Config
232
  return ($this->_getStoreConfig(self::CONFIG_XML_PATH_SECURE_CART, $store));
233
  }
234
 
 
 
 
 
 
 
 
 
 
 
 
235
  /**
236
  * Get button type
237
  *
14
  * Paths to Payment Method config
15
  */
16
 
17
+ const CONFIG_XML_PATH_ENABLED = 'payment/amazon_payments/enabled';
18
+ const CONFIG_XML_PATH_CLIENT_ID = 'payment/amazon_payments/client_id';
19
+ const CONFIG_XML_PATH_CLIENT_SECRET = 'payment/amazon_payments/client_secret';
20
+ const CONFIG_XML_PATH_SELLER_ID = 'payment/amazon_payments/seller_id';
21
+ const CONFIG_XML_PATH_ACCESS_KEY = 'payment/amazon_payments/access_key';
22
+ const CONFIG_XML_PATH_ACCESS_SECRET = 'payment/amazon_payments/access_secret';
23
+ const CONFIG_XML_PATH_REGION = 'payment/amazon_payments/region';
24
+ const CONFIG_XML_PATH_SANDBOX = 'payment/amazon_payments/sandbox';
25
+ const CONFIG_XML_PATH_DEBUG = 'payment/amazon_payments/debug';
26
+ const CONFIG_XML_PATH_CHECKOUT_PAGE = 'payment/amazon_payments/checkout_page';
27
+ const CONFIG_XML_PATH_PAYMENT_ACTION = 'payment/amazon_payments/payment_action';
28
+ const CONFIG_XML_PATH_ORDER_STATUS = 'payment/amazon_payments/order_status';
29
+ const CONFIG_XML_PATH_SHOW_PAY_CART = 'payment/amazon_payments/show_pay_cart';
30
+ const CONFIG_XML_PATH_STORE_NAME = 'payment/amazon_payments/store_name';
31
+ const CONFIG_XML_PATH_SECURE_CART = 'payment/amazon_payments/secure_cart';
32
+ const CONFIG_XML_PATH_IS_ASYNC = 'payment/amazon_payments/is_async';
33
+ const CONFIG_XML_PATH_RESTRICTED_IPS = 'payment/amazon_payments/restricted_ips';
34
 
35
  const CONFIG_XML_PATH_BUTTON_TYPE = 'payment/amazon_payments/button_type';
36
  const CONFIG_XML_PATH_BUTTON_COLOR = 'payment/amazon_payments/button_color';
37
  const CONFIG_XML_PATH_BUTTON_SIZE = 'payment/amazon_payments/button_size';
38
 
39
+ const CONFIG_XML_PATH_LOGIN_ENABLED = 'amazon_login/settings/enabled';
40
+
41
 
42
  /**
43
  * Retrieve config value for store by path
70
  */
71
  public function isEnabled($store = null)
72
  {
73
+ // Check for IP Restriction
74
+ if ($this->_getStoreConfig(self::CONFIG_XML_PATH_RESTRICTED_IPS, $store)) {
75
+ if ( !Mage::helper('core')->isDevAllowed() ) {
76
+ return false;
77
+ }
78
+ }
79
+
80
  return ($this->_getStoreConfig(self::CONFIG_XML_PATH_ENABLED, $store) && $this->getClientId($store) && $this->getClientSecret($store));
81
  }
82
 
183
  return $this->_getStoreConfig(self::CONFIG_XML_PATH_CHECKOUT_PAGE, $store);
184
  }
185
 
186
+ /**
187
+ * Get payment action
188
+ *
189
+ * @param store $store
190
+ * @return string
191
+ */
192
+ public function getPaymentAction($store = null)
193
+ {
194
+ return $this->_getStoreConfig(self::CONFIG_XML_PATH_PAYMENT_ACTION, $store);
195
+ }
196
+
197
+ /**
198
+ * Get new order status
199
+ *
200
+ * @param store $store
201
+ * @return string
202
+ */
203
+ public function getNewOrderStatus($store = null)
204
+ {
205
+ return $this->_getStoreConfig(self::CONFIG_XML_PATH_ORDER_STATUS, $store);
206
+ }
207
+
208
  /**
209
  * Get customzied store name, if used
210
  *
266
  return ($this->_getStoreConfig(self::CONFIG_XML_PATH_SECURE_CART, $store));
267
  }
268
 
269
+ /**
270
+ * Is async mode?
271
+ *
272
+ * @param store $store
273
+ * @return bool
274
+ */
275
+ public function isAsync($store = null)
276
+ {
277
+ return ($this->_getStoreConfig(self::CONFIG_XML_PATH_IS_ASYNC, $store));
278
+ }
279
+
280
  /**
281
  * Get button type
282
  *
app/code/community/Amazon/Payments/Model/Observer/Adminhtml.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Amazon Payments
4
+ *
5
+ * @category Amazon
6
+ * @package Amazon_Payments
7
+ * @copyright Copyright (c) 2014 Amazon.com
8
+ * @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
9
+ */
10
+
11
+ class Amazon_Payments_Model_Observer_Adminhtml
12
+ {
13
+ /**
14
+ * Event: adminhtml_widget_container_html_before
15
+ */
16
+ public function addAsyncButton(Varien_Event_Observer $observer)
17
+ {
18
+ $block = $observer->getEvent()->getBlock();
19
+
20
+ if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
21
+ $order = $block->getOrder();
22
+
23
+ if (($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) && $order->getPayment()->getMethodInstance()->getCode() == 'amazon_payments') {
24
+ $block->addButton('sync_amazon', array(
25
+ 'label' => Mage::helper('amazon_payments')->__('Sync with Amazon'),
26
+ 'onclick' => "setLocation('{$block->getUrl('*/amazon_payments/sync/order_id/{$order->getId()}')}')",
27
+ ));
28
+
29
+ $block->removeButton('order_invoice');
30
+ $block->removeButton('order_ship');
31
+ $block->removeButton('order_reorder');
32
+ }
33
+ }
34
+
35
+ }
36
+
37
+ }
app/code/community/Amazon/Payments/Model/Observer/Onepage.php CHANGED
@@ -10,8 +10,12 @@
10
 
11
  class Amazon_Payments_Model_Observer_Onepage
12
  {
 
 
13
  /**
14
  * Event: controller_action_layout_load_before
 
 
15
  */
16
  public function beforeLoadLayout(Varien_Event_Observer $observer)
17
  {
@@ -25,8 +29,53 @@ class Amazon_Payments_Model_Observer_Onepage
25
  Mage::app()->getFrontController()->getResponse()->setRedirect($_helper->getStandaloneUrl());
26
  }
27
 
 
28
  $observer->getEvent()->getLayout()->getUpdate()->addHandle('checkout_onepage_index_amazon_payments');
29
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
 
32
  }
10
 
11
  class Amazon_Payments_Model_Observer_Onepage
12
  {
13
+ protected $_quote;
14
+
15
  /**
16
  * Event: controller_action_layout_load_before
17
+ *
18
+ * Load layout handle override for OnePage
19
  */
20
  public function beforeLoadLayout(Varien_Event_Observer $observer)
21
  {
29
  Mage::app()->getFrontController()->getResponse()->setRedirect($_helper->getStandaloneUrl());
30
  }
31
 
32
+ // Use custom checkout layout
33
  $observer->getEvent()->getLayout()->getUpdate()->addHandle('checkout_onepage_index_amazon_payments');
34
  }
35
+ }
36
+
37
+
38
+ /**
39
+ * Event: custom_quote_process
40
+ *
41
+ * Clear address if user switches from Amazon Checkout to third-party checkout
42
+ */
43
+ public function clearShippingAddress(Varien_Event_Observer $observer)
44
+ {
45
+ $_helper = Mage::helper('amazon_payments/data');
46
+ $session = $observer->getEvent()->getCheckoutSession();
47
+
48
+ $action = Mage::app()->getFrontController()->getAction()->getFullActionName();
49
+ $action_reset = array('opc_index_index', 'firecheckout_index_index');
50
+
51
+ if (in_array($action, $action_reset) && $session && $session->getCheckoutState() == 'begin' && $session->getAmazonAddressId() && $session->getQuoteId() && $this->_quote === null) {
52
 
53
+ $quote = $this->_quote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore()->getId())->load($session->getQuoteId());
54
+ $address = $quote->getShippingAddress();
55
+
56
+ if ($address->getId() == $session->getAmazonAddressId()) {
57
+
58
+ $reset = array(
59
+ 'firstname' => '',
60
+ 'lastname' => '',
61
+ 'street' => '',
62
+ 'city' => '',
63
+ 'region_id' => '',
64
+ 'postcode' => '',
65
+ 'country_id' => '',
66
+ 'telephone' => '',
67
+ );
68
+
69
+ $address->setData($reset);
70
+ $quote->setShippingAddress($address);
71
+ $quote->setBillingAddress($address);
72
+
73
+ $quote->collectTotals()->save();
74
+
75
+ $session->unsAmazonAddressId();
76
+ }
77
+
78
+ }
79
  }
80
+
81
  }
app/code/community/Amazon/Payments/Model/PaymentMethod.php CHANGED
@@ -30,14 +30,6 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
30
  protected $_canFetchTransactionInfo = true;
31
  protected $_canReviewPayment = false;
32
 
33
- // Amazon Authorization States
34
- const AUTH_STATUS_PENDING = 'Pending';
35
- const AUTH_STATUS_OPEN = 'Open';
36
- const AUTH_STATUS_DECLINED = 'Declined';
37
- const AUTH_STATUS_CLOSED = 'Closed';
38
- const AUTH_STATUS_COMPLETED = 'Completed';
39
-
40
-
41
  /**
42
  * Return Amazon API
43
  */
@@ -96,7 +88,16 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
96
  $stateObject->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
97
  }
98
 
99
- $stateObject->setStatus($this->getConfigData('order_status'));
 
 
 
 
 
 
 
 
 
100
  $stateObject->setIsNotified(Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE);
101
  }
102
 
@@ -127,9 +128,9 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
127
  $status = $result->getAuthorizationStatus();
128
 
129
  switch ($status->getState()) {
130
- case self::AUTH_STATUS_PENDING:
131
- case self::AUTH_STATUS_OPEN:
132
- case self::AUTH_STATUS_CLOSED:
133
 
134
  $payment->setTransactionId($result->getAmazonAuthorizationId());
135
  $payment->setParentTransactionId($payment->getAdditionalInformation('order_reference'));
@@ -138,24 +139,26 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
138
  // Add transaction
139
  if ($captureNow) {
140
 
141
- $transactionSave = Mage::getModel('core/resource_transaction');
 
142
 
143
- $captureReferenceIds = $result->getIdList()->getmember();
144
 
145
- if ($order->canInvoice()) {
146
- // Create invoice
147
- $invoice = $order
148
- ->prepareInvoice()
149
- ->register();
150
- $invoice->setTransactionId(current($captureReferenceIds));
151
 
152
- $transactionSave
153
- ->addObject($invoice)
154
- ->addObject($invoice->getOrder());
155
 
156
- }
157
 
158
- $transactionSave->save();
 
159
 
160
  $transactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
161
  $message = Mage::helper('payment')->__('Authorize and capture request for %s sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
@@ -169,7 +172,7 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
169
 
170
  break;
171
 
172
- case self::AUTH_STATUS_DECLINED:
173
  // Cancel order reference
174
  if ($status->getReasonCode() == 'TransactionTimedOut') {
175
  $this->_getApi()->cancelOrderReference($payment->getTransactionId());
@@ -230,11 +233,18 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
230
  );
231
  }
232
 
233
- $apiResult = $this->_getApi()->confirmOrderReference($orderReferenceId);
 
 
 
 
 
 
 
234
 
235
  $payment->setIsTransactionClosed(false);
236
  $payment->setSkipOrderProcessing(true);
237
- $message = Mage::helper('payment')->__('Order of %s sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
238
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $message);
239
 
240
 
@@ -296,13 +306,13 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
296
 
297
  // Error handling
298
  switch ($status->getState()) {
299
- case self::AUTH_STATUS_PENDING:
300
- case self::AUTH_STATUS_DECLINED:
301
- case self::AUTH_STATUS_CLOSED:
302
  $this->_setErrorCheck();
303
  Mage::throwException('Amazon Payments capture error: ' . $status->getReasonCode() . ' - ' . $status->getReasonDescription());
304
  break;
305
- case self::AUTH_STATUS_COMPLETED:
306
  // Already captured.
307
  break;
308
  default:
@@ -337,7 +347,7 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
337
 
338
  $result = $this->_getApi()->refund(
339
  $payment->getRefundTransactionId(),
340
- $this->_getMagentoReferenceId($payment) . '-refund',
341
  $amount,
342
  $order->getBaseCurrencyCode(),
343
  null,
@@ -433,7 +443,7 @@ class Amazon_Payments_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
433
  */
434
  public function canUseCheckout()
435
  {
436
- return (Mage::helper('amazon_payments')->isCheckoutAmazonSession() || $this->getConfigData('use_in_checkout'));
437
  }
438
 
439
 
30
  protected $_canFetchTransactionInfo = true;
31
  protected $_canReviewPayment = false;
32
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Return Amazon API
35
  */
88
  $stateObject->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
89
  }
90
 
91
+ // Asynchronous Mode always returns Pending
92
+ if ($this->getConfigData('is_async')) {
93
+ // "Pending Payment" indicates async for internal use
94
+ $stateObject->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
95
+ $stateObject->setStatus('pending');
96
+ }
97
+ else {
98
+ $stateObject->setStatus($this->getConfigData('order_status'));
99
+ }
100
+
101
  $stateObject->setIsNotified(Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE);
102
  }
103
 
128
  $status = $result->getAuthorizationStatus();
129
 
130
  switch ($status->getState()) {
131
+ case Amazon_Payments_Model_Api::AUTH_STATUS_PENDING:
132
+ case Amazon_Payments_Model_Api::AUTH_STATUS_OPEN:
133
+ case Amazon_Payments_Model_Api::AUTH_STATUS_CLOSED:
134
 
135
  $payment->setTransactionId($result->getAmazonAuthorizationId());
136
  $payment->setParentTransactionId($payment->getAdditionalInformation('order_reference'));
139
  // Add transaction
140
  if ($captureNow) {
141
 
142
+ if (!$this->getConfigData('is_async')) {
143
+ $transactionSave = Mage::getModel('core/resource_transaction');
144
 
145
+ $captureReferenceIds = $result->getIdList()->getmember();
146
 
147
+ if ($order->canInvoice()) {
148
+ // Create invoice
149
+ $invoice = $order
150
+ ->prepareInvoice()
151
+ ->register();
152
+ $invoice->setTransactionId(current($captureReferenceIds));
153
 
154
+ $transactionSave
155
+ ->addObject($invoice)
156
+ ->addObject($invoice->getOrder());
157
 
158
+ }
159
 
160
+ $transactionSave->save();
161
+ }
162
 
163
  $transactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
164
  $message = Mage::helper('payment')->__('Authorize and capture request for %s sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
172
 
173
  break;
174
 
175
+ case Amazon_Payments_Model_Api::AUTH_STATUS_DECLINED:
176
  // Cancel order reference
177
  if ($status->getReasonCode() == 'TransactionTimedOut') {
178
  $this->_getApi()->cancelOrderReference($payment->getTransactionId());
233
  );
234
  }
235
 
236
+ try {
237
+ $apiResult = $this->_getApi()->confirmOrderReference($orderReferenceId);
238
+ }
239
+ catch (Exception $e) {
240
+ Mage::throwException("Please try another Amazon payment method." . "\n\n" . substr($e->getMessage(), 0, strpos($e->getMessage(), 'Stack trace')));
241
+ $this->_setErrorCheck();
242
+ return;
243
+ }
244
 
245
  $payment->setIsTransactionClosed(false);
246
  $payment->setSkipOrderProcessing(true);
247
+ $message = Mage::helper('payment')->__(($this->getConfigData('is_async') ? 'Asynchronous ' : '') . 'Order of %s sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
248
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $message);
249
 
250
 
306
 
307
  // Error handling
308
  switch ($status->getState()) {
309
+ case Amazon_Payments_Model_Api::AUTH_STATUS_PENDING:
310
+ case Amazon_Payments_Model_Api::AUTH_STATUS_DECLINED:
311
+ case Amazon_Payments_Model_Api::AUTH_STATUS_CLOSED:
312
  $this->_setErrorCheck();
313
  Mage::throwException('Amazon Payments capture error: ' . $status->getReasonCode() . ' - ' . $status->getReasonDescription());
314
  break;
315
+ case Amazon_Payments_Model_Api::AUTH_STATUS_COMPLETED:
316
  // Already captured.
317
  break;
318
  default:
347
 
348
  $result = $this->_getApi()->refund(
349
  $payment->getRefundTransactionId(),
350
+ $this->_getMagentoReferenceId($payment) . substr(md5($this->_getMagentoReferenceId($payment) . microtime() ),-4) . '-refund',
351
  $amount,
352
  $order->getBaseCurrencyCode(),
353
  null,
443
  */
444
  public function canUseCheckout()
445
  {
446
+ return (Mage::getSingleton('amazon_payments/config')->isEnabled() && ((Mage::helper('amazon_payments')->isCheckoutAmazonSession() && $this->getConfigData('checkout_page') == 'onepage') || $this->getConfigData('use_in_checkout')));
447
  }
448
 
449
 
app/code/community/Amazon/Payments/Model/Type/Checkout.php CHANGED
@@ -59,6 +59,7 @@ class Amazon_Payments_Model_Type_Checkout extends Mage_Checkout_Model_Type_Onepa
59
  $address = $this->getQuote()->getShippingAddress();
60
 
61
  /* @var $addressForm Mage_Customer_Model_Form */
 
62
  $addressForm = Mage::getModel('customer/form');
63
  $addressForm->setFormCode('customer_address_edit')
64
  ->setEntityType('customer_address')
@@ -75,6 +76,7 @@ class Amazon_Payments_Model_Type_Checkout extends Mage_Checkout_Model_Type_Onepa
75
  $address->setData($attribute->getAttributeCode(), NULL);
76
  }
77
  }
 
78
 
79
  $address->setCustomerAddressId(null);
80
  // Additional form data, not fetched by extractData (as it fetches only attributes)
@@ -101,6 +103,9 @@ class Amazon_Payments_Model_Type_Checkout extends Mage_Checkout_Model_Type_Onepa
101
  ->setStepData('shipping', 'complete', true)
102
  ->setStepData('shipping_method', 'allow', true);
103
 
 
 
 
104
  return array();
105
  }
106
 
59
  $address = $this->getQuote()->getShippingAddress();
60
 
61
  /* @var $addressForm Mage_Customer_Model_Form */
62
+ /*
63
  $addressForm = Mage::getModel('customer/form');
64
  $addressForm->setFormCode('customer_address_edit')
65
  ->setEntityType('customer_address')
76
  $address->setData($attribute->getAttributeCode(), NULL);
77
  }
78
  }
79
+ */
80
 
81
  $address->setCustomerAddressId(null);
82
  // Additional form data, not fetched by extractData (as it fetches only attributes)
103
  ->setStepData('shipping', 'complete', true)
104
  ->setStepData('shipping_method', 'allow', true);
105
 
106
+
107
+ Mage::getSingleton('checkout/session')->setAmazonAddressId($address->getId());
108
+
109
  return array();
110
  }
111
 
app/code/community/Amazon/Payments/controllers/Adminhtml/Amazon/PaymentsController.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Adminhtml sales orders controller
5
+ *
6
+ * @category Mage
7
+ * @package Mage_Adminhtml
8
+ * @author Magento Core Team <core@magentocommerce.com>
9
+ */
10
+ class Amazon_Payments_Adminhtml_Amazon_PaymentsController extends Mage_Adminhtml_Controller_Action
11
+ {
12
+
13
+ /**
14
+ * Return Amazon API
15
+ */
16
+ protected function _getApi()
17
+ {
18
+ return Mage::getSingleton('amazon_payments/api');
19
+ }
20
+
21
+ public function indexAction()
22
+ {
23
+ $this->loadLayout();
24
+ $this->renderLayout();
25
+ }
26
+
27
+ /**
28
+ * Manually sync order status with Amazon
29
+ */
30
+ public function syncAction()
31
+ {
32
+ $orderId = Mage::app()->getRequest()->getParam('order_id');
33
+ $order = Mage::getModel('sales/order')->load($orderId);
34
+
35
+ if ($order->getId()) {
36
+ Mage::getSingleton('amazon_payments/async')->syncOrderStatus($order, true);
37
+
38
+ Mage::app()->getResponse()->setRedirect(Mage::helper('adminhtml')->getUrl("adminhtml/sales_order/view", array('order_id' => $orderId)));
39
+ }
40
+
41
+ }
42
+ }
app/code/community/Amazon/Payments/etc/config.xml CHANGED
@@ -55,6 +55,17 @@
55
  </resources>
56
 
57
  </global>
 
 
 
 
 
 
 
 
 
 
 
58
  <adminhtml>
59
  <layout>
60
  <updates>
@@ -63,6 +74,16 @@
63
  </tax>
64
  </updates>
65
  </layout>
 
 
 
 
 
 
 
 
 
 
66
  </adminhtml>
67
 
68
  <frontend>
@@ -112,6 +133,14 @@
112
  </amazon_payments_observer>
113
  </observers>
114
  </controller_action_predispatch_checkout_cart_index>
 
 
 
 
 
 
 
 
115
  </events>
116
  </frontend>
117
 
@@ -132,4 +161,13 @@
132
  </payment>
133
  </default>
134
 
 
 
 
 
 
 
 
 
 
135
  </config>
55
  </resources>
56
 
57
  </global>
58
+ <admin>
59
+ <routers>
60
+ <adminhtml>
61
+ <args>
62
+ <modules>
63
+ <Amazon_Payments after="Mage_Adminhtml">Amazon_Payments_Adminhtml</Amazon_Payments>
64
+ </modules>
65
+ </args>
66
+ </adminhtml>
67
+ </routers>
68
+ </admin>
69
  <adminhtml>
70
  <layout>
71
  <updates>
74
  </tax>
75
  </updates>
76
  </layout>
77
+ <events>
78
+ <adminhtml_widget_container_html_before>
79
+ <observers>
80
+ <amazon_payments>
81
+ <class>Amazon_Payments_Model_Observer_Adminhtml</class>
82
+ <method>addAsyncButton</method>
83
+ </amazon_payments>
84
+ </observers>
85
+ </adminhtml_widget_container_html_before>
86
+ </events>
87
  </adminhtml>
88
 
89
  <frontend>
133
  </amazon_payments_observer>
134
  </observers>
135
  </controller_action_predispatch_checkout_cart_index>
136
+ <custom_quote_process>
137
+ <observers>
138
+ <amazon_payments_observer>
139
+ <class>Amazon_Payments_Model_Observer_Onepage</class>
140
+ <method>clearShippingAddress</method>
141
+ </amazon_payments_observer>
142
+ </observers>
143
+ </custom_quote_process>
144
  </events>
145
  </frontend>
146
 
161
  </payment>
162
  </default>
163
 
164
+ <crontab>
165
+ <jobs>
166
+ <amazon_payments_async>
167
+ <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
168
+ <run><model>amazon_payments/async::cron</model></run>
169
+ </amazon_payments_async>
170
+ </jobs>
171
+ </crontab>
172
+
173
  </config>
app/code/community/Amazon/Payments/etc/system.xml CHANGED
@@ -124,7 +124,7 @@
124
  <heading_config translate="label">
125
  <label>Checkout Configuration</label>
126
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
127
- <sort_order>35</sort_order>
128
  <show_in_default>1</show_in_default>
129
  <show_in_website>1</show_in_website>
130
  <show_in_store>0</show_in_store>
@@ -135,7 +135,7 @@
135
  <label>Checkout Page Type</label>
136
  <frontend_type>select</frontend_type>
137
  <source_model>amazon_payments/system_config_source_checkoutpage</source_model>
138
- <sort_order>40</sort_order>
139
  <show_in_default>1</show_in_default>
140
  <show_in_website>1</show_in_website>
141
  <show_in_store>0</show_in_store>
@@ -146,7 +146,7 @@
146
  <comment><![CDATA[Only applies when OnePage Checkout is used, otherwise button is always shown.]]></comment>
147
  <frontend_type>select</frontend_type>
148
  <source_model>adminhtml/system_config_source_yesno</source_model>
149
- <sort_order>45</sort_order>
150
  <show_in_default>1</show_in_default>
151
  <show_in_website>1</show_in_website>
152
  <show_in_store>0</show_in_store>
@@ -156,7 +156,7 @@
156
  <label>Payment Action</label>
157
  <frontend_type>select</frontend_type>
158
  <source_model>amazon_payments/system_config_source_paymentaction</source_model>
159
- <sort_order>50</sort_order>
160
  <show_in_default>1</show_in_default>
161
  <show_in_website>1</show_in_website>
162
  <show_in_store>0</show_in_store>
@@ -166,7 +166,7 @@
166
  <label>New Order Status</label>
167
  <frontend_type>select</frontend_type>
168
  <source_model>adminhtml/system_config_source_order_status_newprocessing</source_model>
169
- <sort_order>60</sort_order>
170
  <show_in_default>1</show_in_default>
171
  <show_in_website>1</show_in_website>
172
  <show_in_store>0</show_in_store>
@@ -176,7 +176,7 @@
176
  <label>Email Store Name</label>
177
  <frontend_type>text</frontend_type>
178
  <comment><![CDATA[Store name to display in Amazon emails. If left blank, current Magento store name will be used.]]></comment>
179
- <sort_order>60</sort_order>
180
  <show_in_default>0</show_in_default>
181
  <show_in_website>1</show_in_website>
182
  <show_in_store>1</show_in_store>
@@ -187,7 +187,7 @@
187
  <comment><![CDATA[Pop-up must be set to "No" under Customers->Login with Amazon.]]></comment>
188
  <frontend_type>select</frontend_type>
189
  <source_model>adminhtml/system_config_source_yesno</source_model>
190
- <sort_order>65</sort_order>
191
  <show_in_default>1</show_in_default>
192
  <show_in_website>1</show_in_website>
193
  <show_in_store>1</show_in_store>
@@ -198,7 +198,7 @@
198
  <comment><![CDATA[HTTPS is required to use the Amazon button on the cart page.]]></comment>
199
  <frontend_type>select</frontend_type>
200
  <source_model>adminhtml/system_config_source_yesno</source_model>
201
- <sort_order>66</sort_order>
202
  <show_in_default>1</show_in_default>
203
  <show_in_website>1</show_in_website>
204
  <show_in_store>0</show_in_store>
@@ -209,16 +209,38 @@
209
  <comment><![CDATA[Add pay button under "Payment Information" during checkout. (Recommended flow is to display button before user enters billing and shipping information.)]]></comment>
210
  <frontend_type>select</frontend_type>
211
  <source_model>adminhtml/system_config_source_yesno</source_model>
212
- <sort_order>67</sort_order>
213
  <show_in_default>1</show_in_default>
214
  <show_in_website>1</show_in_website>
215
  <show_in_store>0</show_in_store>
216
  </use_in_checkout>
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  <heading_button translate="label">
219
  <label>Button Style</label>
220
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
221
- <sort_order>70</sort_order>
222
  <show_in_default>1</show_in_default>
223
  <show_in_website>1</show_in_website>
224
  <show_in_store>0</show_in_store>
@@ -228,7 +250,7 @@
228
  <label>Button Label</label>
229
  <frontend_type>select</frontend_type>
230
  <source_model>amazon_payments/system_config_source_buttontype</source_model>
231
- <sort_order>71</sort_order>
232
  <show_in_default>1</show_in_default>
233
  <show_in_website>1</show_in_website>
234
  <show_in_store>1</show_in_store>
@@ -238,7 +260,7 @@
238
  <label>Button Color</label>
239
  <frontend_type>select</frontend_type>
240
  <source_model>amazon_payments/system_config_source_buttoncolor</source_model>
241
- <sort_order>72</sort_order>
242
  <show_in_default>1</show_in_default>
243
  <show_in_website>1</show_in_website>
244
  <show_in_store>1</show_in_store>
@@ -248,16 +270,18 @@
248
  <label>Button Size</label>
249
  <frontend_type>select</frontend_type>
250
  <source_model>amazon_payments/system_config_source_buttonsize</source_model>
251
- <sort_order>73</sort_order>
252
  <show_in_default>1</show_in_default>
253
  <show_in_website>1</show_in_website>
254
  <show_in_store>1</show_in_store>
255
  </button_size>
256
 
 
 
257
  <heading_dev translate="label">
258
  <label>Development</label>
259
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
260
- <sort_order>80</sort_order>
261
  <show_in_default>1</show_in_default>
262
  <show_in_website>1</show_in_website>
263
  <show_in_store>0</show_in_store>
@@ -267,7 +291,7 @@
267
  <label>Sandbox Mode</label>
268
  <frontend_type>select</frontend_type>
269
  <source_model>adminhtml/system_config_source_yesno</source_model>
270
- <sort_order>90</sort_order>
271
  <show_in_default>1</show_in_default>
272
  <show_in_website>1</show_in_website>
273
  <show_in_store>0</show_in_store>
@@ -280,12 +304,24 @@
280
  </comment>
281
  <frontend_type>select</frontend_type>
282
  <source_model>adminhtml/system_config_source_yesno</source_model>
283
- <sort_order>100</sort_order>
284
  <show_in_default>1</show_in_default>
285
  <show_in_website>1</show_in_website>
286
  <show_in_store>0</show_in_store>
287
  </debug>
288
 
 
 
 
 
 
 
 
 
 
 
 
 
289
 
290
  </fields>
291
  </amazon_payments>
124
  <heading_config translate="label">
125
  <label>Checkout Configuration</label>
126
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
127
+ <sort_order>100</sort_order>
128
  <show_in_default>1</show_in_default>
129
  <show_in_website>1</show_in_website>
130
  <show_in_store>0</show_in_store>
135
  <label>Checkout Page Type</label>
136
  <frontend_type>select</frontend_type>
137
  <source_model>amazon_payments/system_config_source_checkoutpage</source_model>
138
+ <sort_order>110</sort_order>
139
  <show_in_default>1</show_in_default>
140
  <show_in_website>1</show_in_website>
141
  <show_in_store>0</show_in_store>
146
  <comment><![CDATA[Only applies when OnePage Checkout is used, otherwise button is always shown.]]></comment>
147
  <frontend_type>select</frontend_type>
148
  <source_model>adminhtml/system_config_source_yesno</source_model>
149
+ <sort_order>120</sort_order>
150
  <show_in_default>1</show_in_default>
151
  <show_in_website>1</show_in_website>
152
  <show_in_store>0</show_in_store>
156
  <label>Payment Action</label>
157
  <frontend_type>select</frontend_type>
158
  <source_model>amazon_payments/system_config_source_paymentaction</source_model>
159
+ <sort_order>130</sort_order>
160
  <show_in_default>1</show_in_default>
161
  <show_in_website>1</show_in_website>
162
  <show_in_store>0</show_in_store>
166
  <label>New Order Status</label>
167
  <frontend_type>select</frontend_type>
168
  <source_model>adminhtml/system_config_source_order_status_newprocessing</source_model>
169
+ <sort_order>140</sort_order>
170
  <show_in_default>1</show_in_default>
171
  <show_in_website>1</show_in_website>
172
  <show_in_store>0</show_in_store>
176
  <label>Email Store Name</label>
177
  <frontend_type>text</frontend_type>
178
  <comment><![CDATA[Store name to display in Amazon emails. If left blank, current Magento store name will be used.]]></comment>
179
+ <sort_order>150</sort_order>
180
  <show_in_default>0</show_in_default>
181
  <show_in_website>1</show_in_website>
182
  <show_in_store>1</show_in_store>
187
  <comment><![CDATA[Pop-up must be set to "No" under Customers->Login with Amazon.]]></comment>
188
  <frontend_type>select</frontend_type>
189
  <source_model>adminhtml/system_config_source_yesno</source_model>
190
+ <sort_order>160</sort_order>
191
  <show_in_default>1</show_in_default>
192
  <show_in_website>1</show_in_website>
193
  <show_in_store>1</show_in_store>
198
  <comment><![CDATA[HTTPS is required to use the Amazon button on the cart page.]]></comment>
199
  <frontend_type>select</frontend_type>
200
  <source_model>adminhtml/system_config_source_yesno</source_model>
201
+ <sort_order>170</sort_order>
202
  <show_in_default>1</show_in_default>
203
  <show_in_website>1</show_in_website>
204
  <show_in_store>0</show_in_store>
209
  <comment><![CDATA[Add pay button under "Payment Information" during checkout. (Recommended flow is to display button before user enters billing and shipping information.)]]></comment>
210
  <frontend_type>select</frontend_type>
211
  <source_model>adminhtml/system_config_source_yesno</source_model>
212
+ <sort_order>180</sort_order>
213
  <show_in_default>1</show_in_default>
214
  <show_in_website>1</show_in_website>
215
  <show_in_store>0</show_in_store>
216
  </use_in_checkout>
217
 
218
+ <sort_order translate="label">
219
+ <label>Sort Order</label>
220
+ <frontend_type>text</frontend_type>
221
+ <sort_order>190</sort_order>
222
+ <show_in_default>1</show_in_default>
223
+ <show_in_website>1</show_in_website>
224
+ <show_in_store>0</show_in_store>
225
+ <frontend_class>validate-number</frontend_class>
226
+ <depends><use_in_checkout>1</use_in_checkout></depends>
227
+ </sort_order>
228
+
229
+ <is_async translate="label">
230
+ <label>Asynchronous Mode</label>
231
+ <comment><![CDATA[In asynchronous mode, the payment is returned as a Pending status instead of an immediate Open or Declined status. Customers will need to be notified of a Declined status.]]></comment>
232
+ <frontend_type>select</frontend_type>
233
+ <source_model>adminhtml/system_config_source_yesno</source_model>
234
+ <sort_order>200</sort_order>
235
+ <show_in_default>1</show_in_default>
236
+ <show_in_website>1</show_in_website>
237
+ <show_in_store>0</show_in_store>
238
+ </is_async>
239
+
240
  <heading_button translate="label">
241
  <label>Button Style</label>
242
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
243
+ <sort_order>400</sort_order>
244
  <show_in_default>1</show_in_default>
245
  <show_in_website>1</show_in_website>
246
  <show_in_store>0</show_in_store>
250
  <label>Button Label</label>
251
  <frontend_type>select</frontend_type>
252
  <source_model>amazon_payments/system_config_source_buttontype</source_model>
253
+ <sort_order>410</sort_order>
254
  <show_in_default>1</show_in_default>
255
  <show_in_website>1</show_in_website>
256
  <show_in_store>1</show_in_store>
260
  <label>Button Color</label>
261
  <frontend_type>select</frontend_type>
262
  <source_model>amazon_payments/system_config_source_buttoncolor</source_model>
263
+ <sort_order>430</sort_order>
264
  <show_in_default>1</show_in_default>
265
  <show_in_website>1</show_in_website>
266
  <show_in_store>1</show_in_store>
270
  <label>Button Size</label>
271
  <frontend_type>select</frontend_type>
272
  <source_model>amazon_payments/system_config_source_buttonsize</source_model>
273
+ <sort_order>440</sort_order>
274
  <show_in_default>1</show_in_default>
275
  <show_in_website>1</show_in_website>
276
  <show_in_store>1</show_in_store>
277
  </button_size>
278
 
279
+
280
+
281
  <heading_dev translate="label">
282
  <label>Development</label>
283
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
284
+ <sort_order>500</sort_order>
285
  <show_in_default>1</show_in_default>
286
  <show_in_website>1</show_in_website>
287
  <show_in_store>0</show_in_store>
291
  <label>Sandbox Mode</label>
292
  <frontend_type>select</frontend_type>
293
  <source_model>adminhtml/system_config_source_yesno</source_model>
294
+ <sort_order>510</sort_order>
295
  <show_in_default>1</show_in_default>
296
  <show_in_website>1</show_in_website>
297
  <show_in_store>0</show_in_store>
304
  </comment>
305
  <frontend_type>select</frontend_type>
306
  <source_model>adminhtml/system_config_source_yesno</source_model>
307
+ <sort_order>520</sort_order>
308
  <show_in_default>1</show_in_default>
309
  <show_in_website>1</show_in_website>
310
  <show_in_store>0</show_in_store>
311
  </debug>
312
 
313
+ <restricted_ips translate="label">
314
+ <label>Restrict by IP</label>
315
+ <comment>
316
+ <![CDATA[Display to only whitelisted IPs found in <br>Developer -> Developer Client Restrictions]]>
317
+ </comment>
318
+ <frontend_type>select</frontend_type>
319
+ <source_model>adminhtml/system_config_source_yesno</source_model>
320
+ <sort_order>530</sort_order>
321
+ <show_in_default>1</show_in_default>
322
+ <show_in_website>1</show_in_website>
323
+ <show_in_store>0</show_in_store>
324
+ </restricted_ips>
325
 
326
  </fields>
327
  </amazon_payments>
app/design/adminhtml/default/default/template/amazon_payments/notifications.phtml CHANGED
@@ -20,4 +20,16 @@
20
  <span class="f-right"></span>
21
  </div>
22
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  <?php endif; ?>
20
  <span class="f-right"></span>
21
  </div>
22
 
23
+ <?php endif; ?>
24
+
25
+
26
+ <?php if ($this->isPaymentPatchRequired()) : ?>
27
+
28
+ <div class="notification-global">
29
+ <strong>
30
+ Amazon Payments requires a <a href="https://github.com/amzn/amazon-payments-magento-plugin/wiki/Magento-1.5-Compatibility" target="_blank">patched Payments.php</a> file for Magento 1.5 compatibility.
31
+ </strong>
32
+ <span class="f-right"></span>
33
+ </div>
34
+
35
  <?php endif; ?>
app/design/frontend/base/default/template/amazon_payments/checkout.phtml CHANGED
@@ -54,7 +54,7 @@
54
 
55
  <?php echo $this->getChildHtml('review') ?>
56
 
57
- <?php if ($this->isDebugMode()) : ?>
58
  <br />
59
  <h3>Authorization Sandbox Simulation:</h3>
60
  <textarea id="sandbox"></textarea>
54
 
55
  <?php echo $this->getChildHtml('review') ?>
56
 
57
+ <?php if ($this->helper('amazon_payments')->isAmazonSandbox()) : ?>
58
  <br />
59
  <h3>Authorization Sandbox Simulation:</h3>
60
  <textarea id="sandbox"></textarea>
app/design/frontend/base/default/template/amazon_payments/form.phtml CHANGED
@@ -11,4 +11,27 @@
11
 
12
  <ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
13
  <li class="form-alt"><?php echo Mage::app()->getLayout()->createBlock('amazon_payments/button')->setTemplate('amazon_payments/button.phtml')->toHtml(); ?></li>
14
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  <ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
13
  <li class="form-alt"><?php echo Mage::app()->getLayout()->createBlock('amazon_payments/button')->setTemplate('amazon_payments/button.phtml')->toHtml(); ?></li>
14
+ </ul>
15
+
16
+ <script type='text/javascript'>
17
+
18
+ Element.prototype.triggerEvent = function(eventName) {
19
+ if (document.createEvent) {
20
+ var evt = document.createEvent('HTMLEvents');
21
+ evt.initEvent(eventName, true, true);
22
+ return this.dispatchEvent(evt);
23
+ }
24
+ if (this.fireEvent)
25
+ return this.fireEvent('on' + eventName);
26
+ }
27
+
28
+ // Display login on radio select
29
+ $$("input[name='payment[method]']").each(function(el) {
30
+ el.observe('change', function() {
31
+ if (el.value == 'amazon_payments') {
32
+ $$("#payment_form_amazon_payments img")[0].triggerEvent('click');
33
+ }
34
+ })
35
+ })
36
+
37
+ </script>
app/design/frontend/base/default/template/amazon_payments/script.phtml CHANGED
@@ -90,7 +90,7 @@ AmazonModal.prototype.resize = function() {
90
 
91
  document.observe("dom:loaded", function() {
92
  var amazonModal = new AmazonModal(1020);
93
- amazonModal.show('<?php print $_helper->getStandaloneUrl(); ?>?ajax=1&<?php print $_SERVER['QUERY_STRING']; ?>');
94
  });
95
 
96
 
90
 
91
  document.observe("dom:loaded", function() {
92
  var amazonModal = new AmazonModal(1020);
93
+ amazonModal.show('<?php print $_helper->getStandaloneUrl(); ?>?ajax=1&<?php print htmlentities($_SERVER['QUERY_STRING']); ?>');
94
  });
95
 
96
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>login_and_pay_for_magento</name>
4
- <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, Version 2.0</license>
7
  <channel>community</channel>
@@ -31,30 +31,39 @@
31
  Keep your customers secure! Leverage the same user authentication system used on Amazon.com.&lt;/p&gt;&#xD;
32
  &#xD;
33
  </description>
34
- <notes>v1.1.2 Release&#xD;
35
- Features&#xD;
36
- &#xD;
37
- Integration with Firecheckout extension&#xD;
38
- Integration with IWD OnePage checkout extension&#xD;
39
- Capture shipping address in customer address book in Magento&#xD;
40
- Allow configuration for secure cart (on/off). Allows for AJAX "Add to Cart" extensions to function and/or merchants to function without a secure cart&#xD;
41
- Issues Resolved&#xD;
42
- &#xD;
43
- - Fix #62 - add Amazon address to customer shipping address book when order is placed, checking for duplicates 5ef24c4&#xD;
44
- - Fix #40 - allow 115% or $75 over-refunds, whichever is smaller 51573d9&#xD;
45
- - Add configuration for secure cart on/off #71 b720bf6&#xD;
46
- - Fix iundefined isSecureCart #71 b4943d5&#xD;
47
- - Fix redirect if secure URL config is not HTTPS #71 f95734f&#xD;
48
- - #24 more fixes for undefined index notices on certain themes 7dd2e20&#xD;
49
- - Add Amazon pay button under Payment Info (enabled in config, off by default) for thrid-party checkouts 96fbb35&#xD;
50
- - #72 add payment option pay button 4721339&#xD;
51
- - Fix order state to be processing for auth &amp; capture 27bfec4&#xD;
52
- - Fix customer address update for virtual (no shipping address) orders cea65e4&#xD;
53
- - Fix order status e5a8015</notes>
 
 
 
 
 
 
 
 
 
54
  <authors><author><name>Amazon Payments</name><user>payments-cp-devel</user><email>payments-cp-devel@amazon.com</email></author></authors>
55
- <date>2014-10-15</date>
56
- <time>21:01:50</time>
57
- <contents><target name="magecommunity"><dir name="Amazon"><dir name="Login"><dir name="Block"><file name="Button.php" hash="6522fd3c81a5959c75979b8d17a62000"/><file name="Script.php" hash="40c4cca328e24521e3562f1466251c55"/><file name="Verify.php" hash="71ae4c427a3846f47ae3de927c54097a"/></dir><dir name="Helper"><file name="Data.php" hash="ae6797f0228b6cada765368d661d6bf6"/></dir><dir name="Model"><file name="Api.php" hash="48a3f6306d97f31fa4c3b954a665f334"/><file name="Customer.php" hash="7a019551c6efc3e073f838196c154f3f"/><file name="Login.php" hash="81a09b4f2c0c62e874ad209ef78ef462"/><dir name="Resource"><file name="Login.php" hash="cea5ac352d61cace9965f1cb940a7272"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enabled.php" hash="94bc7fde24ab2ee54ed15bbe7084f118"/><file name="Popupcomment.php" hash="ebcfc96661affbbe5de8ab4d4fc9d4bb"/></dir><dir name="Source"><file name="Buttoncolor.php" hash="ac335e432cd8e47c9ca4be601c706072"/><file name="Buttonsize.php" hash="76ef1db11834db449a7d52c34f3668d8"/><file name="Buttontype.php" hash="5e333d6cb1d70d0227766d78e390530b"/></dir></dir></dir></dir><dir name="controllers"><file name="CustomerController.php" hash="d326a02cb53c18bb78f988adb94a6478"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0aa18eecfebd3e0bb1d84cd6b1040f50"/><file name="config.xml" hash="96acfda506615306cf0554bfd5dbbda2"/><file name="system.xml" hash="cc00b85cef386caf51e2cfa729183091"/></dir><dir name="sql"><dir name="login_setup"><file name="install-0.1.0.php" hash="690c4c33f4c5221185c0589e3add63b3"/></dir></dir></dir><dir name="Payments"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="16e9934aec3fadb1823e2d1a496cc7c9"/></dir><file name="Button.php" hash="b5e6ec0b061f8d904cede42b4a697a77"/><file name="Checkout.php" hash="532f647be6bd8ed047ae72d380461b7a"/><file name="Form.php" hash="99202f27e0ac21ba8cd2e003fb0a49cd"/><file name="Link.php" hash="47c237fe4604333b2080588c5498a865"/><dir name="Onepage"><file name="Progress.php" hash="ab5ba2e80b849d77f81f10d64e0a141c"/><file name="Widget.php" hash="f10bb86d3e7e5a88dfdfa4e645a61086"/></dir><file name="Onepage.php" hash="1d865069483bbe776f511119e0e2252b"/><dir name="Review"><file name="Info.php" hash="8d3688c55137971b18aec41272cf13a6"/></dir><file name="Review.php" hash="d9cf9b6ef7d6f063a06e006e01f09513"/></dir><dir name="Controller"><file name="Checkout.php" hash="4b8c6f1b52ac59b9611dbb9e4fec2d4f"/></dir><dir name="Helper"><file name="Data.php" hash="b8a91e228801ed8adbbffc003e6847f3"/></dir><dir name="Model"><file name="Api.php" hash="9ca4284eb16dde68905d88d6544c15f9"/><file name="Config.php" hash="6251eff06f9e70d6c1ef39e18f43f46e"/><dir name="Observer"><file name="Action.php" hash="d38e500e635b4531ef71f08e92375f34"/><file name="Onepage.php" hash="ee0459cd7f1ee973ae3b58d9f40a4ead"/><file name="Order.php" hash="783f2f46726c4db21f5e5d2b47a9b25d"/></dir><dir name="Order"><file name="Creditmemo.php" hash="6732791d2839272564cf27ecda80707c"/></dir><file name="PaymentMethod.php" hash="391c6721b4f4848f1f67e8c0ef5a6680"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Clientid.php" hash="4512003bcffedf26bc2fe415b91b1be7"/><file name="Clientsecret.php" hash="d2d5f275e4275676e3f494da704e41da"/><file name="Enabled.php" hash="ac17bd3379ddf8d83013497088af85c5"/></dir><dir name="Source"><file name="Buttoncolor.php" hash="2564780faa369e54339bded78a882636"/><file name="Buttonsize.php" hash="7f740927b5a58a3ea15d07ac4cfbed28"/><file name="Buttontype.php" hash="735083e4848fa2258b95670b1a546843"/><file name="Checkoutpage.php" hash="2969f9eaa9d87571e0fa8f005e2cdeaf"/><file name="Paymentaction.php" hash="4dba1ce3518538d1a5add743d65c8695"/><file name="Region.php" hash="0718cf97d03a8c56c73fb7ea3a103bc5"/></dir></dir></dir><dir name="Type"><file name="Checkout.php" hash="a99538049d00fe13bb9110f2bd92f3bc"/></dir></dir><dir name="controllers"><file name="CheckoutController.php" hash="6d005be14745219d5f7d28d4c6f51a4b"/><file name="IndexController.php" hash="128f218a9e1bf4af4f7b380f14d87a52"/><file name="OnepageController.php" hash="cc03d109ee1cf98f85aba606f5a44654"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3c56d63f30e0e5cc8c22d3686046631b"/><file name="config.xml" hash="e725685ea3a641f98288e555ec099581"/><file name="system.xml" hash="53797f6c48a2c6fefb807105bd19dd38"/></dir><dir name="sql"><dir name="payments_setup"><file name="install-0.1.0.php" hash="658f9d8c8634b3158cee7b59866e6f39"/></dir></dir></dir></dir></target><target name="magelib"><dir name="OffAmazonPayments"><file name="Model.php" hash="a608217f17166ba11901f5334ad445de"/><file name=".autoloader.php" hash="193fddab8b5ca74646bb78243c0c7dda"/></dir><dir name="OffAmazonPaymentsNotifications"><file name="Client.php" hash="0ab53a8a0a0c069f13e1de3731eaebde"/><dir name="Impl"><file name="IpnNotificationParser.php" hash="fcad418dc58a93e87b854e4067f1e24d"/><file name="Message.php" hash="2ab8cb01bd97ceaeaae0df2bf93ddbf5"/><file name="OpenSslVerifySignature.php" hash="427e2e171daab9ef454ca4ce939edd68"/><file name="SnsMessageParser.php" hash="6a1088096d27a3cdc586e4c298ddf068"/><file name="SnsMessageValidator.php" hash="076f63d5960e4c72a3dc63a76e75316c"/><file name="VerifySignature.php" hash="b18edb328fbe91c1c7b0aa8afe2904d0"/><file name="XmlNotificationParser.php" hash="4881b7d021a86215e43798497bceea24"/></dir><file name="Interface.php" hash="effe919508aab0c2aa1e585d2783c4e6"/><file name="InvalidMessageException.php" hash="2edda9cd6cc0c059846c4858cedfcd66"/><dir name="Model"><file name="AuthorizationDetails.php" hash="843711e02fb56fffcdfb6afcf097e373"/><file name="AuthorizationNotification.php" hash="b00c64bd48ae3bd3c3fa6d991e4b9f5c"/><file name="BillingAgreement.php" hash="677eadcbc4c91282eab548afc6482fdc"/><file name="BillingAgreementLimits.php" hash="a1bd8e8ec111f516528e09340c47de4a"/><file name="BillingAgreementNotification.php" hash="e39a3189bdc937b29b8488e0ef62b562"/><file name="BillingAgreementStatus.php" hash="fae14e95f03245fe6c53e7c7b725c5ca"/><file name="CaptureDetails.php" hash="adb45ebf66daa15990e032025a420e1b"/><file name="CaptureNotification.php" hash="14c2bdc8f6bd6ce881f4403d1f08c6ef"/><file name="IdList.php" hash="2907bdba4b5a534f535c026c40e6d6cc"/><file name="IpnNotificationMetadata.php" hash="58674fca7aa30eea82cb4cba17dec04e"/><file name="MerchantRegistrationDetails.php" hash="37ecb29de3d2d98fbe6f6c8c23f670a2"/><file name="NotificationImpl.php" hash="bfd2e22da29de6dfa15c82a19240132a"/><file name="NotificationMetadataImpl.php" hash="b297f69b967338d433ff90054e06da4b"/><file name="OrderItemCategories.php" hash="a0655ec5a9127ddbd51174ef9e046c5d"/><file name="OrderReference.php" hash="94b51567b72f62355d885e37e365a032"/><file name="OrderReferenceNotification.php" hash="8e6e3a67bf0ae55e86bd718ceca20e0e"/><file name="OrderReferenceStatus.php" hash="e29870a166b75c6d90955a08e0dfe048"/><file name="OrderTotal.php" hash="4141b92ed1bdeb9cfa4c13837df41221"/><file name="Price.php" hash="d94b947bb989fb974e076f2727a0dceb"/><file name="ProviderCreditDetails.php" hash="bf29c9938744effcd759cd95b8a7beab"/><file name="ProviderCreditNotification.php" hash="14b3d8a09ee0feb53cfb701e93e3180e"/><file name="ProviderCreditReversalDetails.php" hash="e9980476af6da3f09de6faff86220f85"/><file name="ProviderCreditReversalNotification.php" hash="bfff2d0e347b1f1dd9e96b0612c87b46"/><file name="ProviderCreditReversalSummary.php" hash="1e69dc1cde4ffac600f89487930cc38c"/><file name="ProviderCreditReversalSummaryList.php" hash="b4b7edc94d7dad37221ca1da5f0969f9"/><file name="ProviderCreditSummary.php" hash="946e787472dc1ee7c9dbcb5d29d62af2"/><file name="ProviderCreditSummaryList.php" hash="fad79864ec1797eed4412d9463c0d02c"/><file name="RefundDetails.php" hash="e0c9fd8c1a921097b4c7e6eb71c20f47"/><file name="RefundNotification.php" hash="28f003801abeb45e0978df05068d73da"/><file name="SellerBillingAgreementAttributes.php" hash="79572632ec2c776fb6a7e96554d7291a"/><file name="SellerOrderAttributes.php" hash="aa6f71cb667d2efb50cc336603b6029c"/><file name="SnsNotificationMetadata.php" hash="835ebe9f84b23e6d59e3f7e2101df531"/><file name="SolutionProviderMerchantNotification.php" hash="91b02852ed507b91e70907e5db488f6f"/><file name="SolutionProviderOption.php" hash="33eca51f6789687e5472cded23be5328"/><file name="SolutionProviderOptions.php" hash="806d915cdd1bd0be5c0e92a3040d49aa"/><file name="Status.php" hash="60765642cca51b523276421d995be784"/></dir><file name="Notification.php" hash="edaf311309c64b67a4fd82ccb86393a3"/><file name="NotificationMetadata.php" hash="9ffe2779593da053e82587dbb61da7d1"/></dir><dir name="OffAmazonPaymentsService"><file name="Client.php" hash="2b5807dda8510506c32adda6686f19e8"/><file name="Environments.php" hash="d84e7322b3394033b427f91be0a0abdb"/><file name="Exception.php" hash="dd85e54cfa5783c7ef7b1f93ca3995b2"/><file name="Interface.php" hash="ca1693109051f319740e4cd7e8ed4de7"/><file name="MerchantValues.php" hash="adb10859cd24d7ab62fecb3c0b67b90d"/><dir name="Model"><file name="Address.php" hash="3b3c00f4b50a4a6f42da15701343ce91"/><file name="AuthorizationDetails.php" hash="77aa03389903c2f777930d838d396da5"/><file name="AuthorizeOnBillingAgreementRequest.php" hash="fcb797660fa5c9cde02c4d482ec69f79"/><file name="AuthorizeOnBillingAgreementResponse.php" hash="c641d4e41db304d6f8f4136ea5d2f500"/><file name="AuthorizeOnBillingAgreementResult.php" hash="7b10d0dc68e7cbf18681abb4e600cca4"/><file name="AuthorizeRequest.php" hash="e7944fb6372becb0c3dd022bb30a9140"/><file name="AuthorizeResponse.php" hash="fb396a94285cacc3eb0fb798a0895466"/><file name="AuthorizeResult.php" hash="0c8f0581538ebba22a5dac5287c0fcc9"/><file name="BillingAddress.php" hash="bef3c0a443ba48ad19d832b91e8740b9"/><file name="BillingAgreementAttributes.php" hash="fe9c760e12c3db71125412ada5a65ec2"/><file name="BillingAgreementDetails.php" hash="0fef2badb342c32a01c44389bcfb52bc"/><file name="BillingAgreementLimits.php" hash="974d1252d7b914169203acdfa6e7082b"/><file name="BillingAgreementStatus.php" hash="002b0516c52264ea95847ea840d68545"/><file name="Buyer.php" hash="83759bcb729cdd8718cdb80182d9a237"/><file name="CancelOrderReferenceRequest.php" hash="86a2753aac94ae645fda1117cf90a926"/><file name="CancelOrderReferenceResponse.php" hash="4d6bc1d4818d81fd5b5820510b608275"/><file name="CancelOrderReferenceResult.php" hash="32013170a09bccf0aac178a7acb56a30"/><file name="CaptureDetails.php" hash="9ca070a0a890be4ec84d7a7264b33800"/><file name="CaptureRequest.php" hash="436da55de37deb4227a685167eb4eaa3"/><file name="CaptureResponse.php" hash="05540d55de14a3252f909fd17c8b62b6"/><file name="CaptureResult.php" hash="20e0bc168c13eb69848f09b520232eeb"/><file name="CloseAuthorizationRequest.php" hash="92d56fd8a0ae338213fdd4f8a5d1b5fc"/><file name="CloseAuthorizationResponse.php" hash="d5887ecf3981534842a9a2371ae063f0"/><file name="CloseAuthorizationResult.php" hash="0505c8c12f3b5252ad389c0c5b94ca8d"/><file name="CloseBillingAgreementRequest.php" hash="c845cdde3cde3242d4c40b1381e0ab2f"/><file name="CloseBillingAgreementResponse.php" hash="51530b8a5d14896488dbf82d6b5a37dc"/><file name="CloseBillingAgreementResult.php" hash="21cb77e2fa38defbc076263c71593168"/><file name="CloseOrderReferenceRequest.php" hash="85ae367281cb4d59f5d347be8bf0147d"/><file name="CloseOrderReferenceResponse.php" hash="d06107418145176a4038f2b0937fd9d7"/><file name="CloseOrderReferenceResult.php" hash="17bc6d72eb29b021fad7d8a222f366dc"/><file name="ConfirmBillingAgreementRequest.php" hash="965b88fe77576f07ce439bc4909e5723"/><file name="ConfirmBillingAgreementResponse.php" hash="989a66f5c217ad50a2a36afd00c763f1"/><file name="ConfirmBillingAgreementResult.php" hash="f0acdd5b7e2e1027bec651e6a6f4681d"/><file name="ConfirmOrderReferenceRequest.php" hash="8561edc4d074fd376e647bd0cdf9a686"/><file name="ConfirmOrderReferenceResponse.php" hash="b94a17b5afd4d923bda35d606c974982"/><file name="Constraint.php" hash="436ed3c926e321bcc9d9c6eaf9b4003a"/><file name="Constraints.php" hash="0063db27ee04067daf94c448f57d5c30"/><file name="CreateOrderReferenceForIdRequest.php" hash="b1c22ce6d83e510d0b9530c99b955711"/><file name="CreateOrderReferenceForIdResponse.php" hash="c811a7c44241a8b968bf4408218ac08f"/><file name="CreateOrderReferenceForIdResult.php" hash="f532299b151a1c4fe4264891737efeaf"/><file name="Destination.php" hash="4e6067e4a3b5f9acb3b9c96452b216fe"/><file name="Error.php" hash="56651e2c89e0214a3c4226903ca84d87"/><file name="ErrorResponse.php" hash="6df06e3cca71a1e73dbcde4bc6b30a3f"/><file name="GetAuthorizationDetailsRequest.php" hash="a0eb816954b6770a7fd8d54d0d75bc1a"/><file name="GetAuthorizationDetailsResponse.php" hash="82b879ccc0212f0752446b40d5338332"/><file name="GetAuthorizationDetailsResult.php" hash="a23e9463ce78b01cc51c45c21b065b6e"/><file name="GetBillingAgreementDetailsRequest.php" hash="91f33b1b1533cc4e98a019ce2c405850"/><file name="GetBillingAgreementDetailsResponse.php" hash="3abcae092618211ae5487f678a45c94f"/><file name="GetBillingAgreementDetailsResult.php" hash="37dc2407a2e9e8dd3e7feae1f690d160"/><file name="GetCaptureDetailsRequest.php" hash="48a9edebb0c7c8284241ac12b53e2d41"/><file name="GetCaptureDetailsResponse.php" hash="49cb6ae36cfba0aedef3c74c24256d53"/><file name="GetCaptureDetailsResult.php" hash="9110dbde9258a74d9933f8a50d10bd3b"/><file name="GetOrderReferenceDetailsRequest.php" hash="b1704b0e1e1f98778501792b82403c50"/><file name="GetOrderReferenceDetailsResponse.php" hash="3ea19407068d478f6c2b077bf8489a74"/><file name="GetOrderReferenceDetailsResult.php" hash="51bc2cd9a665edfb00cec970fc1fd328"/><file name="GetProviderCreditDetailsRequest.php" hash="2ff598dcc690c90b36727351f95bc76a"/><file name="GetProviderCreditDetailsResponse.php" hash="7ec3943a5c7fb0890d1304ccf52cb7d3"/><file name="GetProviderCreditDetailsResult.php" hash="a9033131b919f4f79b1000268892e64b"/><file name="GetProviderCreditReversalDetailsRequest.php" hash="5502cdd97afce7c42d177706cdcb7d0b"/><file name="GetProviderCreditReversalDetailsResponse.php" hash="19d4d9337646583f4a69776965a9f193"/><file name="GetProviderCreditReversalDetailsResult.php" hash="bb56c2f2ec45144234d7534352fe35c4"/><file name="GetRefundDetailsRequest.php" hash="c798b0b57c53e22d20e7e4a92d9eb225"/><file name="GetRefundDetailsResponse.php" hash="c1011e3b07e32792c4ac8ceabab3bc6b"/><file name="GetRefundDetailsResult.php" hash="463db01fb3a45adf9634116f3397f8a7"/><file name="IdList.php" hash="07daf191c601560ddfe50440f9006450"/><file name="OrderItemCategories.php" hash="2820e45ffb6cb36a14368a1dfe89fa84"/><file name="OrderReferenceAttributes.php" hash="990daffb0857fca0c05292ae2fb465cf"/><file name="OrderReferenceDetails.php" hash="2c75125691a884aa8bdc40318bce3b06"/><file name="OrderReferenceStatus.php" hash="04459e930111cf70c989196440f6400f"/><file name="OrderTotal.php" hash="6fda4ce95b066f960eebe41731717925"/><file name="ParentDetails.php" hash="1c6738a58079ffdaaef6e3d5e6afff01"/><file name="Price.php" hash="ea1d5a6e473542f5b0cb8ed1e70436bd"/><file name="ProviderCredit.php" hash="9834503bcc2f619b38157400984377e4"/><file name="ProviderCreditDetails.php" hash="a74f8e42aacd945989e6c5513d808fb3"/><file name="ProviderCreditList.php" hash="1c90c2d71fd33e9b059503b0b0815b53"/><file name="ProviderCreditReversal.php" hash="37aa96053d61a290d98d595d3c3c9226"/><file name="ProviderCreditReversalDetails.php" hash="7585eab585360dcabe7acb0e616f3afb"/><file name="ProviderCreditReversalList.php" hash="e30c2373f4a708443e7dde8f75e1d794"/><file name="ProviderCreditReversalSummary.php" hash="03b0b5aefae44ea5dcac06a4322e57cd"/><file name="ProviderCreditReversalSummaryList.php" hash="23a82515eb4d9f288dbc97691fef9153"/><file name="ProviderCreditSummary.php" hash="530091cb8d5e103ca3e44a0a3384eff2"/><file name="ProviderCreditSummaryList.php" hash="23115d04c6987208d7ba307781e433a5"/><file name="RefundDetails.php" hash="01866f818651ad6c0a7bc12d3c7e6644"/><file name="RefundRequest.php" hash="22b14eadcf9679a92c4325225dbf8c39"/><file name="RefundResponse.php" hash="b01d5c4c81a040bca2e1109e5d34b3e9"/><file name="RefundResult.php" hash="8f2478b1f27a295bff8f30664fd45235"/><file name="ResponseHeaderMetadata.php" hash="d8024e3bf444e8a843a6f2f6a2f836ca"/><file name="ResponseMetadata.php" hash="18e8035d5fc28d2919c1500b9f8734c5"/><file name="ReverseProviderCreditRequest.php" hash="d1b710b8911346ee0437de4e6178ac8e"/><file name="ReverseProviderCreditResponse.php" hash="38c6958d2ceb9ee244e86adee3c55acf"/><file name="ReverseProviderCreditResult.php" hash="313db1523bd575da7ab1fd956866a15d"/><file name="SellerBillingAgreementAttributes.php" hash="b4dc6401ae4340df3c484c00622d234f"/><file name="SellerOrderAttributes.php" hash="9ec79bc1be30eb322d7e88c4102a4ced"/><file name="SetBillingAgreementDetailsRequest.php" hash="9b47c3c72825fe661948aa36a2947da2"/><file name="SetBillingAgreementDetailsResponse.php" hash="7b6886f3597c434e585fb576d84fd9eb"/><file name="SetBillingAgreementDetailsResult.php" hash="d03a4c84cb96eb30f7ef5c76f981d086"/><file name="SetOrderReferenceDetailsRequest.php" hash="eed7e3485bc27f9f73cf7b67a893a1fa"/><file name="SetOrderReferenceDetailsResponse.php" hash="145bdfcfbf3bb091e0eada1361d6f581"/><file name="SetOrderReferenceDetailsResult.php" hash="246c06e0c62ee6a6ec0cfe504940c12d"/><file name="Status.php" hash="11c00f2cc32b11d4cfb8541d5ba2c279"/><file name="ValidateBillingAgreementRequest.php" hash="60250e9c62eaffa0a841bce7238ace22"/><file name="ValidateBillingAgreementResponse.php" hash="c77eebf5805b5972de84a814b3872cc7"/><file name="ValidateBillingAgreementResult.php" hash="95d4e8efc88317a097e376a4aa37a287"/></dir><file name="Model.php" hash="1147a05809ff0cc5f115bb213e38cf02"/><file name="OffAmazonPaymentsService.config.inc.php" hash="20807040ef4565a6b78f09cda6529a34"/><file name="RegionSpecificProperties.php" hash="b18f449745ebbbde5eae769eaf89ade1"/><file name="Regions.php" hash="a544d12c6321899770c039426e063cce"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="amazon_payments.xml" hash="86dc7900219559e892ffc0728e8bb136"/></dir><dir name="template"><dir name="amazon_payments"><file name="notifications.phtml" hash="b1d84206d51f9b35fb777ec439acf7d0"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="amazon_login.xml" hash="8a64187752279fe95b7d46052b032f08"/><file name="amazon_payments.xml" hash="31e925986c996b632e296e22041d3110"/></dir><dir name="template"><dir name="amazon_login"><file name="button.phtml" hash="f480e98b14c76a712f71a9f396dec198"/><file name="script.phtml" hash="d88a072633c10bc92aa43e2b23632ae1"/><file name="script_authorize.phtml" hash="b48b1dd8bd8c2f79e3656f16d522f388"/><file name="verify.phtml" hash="bdc80396ca2a7f096ac334f97b402a0a"/></dir><dir name="amazon_payments"><file name="button.phtml" hash="e799a97c3f971e10d4f6d6a0ca025d6a"/><file name="button_shortcut.phtml" hash="08609929765e01f759d5259727d9dbe1"/><file name="cart.phtml" hash="20375f05aabc98f1384f1d7bf74750fc"/><file name="checkout.phtml" hash="593f30542ea341a16bc9da81f260f19d"/><file name="form.phtml" hash="89a25b97ef4c07ac14a6770dab173873"/><dir name="onepage"><file name="button.phtml" hash="a30ed2b190c5a04c2a66a1bad8be6dcd"/><file name="login.phtml" hash="7147910e6940014ee96694150d3a0e99"/><file name="login_cancel.phtml" hash="ef82f978828a3f81bb9b6c525c5874e1"/><dir name="progress"><file name="widget.phtml" hash="cc26b9857c9f95f5a239e0adb94f6c3e"/></dir><file name="widget.phtml" hash="4430f59a4c4a74c9f4557d9336c13799"/></dir><file name="script.phtml" hash="d70b2bcfd1382011bca75e5459b4db70"/><file name="shipping_method.phtml" hash="b8ab8fcb1a91d7646e0f53d0997c231f"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="amazon_payments"><dir name="css"><file name="popup_alphacube.css" hash="bef655ef0df54d92bd06cec2b2c1a202"/><file name="styles_checkout.css" hash="6e94fbcc2b12ef11531ced9600337122"/><file name="styles_onepage.css" hash="8c0889b17279ccfb2e7cbd018c3b554c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amazon_Login.xml" hash="d8a59c5f864353ed00225b56d4567e19"/><file name="Amazon_Payments.xml" hash="524c5cecde418e14ed6e44c16fd8bae6"/></dir></target></contents>
58
  <compatible/>
59
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php></required></dependencies>
60
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>login_and_pay_for_magento</name>
4
+ <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, Version 2.0</license>
7
  <channel>community</channel>
31
  Keep your customers secure! Leverage the same user authentication system used on Amazon.com.&lt;/p&gt;&#xD;
32
  &#xD;
33
  </description>
34
+ <notes>v1.2.0 Release&#xD;
35
+ Login and Pay for Magento now support asynchronous authorizations!&#xD;
36
+ -In the admin configuration, you enable Asynchronous mode by setting the 'Asynchronous Mode' to 'Yes' Now when buyers checkout, the call is asynchronous and the state returned from any Authorize call is 'Pending'&#xD;
37
+ -The system uses Magento's built-in cron job functionality to poll Amazon systems for the status of any Open orders. See http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cro n_job for more information.&#xD;
38
+ -NOTE Orders will never update to their correct status if you do not have cron enabled as specified in the Magento documentation.&#xD;
39
+ --The polling interval is 5 minutes and when the cron job executes, it will get the new status, update the order in Magento appropriately to your configured 'New Order Status' and, if Authorize and Capture is configured, create the Invoice in Magento.&#xD;
40
+ -When should you use async vs sync?&#xD;
41
+ --You should use async when you have large average order values, on the order of &gt; $500-$1000&#xD;
42
+ --You might also consider using async to speed up checkout since the authorizations come back&#xD;
43
+ immediately with a 'Pending' status.&#xD;
44
+ --Only merchants who have an existing workflow for reaching out to customer's whose payment method was declined should use the asynchronous model.&#xD;
45
+ Other Features&#xD;
46
+ -Developer client restrictions&#xD;
47
+ --#78 Implement Developer Client Restrictions&#xD;
48
+ -Sort order variable&#xD;
49
+ --#75 Fire/Onestep/IWD : Add sort order variable that determines where Amazon Payments shows up in list&#xD;
50
+ -Works with iwd onepage checkout/firecheckout&#xD;
51
+ --#77 Fire/Onestep/IWD : Amazon address pulled into form when buyer bails out of Amazon flow&#xD;
52
+ --#74 Fire/Onestep/IWD : Launch amazon checkout (login) on radio button select&#xD;
53
+ &#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xFFFC;&#xD;
54
+ Bug Fixes&#xD;
55
+ --#88 Standalone Checkout with Modal: Content blocked when account verification required&#xD;
56
+ --#85 PaymentPlanNotSet exception when invalid payment method.&#xD;
57
+ --#83 CE v1.5 missing core public method lookupTransaction&#xD;
58
+ --#82 Orders break when plugin disabled.&#xD;
59
+ --#81 Display as Payment Option setting is not respected in Onestepcheckout&#xD;
60
+ --#80 Use CSS !Important for Place Order Button&#xD;
61
+ See https://github.com/amzn/amazon-payments-magento-plugin/issues?q=is%3Aissue+is%3Aclosed for more information&#xD;
62
+ </notes>
63
  <authors><author><name>Amazon Payments</name><user>payments-cp-devel</user><email>payments-cp-devel@amazon.com</email></author></authors>
64
+ <date>2014-11-24</date>
65
+ <time>21:01:52</time>
66
+ <contents><target name="magecommunity"><dir name="Amazon"><dir name="Login"><dir name="Block"><file name="Button.php" hash="6522fd3c81a5959c75979b8d17a62000"/><file name="Script.php" hash="40c4cca328e24521e3562f1466251c55"/><file name="Verify.php" hash="7345e0c12f6f558029dfbea647441e81"/></dir><dir name="Helper"><file name="Data.php" hash="ae6797f0228b6cada765368d661d6bf6"/></dir><dir name="Model"><file name="Api.php" hash="48a3f6306d97f31fa4c3b954a665f334"/><file name="Customer.php" hash="e6dc82ee00ae5aac40c443a3c3627997"/><file name="Login.php" hash="81a09b4f2c0c62e874ad209ef78ef462"/><dir name="Resource"><file name="Login.php" hash="cea5ac352d61cace9965f1cb940a7272"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enabled.php" hash="94bc7fde24ab2ee54ed15bbe7084f118"/><file name="Popupcomment.php" hash="ebcfc96661affbbe5de8ab4d4fc9d4bb"/></dir><dir name="Source"><file name="Buttoncolor.php" hash="ac335e432cd8e47c9ca4be601c706072"/><file name="Buttonsize.php" hash="76ef1db11834db449a7d52c34f3668d8"/><file name="Buttontype.php" hash="5e333d6cb1d70d0227766d78e390530b"/></dir></dir></dir></dir><dir name="controllers"><file name="CustomerController.php" hash="d326a02cb53c18bb78f988adb94a6478"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0aa18eecfebd3e0bb1d84cd6b1040f50"/><file name="config.xml" hash="5f320a09ff6ab1d1799b43b6ddaa3d51"/><file name="system.xml" hash="cc00b85cef386caf51e2cfa729183091"/></dir><dir name="sql"><dir name="login_setup"><file name="install-0.1.0.php" hash="690c4c33f4c5221185c0589e3add63b3"/></dir></dir></dir><dir name="Payments"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="793824c5014d1269f0aee1a795e948b9"/></dir><file name="Button.php" hash="72e72541893f0cd50f25163b9e265f79"/><file name="Checkout.php" hash="532f647be6bd8ed047ae72d380461b7a"/><file name="Form.php" hash="99202f27e0ac21ba8cd2e003fb0a49cd"/><file name="Link.php" hash="47c237fe4604333b2080588c5498a865"/><dir name="Onepage"><file name="Progress.php" hash="ab5ba2e80b849d77f81f10d64e0a141c"/><file name="Widget.php" hash="f10bb86d3e7e5a88dfdfa4e645a61086"/></dir><file name="Onepage.php" hash="1d865069483bbe776f511119e0e2252b"/><dir name="Review"><file name="Info.php" hash="8d3688c55137971b18aec41272cf13a6"/></dir><file name="Review.php" hash="d9cf9b6ef7d6f063a06e006e01f09513"/></dir><dir name="Controller"><file name="Checkout.php" hash="898f925b89e5230bb72962bdd8bda0e3"/></dir><dir name="Helper"><file name="Data.php" hash="b8a91e228801ed8adbbffc003e6847f3"/></dir><dir name="Model"><file name="Api.php" hash="26b029f9330e4ab6a2ee78891a8c32f1"/><file name="Async.php" hash="970cd100ee74456302b33eba658ffc66"/><file name="Config.php" hash="b041641452ecd4552e56a0d6859407a1"/><dir name="Observer"><file name="Action.php" hash="d38e500e635b4531ef71f08e92375f34"/><file name="Adminhtml.php" hash="54596e530f3cd3365b8c61313827c0b6"/><file name="Onepage.php" hash="683d31f08d4304f0d377da72ec49cf0b"/><file name="Order.php" hash="783f2f46726c4db21f5e5d2b47a9b25d"/></dir><dir name="Order"><file name="Creditmemo.php" hash="6732791d2839272564cf27ecda80707c"/></dir><file name="PaymentMethod.php" hash="af04f62f166b614b2dd5ac37bd71306f"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Clientid.php" hash="4512003bcffedf26bc2fe415b91b1be7"/><file name="Clientsecret.php" hash="d2d5f275e4275676e3f494da704e41da"/><file name="Enabled.php" hash="ac17bd3379ddf8d83013497088af85c5"/></dir><dir name="Source"><file name="Buttoncolor.php" hash="2564780faa369e54339bded78a882636"/><file name="Buttonsize.php" hash="7f740927b5a58a3ea15d07ac4cfbed28"/><file name="Buttontype.php" hash="735083e4848fa2258b95670b1a546843"/><file name="Checkoutpage.php" hash="2969f9eaa9d87571e0fa8f005e2cdeaf"/><file name="Paymentaction.php" hash="4dba1ce3518538d1a5add743d65c8695"/><file name="Region.php" hash="0718cf97d03a8c56c73fb7ea3a103bc5"/></dir></dir></dir><dir name="Type"><file name="Checkout.php" hash="5465e73384c60df94c9243bb09262dff"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Amazon"><file name="PaymentsController.php" hash="21442b140d7a8a5350019925e750290b"/></dir></dir><file name="CheckoutController.php" hash="6d005be14745219d5f7d28d4c6f51a4b"/><file name="IndexController.php" hash="128f218a9e1bf4af4f7b380f14d87a52"/><file name="OnepageController.php" hash="cc03d109ee1cf98f85aba606f5a44654"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3c56d63f30e0e5cc8c22d3686046631b"/><file name="config.xml" hash="49ca891c4d4c09d8a4afa76d24b6b47a"/><file name="system.xml" hash="55bf4bfdfae0de4fa2d442fe36d801ba"/></dir><dir name="sql"><dir name="payments_setup"><file name="install-0.1.0.php" hash="658f9d8c8634b3158cee7b59866e6f39"/></dir></dir></dir></dir></target><target name="magelib"><dir name="OffAmazonPayments"><file name="Model.php" hash="a608217f17166ba11901f5334ad445de"/><file name=".autoloader.php" hash="193fddab8b5ca74646bb78243c0c7dda"/></dir><dir name="OffAmazonPaymentsNotifications"><file name="Client.php" hash="0ab53a8a0a0c069f13e1de3731eaebde"/><dir name="Impl"><file name="IpnNotificationParser.php" hash="fcad418dc58a93e87b854e4067f1e24d"/><file name="Message.php" hash="2ab8cb01bd97ceaeaae0df2bf93ddbf5"/><file name="OpenSslVerifySignature.php" hash="427e2e171daab9ef454ca4ce939edd68"/><file name="SnsMessageParser.php" hash="6a1088096d27a3cdc586e4c298ddf068"/><file name="SnsMessageValidator.php" hash="076f63d5960e4c72a3dc63a76e75316c"/><file name="VerifySignature.php" hash="b18edb328fbe91c1c7b0aa8afe2904d0"/><file name="XmlNotificationParser.php" hash="4881b7d021a86215e43798497bceea24"/></dir><file name="Interface.php" hash="effe919508aab0c2aa1e585d2783c4e6"/><file name="InvalidMessageException.php" hash="2edda9cd6cc0c059846c4858cedfcd66"/><dir name="Model"><file name="AuthorizationDetails.php" hash="843711e02fb56fffcdfb6afcf097e373"/><file name="AuthorizationNotification.php" hash="b00c64bd48ae3bd3c3fa6d991e4b9f5c"/><file name="BillingAgreement.php" hash="677eadcbc4c91282eab548afc6482fdc"/><file name="BillingAgreementLimits.php" hash="a1bd8e8ec111f516528e09340c47de4a"/><file name="BillingAgreementNotification.php" hash="e39a3189bdc937b29b8488e0ef62b562"/><file name="BillingAgreementStatus.php" hash="fae14e95f03245fe6c53e7c7b725c5ca"/><file name="CaptureDetails.php" hash="adb45ebf66daa15990e032025a420e1b"/><file name="CaptureNotification.php" hash="14c2bdc8f6bd6ce881f4403d1f08c6ef"/><file name="IdList.php" hash="2907bdba4b5a534f535c026c40e6d6cc"/><file name="IpnNotificationMetadata.php" hash="58674fca7aa30eea82cb4cba17dec04e"/><file name="MerchantRegistrationDetails.php" hash="37ecb29de3d2d98fbe6f6c8c23f670a2"/><file name="NotificationImpl.php" hash="bfd2e22da29de6dfa15c82a19240132a"/><file name="NotificationMetadataImpl.php" hash="b297f69b967338d433ff90054e06da4b"/><file name="OrderItemCategories.php" hash="a0655ec5a9127ddbd51174ef9e046c5d"/><file name="OrderReference.php" hash="94b51567b72f62355d885e37e365a032"/><file name="OrderReferenceNotification.php" hash="8e6e3a67bf0ae55e86bd718ceca20e0e"/><file name="OrderReferenceStatus.php" hash="e29870a166b75c6d90955a08e0dfe048"/><file name="OrderTotal.php" hash="4141b92ed1bdeb9cfa4c13837df41221"/><file name="Price.php" hash="d94b947bb989fb974e076f2727a0dceb"/><file name="ProviderCreditDetails.php" hash="bf29c9938744effcd759cd95b8a7beab"/><file name="ProviderCreditNotification.php" hash="14b3d8a09ee0feb53cfb701e93e3180e"/><file name="ProviderCreditReversalDetails.php" hash="e9980476af6da3f09de6faff86220f85"/><file name="ProviderCreditReversalNotification.php" hash="bfff2d0e347b1f1dd9e96b0612c87b46"/><file name="ProviderCreditReversalSummary.php" hash="1e69dc1cde4ffac600f89487930cc38c"/><file name="ProviderCreditReversalSummaryList.php" hash="b4b7edc94d7dad37221ca1da5f0969f9"/><file name="ProviderCreditSummary.php" hash="946e787472dc1ee7c9dbcb5d29d62af2"/><file name="ProviderCreditSummaryList.php" hash="fad79864ec1797eed4412d9463c0d02c"/><file name="RefundDetails.php" hash="e0c9fd8c1a921097b4c7e6eb71c20f47"/><file name="RefundNotification.php" hash="28f003801abeb45e0978df05068d73da"/><file name="SellerBillingAgreementAttributes.php" hash="79572632ec2c776fb6a7e96554d7291a"/><file name="SellerOrderAttributes.php" hash="aa6f71cb667d2efb50cc336603b6029c"/><file name="SnsNotificationMetadata.php" hash="835ebe9f84b23e6d59e3f7e2101df531"/><file name="SolutionProviderMerchantNotification.php" hash="91b02852ed507b91e70907e5db488f6f"/><file name="SolutionProviderOption.php" hash="33eca51f6789687e5472cded23be5328"/><file name="SolutionProviderOptions.php" hash="806d915cdd1bd0be5c0e92a3040d49aa"/><file name="Status.php" hash="60765642cca51b523276421d995be784"/></dir><file name="Notification.php" hash="edaf311309c64b67a4fd82ccb86393a3"/><file name="NotificationMetadata.php" hash="9ffe2779593da053e82587dbb61da7d1"/></dir><dir name="OffAmazonPaymentsService"><file name="Client.php" hash="2b5807dda8510506c32adda6686f19e8"/><file name="Environments.php" hash="d84e7322b3394033b427f91be0a0abdb"/><file name="Exception.php" hash="dd85e54cfa5783c7ef7b1f93ca3995b2"/><file name="Interface.php" hash="ca1693109051f319740e4cd7e8ed4de7"/><file name="MerchantValues.php" hash="adb10859cd24d7ab62fecb3c0b67b90d"/><dir name="Model"><file name="Address.php" hash="3b3c00f4b50a4a6f42da15701343ce91"/><file name="AuthorizationDetails.php" hash="77aa03389903c2f777930d838d396da5"/><file name="AuthorizeOnBillingAgreementRequest.php" hash="fcb797660fa5c9cde02c4d482ec69f79"/><file name="AuthorizeOnBillingAgreementResponse.php" hash="c641d4e41db304d6f8f4136ea5d2f500"/><file name="AuthorizeOnBillingAgreementResult.php" hash="7b10d0dc68e7cbf18681abb4e600cca4"/><file name="AuthorizeRequest.php" hash="e7944fb6372becb0c3dd022bb30a9140"/><file name="AuthorizeResponse.php" hash="fb396a94285cacc3eb0fb798a0895466"/><file name="AuthorizeResult.php" hash="0c8f0581538ebba22a5dac5287c0fcc9"/><file name="BillingAddress.php" hash="bef3c0a443ba48ad19d832b91e8740b9"/><file name="BillingAgreementAttributes.php" hash="fe9c760e12c3db71125412ada5a65ec2"/><file name="BillingAgreementDetails.php" hash="0fef2badb342c32a01c44389bcfb52bc"/><file name="BillingAgreementLimits.php" hash="974d1252d7b914169203acdfa6e7082b"/><file name="BillingAgreementStatus.php" hash="002b0516c52264ea95847ea840d68545"/><file name="Buyer.php" hash="83759bcb729cdd8718cdb80182d9a237"/><file name="CancelOrderReferenceRequest.php" hash="86a2753aac94ae645fda1117cf90a926"/><file name="CancelOrderReferenceResponse.php" hash="4d6bc1d4818d81fd5b5820510b608275"/><file name="CancelOrderReferenceResult.php" hash="32013170a09bccf0aac178a7acb56a30"/><file name="CaptureDetails.php" hash="9ca070a0a890be4ec84d7a7264b33800"/><file name="CaptureRequest.php" hash="436da55de37deb4227a685167eb4eaa3"/><file name="CaptureResponse.php" hash="05540d55de14a3252f909fd17c8b62b6"/><file name="CaptureResult.php" hash="20e0bc168c13eb69848f09b520232eeb"/><file name="CloseAuthorizationRequest.php" hash="92d56fd8a0ae338213fdd4f8a5d1b5fc"/><file name="CloseAuthorizationResponse.php" hash="d5887ecf3981534842a9a2371ae063f0"/><file name="CloseAuthorizationResult.php" hash="0505c8c12f3b5252ad389c0c5b94ca8d"/><file name="CloseBillingAgreementRequest.php" hash="c845cdde3cde3242d4c40b1381e0ab2f"/><file name="CloseBillingAgreementResponse.php" hash="51530b8a5d14896488dbf82d6b5a37dc"/><file name="CloseBillingAgreementResult.php" hash="21cb77e2fa38defbc076263c71593168"/><file name="CloseOrderReferenceRequest.php" hash="85ae367281cb4d59f5d347be8bf0147d"/><file name="CloseOrderReferenceResponse.php" hash="d06107418145176a4038f2b0937fd9d7"/><file name="CloseOrderReferenceResult.php" hash="17bc6d72eb29b021fad7d8a222f366dc"/><file name="ConfirmBillingAgreementRequest.php" hash="965b88fe77576f07ce439bc4909e5723"/><file name="ConfirmBillingAgreementResponse.php" hash="989a66f5c217ad50a2a36afd00c763f1"/><file name="ConfirmBillingAgreementResult.php" hash="f0acdd5b7e2e1027bec651e6a6f4681d"/><file name="ConfirmOrderReferenceRequest.php" hash="8561edc4d074fd376e647bd0cdf9a686"/><file name="ConfirmOrderReferenceResponse.php" hash="b94a17b5afd4d923bda35d606c974982"/><file name="Constraint.php" hash="436ed3c926e321bcc9d9c6eaf9b4003a"/><file name="Constraints.php" hash="0063db27ee04067daf94c448f57d5c30"/><file name="CreateOrderReferenceForIdRequest.php" hash="b1c22ce6d83e510d0b9530c99b955711"/><file name="CreateOrderReferenceForIdResponse.php" hash="c811a7c44241a8b968bf4408218ac08f"/><file name="CreateOrderReferenceForIdResult.php" hash="f532299b151a1c4fe4264891737efeaf"/><file name="Destination.php" hash="4e6067e4a3b5f9acb3b9c96452b216fe"/><file name="Error.php" hash="56651e2c89e0214a3c4226903ca84d87"/><file name="ErrorResponse.php" hash="6df06e3cca71a1e73dbcde4bc6b30a3f"/><file name="GetAuthorizationDetailsRequest.php" hash="a0eb816954b6770a7fd8d54d0d75bc1a"/><file name="GetAuthorizationDetailsResponse.php" hash="82b879ccc0212f0752446b40d5338332"/><file name="GetAuthorizationDetailsResult.php" hash="a23e9463ce78b01cc51c45c21b065b6e"/><file name="GetBillingAgreementDetailsRequest.php" hash="91f33b1b1533cc4e98a019ce2c405850"/><file name="GetBillingAgreementDetailsResponse.php" hash="3abcae092618211ae5487f678a45c94f"/><file name="GetBillingAgreementDetailsResult.php" hash="37dc2407a2e9e8dd3e7feae1f690d160"/><file name="GetCaptureDetailsRequest.php" hash="48a9edebb0c7c8284241ac12b53e2d41"/><file name="GetCaptureDetailsResponse.php" hash="49cb6ae36cfba0aedef3c74c24256d53"/><file name="GetCaptureDetailsResult.php" hash="9110dbde9258a74d9933f8a50d10bd3b"/><file name="GetOrderReferenceDetailsRequest.php" hash="b1704b0e1e1f98778501792b82403c50"/><file name="GetOrderReferenceDetailsResponse.php" hash="3ea19407068d478f6c2b077bf8489a74"/><file name="GetOrderReferenceDetailsResult.php" hash="51bc2cd9a665edfb00cec970fc1fd328"/><file name="GetProviderCreditDetailsRequest.php" hash="2ff598dcc690c90b36727351f95bc76a"/><file name="GetProviderCreditDetailsResponse.php" hash="7ec3943a5c7fb0890d1304ccf52cb7d3"/><file name="GetProviderCreditDetailsResult.php" hash="a9033131b919f4f79b1000268892e64b"/><file name="GetProviderCreditReversalDetailsRequest.php" hash="5502cdd97afce7c42d177706cdcb7d0b"/><file name="GetProviderCreditReversalDetailsResponse.php" hash="19d4d9337646583f4a69776965a9f193"/><file name="GetProviderCreditReversalDetailsResult.php" hash="bb56c2f2ec45144234d7534352fe35c4"/><file name="GetRefundDetailsRequest.php" hash="c798b0b57c53e22d20e7e4a92d9eb225"/><file name="GetRefundDetailsResponse.php" hash="c1011e3b07e32792c4ac8ceabab3bc6b"/><file name="GetRefundDetailsResult.php" hash="463db01fb3a45adf9634116f3397f8a7"/><file name="IdList.php" hash="07daf191c601560ddfe50440f9006450"/><file name="OrderItemCategories.php" hash="2820e45ffb6cb36a14368a1dfe89fa84"/><file name="OrderReferenceAttributes.php" hash="990daffb0857fca0c05292ae2fb465cf"/><file name="OrderReferenceDetails.php" hash="2c75125691a884aa8bdc40318bce3b06"/><file name="OrderReferenceStatus.php" hash="04459e930111cf70c989196440f6400f"/><file name="OrderTotal.php" hash="6fda4ce95b066f960eebe41731717925"/><file name="ParentDetails.php" hash="1c6738a58079ffdaaef6e3d5e6afff01"/><file name="Price.php" hash="ea1d5a6e473542f5b0cb8ed1e70436bd"/><file name="ProviderCredit.php" hash="9834503bcc2f619b38157400984377e4"/><file name="ProviderCreditDetails.php" hash="a74f8e42aacd945989e6c5513d808fb3"/><file name="ProviderCreditList.php" hash="1c90c2d71fd33e9b059503b0b0815b53"/><file name="ProviderCreditReversal.php" hash="37aa96053d61a290d98d595d3c3c9226"/><file name="ProviderCreditReversalDetails.php" hash="7585eab585360dcabe7acb0e616f3afb"/><file name="ProviderCreditReversalList.php" hash="e30c2373f4a708443e7dde8f75e1d794"/><file name="ProviderCreditReversalSummary.php" hash="03b0b5aefae44ea5dcac06a4322e57cd"/><file name="ProviderCreditReversalSummaryList.php" hash="23a82515eb4d9f288dbc97691fef9153"/><file name="ProviderCreditSummary.php" hash="530091cb8d5e103ca3e44a0a3384eff2"/><file name="ProviderCreditSummaryList.php" hash="23115d04c6987208d7ba307781e433a5"/><file name="RefundDetails.php" hash="01866f818651ad6c0a7bc12d3c7e6644"/><file name="RefundRequest.php" hash="22b14eadcf9679a92c4325225dbf8c39"/><file name="RefundResponse.php" hash="b01d5c4c81a040bca2e1109e5d34b3e9"/><file name="RefundResult.php" hash="8f2478b1f27a295bff8f30664fd45235"/><file name="ResponseHeaderMetadata.php" hash="d8024e3bf444e8a843a6f2f6a2f836ca"/><file name="ResponseMetadata.php" hash="18e8035d5fc28d2919c1500b9f8734c5"/><file name="ReverseProviderCreditRequest.php" hash="d1b710b8911346ee0437de4e6178ac8e"/><file name="ReverseProviderCreditResponse.php" hash="38c6958d2ceb9ee244e86adee3c55acf"/><file name="ReverseProviderCreditResult.php" hash="313db1523bd575da7ab1fd956866a15d"/><file name="SellerBillingAgreementAttributes.php" hash="b4dc6401ae4340df3c484c00622d234f"/><file name="SellerOrderAttributes.php" hash="9ec79bc1be30eb322d7e88c4102a4ced"/><file name="SetBillingAgreementDetailsRequest.php" hash="9b47c3c72825fe661948aa36a2947da2"/><file name="SetBillingAgreementDetailsResponse.php" hash="7b6886f3597c434e585fb576d84fd9eb"/><file name="SetBillingAgreementDetailsResult.php" hash="d03a4c84cb96eb30f7ef5c76f981d086"/><file name="SetOrderReferenceDetailsRequest.php" hash="eed7e3485bc27f9f73cf7b67a893a1fa"/><file name="SetOrderReferenceDetailsResponse.php" hash="145bdfcfbf3bb091e0eada1361d6f581"/><file name="SetOrderReferenceDetailsResult.php" hash="246c06e0c62ee6a6ec0cfe504940c12d"/><file name="Status.php" hash="11c00f2cc32b11d4cfb8541d5ba2c279"/><file name="ValidateBillingAgreementRequest.php" hash="60250e9c62eaffa0a841bce7238ace22"/><file name="ValidateBillingAgreementResponse.php" hash="c77eebf5805b5972de84a814b3872cc7"/><file name="ValidateBillingAgreementResult.php" hash="95d4e8efc88317a097e376a4aa37a287"/></dir><file name="Model.php" hash="1147a05809ff0cc5f115bb213e38cf02"/><file name="OffAmazonPaymentsService.config.inc.php" hash="20807040ef4565a6b78f09cda6529a34"/><file name="RegionSpecificProperties.php" hash="b18f449745ebbbde5eae769eaf89ade1"/><file name="Regions.php" hash="a544d12c6321899770c039426e063cce"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="amazon_payments.xml" hash="86dc7900219559e892ffc0728e8bb136"/></dir><dir name="template"><dir name="amazon_payments"><file name="notifications.phtml" hash="b94eb031ad1f207078fd705818641503"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="amazon_login.xml" hash="8a64187752279fe95b7d46052b032f08"/><file name="amazon_payments.xml" hash="31e925986c996b632e296e22041d3110"/></dir><dir name="template"><dir name="amazon_login"><file name="button.phtml" hash="f480e98b14c76a712f71a9f396dec198"/><file name="script.phtml" hash="d88a072633c10bc92aa43e2b23632ae1"/><file name="script_authorize.phtml" hash="b48b1dd8bd8c2f79e3656f16d522f388"/><file name="verify.phtml" hash="bdc80396ca2a7f096ac334f97b402a0a"/></dir><dir name="amazon_payments"><file name="button.phtml" hash="e799a97c3f971e10d4f6d6a0ca025d6a"/><file name="button_shortcut.phtml" hash="08609929765e01f759d5259727d9dbe1"/><file name="cart.phtml" hash="20375f05aabc98f1384f1d7bf74750fc"/><file name="checkout.phtml" hash="932b628c6a34d22d015a777b4f54d423"/><file name="form.phtml" hash="4cbc8e5d2d8c91fdb604c8f71b3cf51d"/><dir name="onepage"><file name="button.phtml" hash="a30ed2b190c5a04c2a66a1bad8be6dcd"/><file name="login.phtml" hash="7147910e6940014ee96694150d3a0e99"/><file name="login_cancel.phtml" hash="ef82f978828a3f81bb9b6c525c5874e1"/><dir name="progress"><file name="widget.phtml" hash="cc26b9857c9f95f5a239e0adb94f6c3e"/></dir><file name="widget.phtml" hash="4430f59a4c4a74c9f4557d9336c13799"/></dir><file name="script.phtml" hash="b298e7b8f164831eb8488ab84aab93eb"/><file name="shipping_method.phtml" hash="b8ab8fcb1a91d7646e0f53d0997c231f"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="amazon_payments"><dir name="css"><file name="popup_alphacube.css" hash="bef655ef0df54d92bd06cec2b2c1a202"/><file name="styles_checkout.css" hash="54b6cf8ea2957b247b668605dfc00d00"/><file name="styles_onepage.css" hash="8c0889b17279ccfb2e7cbd018c3b554c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amazon_Login.xml" hash="d8a59c5f864353ed00225b56d4567e19"/><file name="Amazon_Payments.xml" hash="524c5cecde418e14ed6e44c16fd8bae6"/></dir></target></contents>
67
  <compatible/>
68
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php></required></dependencies>
69
  </package>
skin/frontend/base/default/amazon_payments/css/styles_checkout.css CHANGED
@@ -50,8 +50,8 @@
50
  border-top:0;
51
  }
52
 
53
- .button.btn-checkout,
54
- .button.btn-checkout:hover {
55
  background: #efd57f; /* Old browsers */
56
  background: -moz-linear-gradient(top, #efd57f 0%, #e5b842 100%); /* FF3.6+ */
57
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efd57f), color-stop(100%,#e5b842)); /* Chrome,Safari4+ */
@@ -73,13 +73,13 @@
73
 
74
  }
75
 
76
- button.btn-checkout span {
77
  color:#4f3310;
78
  background:none;
79
  height:auto;
80
  padding:0;
81
  }
82
- button.btn-checkout span span {
83
  padding:0;
84
  }
85
 
50
  border-top:0;
51
  }
52
 
53
+ #checkout-amazon-payments .button.btn-checkout,
54
+ #checkout-amazon-payments .button.btn-checkout:hover {
55
  background: #efd57f; /* Old browsers */
56
  background: -moz-linear-gradient(top, #efd57f 0%, #e5b842 100%); /* FF3.6+ */
57
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efd57f), color-stop(100%,#e5b842)); /* Chrome,Safari4+ */
73
 
74
  }
75
 
76
+ #checkout-amazon-payments button.btn-checkout span {
77
  color:#4f3310;
78
  background:none;
79
  height:auto;
80
  padding:0;
81
  }
82
+ #checkout-amazon-payments button.btn-checkout span span {
83
  padding:0;
84
  }
85