Creativestyle_AmazonPayments - Version 1.2.2

Version Notes

ADDED: Login with Amazon feature
ADDED: Amazon Payments acount validation button
UPDATED: Amazon SDK librayr to 1.0.11
FIXED: payment cancelling issue in mutistore installations
FIXED: permanently disabled "Place Order" button issues
FIXED: clean orderReferendeId from the session data after successful order

Download this release

Release Info

Developer creativestyle GmbH
Extension Creativestyle_AmazonPayments
Version 1.2.2
Comparing to
See all releases


Code changes from version 1.1.2 to 1.2.2

Files changed (133) hide show
  1. app/code/community/Creativestyle/AmazonPayments/Block/Abstract.php +139 -0
  2. app/code/community/Creativestyle/AmazonPayments/Block/Adminhtml/CredentialsValidator.php +51 -0
  3. app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Abstract.php +0 -96
  4. app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Button.php +0 -31
  5. app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Js.php +0 -68
  6. app/code/community/Creativestyle/AmazonPayments/Block/Button/Js.php +51 -0
  7. app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout.php → Checkout.php} +3 -3
  8. app/code/community/Creativestyle/AmazonPayments/Block/Checkout/Abstract.php +34 -0
  9. app/code/community/Creativestyle/AmazonPayments/Block/Checkout/Js.php +30 -0
  10. app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout → Checkout}/Notice.php +1 -1
  11. app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout → Checkout}/SandboxToolbox.php +1 -1
  12. app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Head.php → Head.php} +2 -2
  13. app/code/community/Creativestyle/AmazonPayments/Block/Login/Abstract.php +27 -0
  14. app/code/community/Creativestyle/AmazonPayments/Block/Login/Account/Confirm.php +26 -0
  15. app/code/community/Creativestyle/AmazonPayments/Block/Login/Account/Update.php +22 -0
  16. app/code/community/Creativestyle/AmazonPayments/Block/Login/Button.php +37 -0
  17. app/code/community/Creativestyle/AmazonPayments/Block/Login/Head.php +22 -0
  18. app/code/community/Creativestyle/AmazonPayments/Block/Login/Logout.php +16 -0
  19. app/code/community/Creativestyle/AmazonPayments/Block/Onepage/Button.php +41 -0
  20. app/code/community/Creativestyle/AmazonPayments/Block/Pay/Abstract.php +32 -0
  21. app/code/community/Creativestyle/AmazonPayments/Block/Pay/Button.php +33 -0
  22. app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Payment → Payment}/Info.php +3 -3
  23. app/code/community/Creativestyle/AmazonPayments/Helper/Data.php +65 -0
  24. app/code/community/Creativestyle/AmazonPayments/Model/Api/Abstract.php +7 -7
  25. app/code/community/Creativestyle/AmazonPayments/Model/Api/Advanced.php +1 -1
  26. app/code/community/Creativestyle/AmazonPayments/Model/Api/Login.php +64 -0
  27. app/code/community/Creativestyle/AmazonPayments/Model/Checkout.php +3 -2
  28. app/code/community/Creativestyle/AmazonPayments/Model/Config.php +172 -74
  29. app/code/community/Creativestyle/AmazonPayments/Model/Logger.php +3 -3
  30. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Color.php +0 -1
  31. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Color/LoginPay.php +33 -0
  32. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Size.php +3 -3
  33. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Size/LoginPay.php +35 -0
  34. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Type/Login.php +32 -0
  35. app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Type/Pay.php +32 -0
  36. app/code/community/Creativestyle/AmazonPayments/Model/Manager.php +285 -179
  37. app/code/community/Creativestyle/AmazonPayments/Model/Observer.php +149 -0
  38. app/code/community/Creativestyle/AmazonPayments/Model/Payment/Advanced/Abstract.php +43 -17
  39. app/code/community/Creativestyle/AmazonPayments/Model/Service/Login.php +166 -0
  40. app/code/community/Creativestyle/AmazonPayments/Model/Simulator.php +1 -1
  41. app/code/community/Creativestyle/AmazonPayments/Model/System/Config/Backend/DataPolling/Cron.php +50 -0
  42. app/code/community/Creativestyle/AmazonPayments/controllers/Adminhtml/SystemController.php +87 -0
  43. app/code/community/Creativestyle/AmazonPayments/controllers/Advanced/CheckoutController.php +27 -33
  44. app/code/community/Creativestyle/AmazonPayments/controllers/Advanced/LoginController.php +161 -0
  45. app/code/community/Creativestyle/AmazonPayments/etc/adminhtml.xml +7 -7
  46. app/code/community/Creativestyle/AmazonPayments/etc/config.xml +68 -5
  47. app/code/community/Creativestyle/AmazonPayments/etc/system.xml +140 -25
  48. app/code/community/Creativestyle/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-1.1.6-1.2.0.php +28 -0
  49. app/design/adminhtml/default/default/template/creativestyle/amazonpayments/info.phtml +1 -1
  50. app/design/adminhtml/default/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/info.phtml +0 -0
  51. app/design/adminhtml/default/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/pdf/info.phtml +0 -0
  52. app/design/frontend/base/default/layout/amazonpayments.xml +61 -20
  53. app/design/frontend/base/default/template/creativestyle/amazonpayments/advanced/button.phtml +0 -22
  54. app/design/frontend/base/default/template/creativestyle/amazonpayments/advanced/button/tooltip.phtml +0 -1
  55. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/button → button}/js.phtml +3 -2
  56. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/button/onepage.phtml → button/tooltip.phtml} +1 -7
  57. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout.phtml → checkout.phtml} +0 -3
  58. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/capture_notice.phtml +0 -0
  59. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/js.phtml +3 -2
  60. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/review/button.phtml +0 -0
  61. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/sandbox_toolbox.phtml +0 -0
  62. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/shipping_method.phtml +0 -0
  63. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/head.phtml → head.phtml} +1 -0
  64. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/button.phtml +30 -0
  65. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/button/account_login.phtml +52 -0
  66. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/form/account_confirm.phtml +57 -0
  67. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/form/account_update.phtml +74 -0
  68. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/head.phtml +20 -0
  69. app/design/frontend/base/default/template/creativestyle/amazonpayments/login/logout.phtml +18 -0
  70. app/design/frontend/base/default/template/creativestyle/amazonpayments/onepage/button.phtml +38 -0
  71. app/design/frontend/base/default/template/creativestyle/amazonpayments/pay/button.phtml +37 -0
  72. app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/info.phtml +0 -0
  73. app/design/frontend/base/default/template/creativestyle/amazonpayments/payment/pdf/info.phtml +16 -0
  74. app/locale/de_DE/Creativestyle_AmazonPayments.csv +110 -7
  75. app/locale/en_GB/Creativestyle_AmazonPayments.csv +110 -7
  76. app/locale/en_US/Creativestyle_AmazonPayments.csv +110 -7
  77. js/creativestyle/apa_checkout.min.js +1 -1
  78. lib/OffAmazonPaymentsNotifications/Client.php +14 -2
  79. lib/OffAmazonPaymentsNotifications/Impl/Certificate.php +79 -0
  80. lib/OffAmazonPaymentsNotifications/Impl/OpenSslVerifySignature.php +56 -2
  81. lib/OffAmazonPaymentsNotifications/Impl/XmlNotificationParser.php +27 -2
  82. lib/OffAmazonPaymentsNotifications/InvalidCertificateException.php +27 -0
  83. lib/OffAmazonPaymentsNotifications/Model/AuthorizationDetails.php +51 -0
  84. lib/OffAmazonPaymentsNotifications/Model/CaptureDetails.php +53 -1
  85. lib/OffAmazonPaymentsNotifications/Model/CaptureNotification.php +2 -1
  86. lib/OffAmazonPaymentsNotifications/Model/MerchantRegistrationDetails.php +197 -0
  87. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditDetails.php +441 -0
  88. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditNotification.php +159 -0
  89. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalDetails.php +439 -0
  90. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalNotification.php +159 -0
  91. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummary.php +155 -0
  92. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummaryList.php +116 -0
  93. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditSummary.php +152 -0
  94. lib/OffAmazonPaymentsNotifications/Model/ProviderCreditSummaryList.php +116 -0
  95. lib/OffAmazonPaymentsNotifications/Model/RefundDetails.php +52 -0
  96. lib/OffAmazonPaymentsNotifications/Model/SolutionProviderMerchantNotification.php +159 -0
  97. lib/OffAmazonPaymentsNotifications/Model/SolutionProviderOption.php +152 -0
  98. lib/OffAmazonPaymentsNotifications/Model/SolutionProviderOptions.php +116 -0
  99. lib/OffAmazonPaymentsService/Client.php +223 -30
  100. lib/OffAmazonPaymentsService/Interface.php +43 -1
  101. lib/OffAmazonPaymentsService/Model/AuthorizationDetails.php +50 -1
  102. lib/OffAmazonPaymentsService/Model/AuthorizeRequest.php +47 -0
  103. lib/OffAmazonPaymentsService/Model/BillingAddress.php +155 -0
  104. lib/OffAmazonPaymentsService/Model/BillingAgreementDetails.php +53 -2
  105. lib/OffAmazonPaymentsService/Model/CancelOrderReferenceRequest.php +1 -1
  106. lib/OffAmazonPaymentsService/Model/CaptureDetails.php +49 -0
  107. lib/OffAmazonPaymentsService/Model/CaptureRequest.php +47 -0
  108. lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsRequest.php +155 -0
  109. lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsResponse.php +207 -0
  110. lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsResult.php +110 -0
  111. lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsRequest.php +155 -0
  112. lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsResponse.php +207 -0
  113. lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsResult.php +110 -0
  114. lib/OffAmazonPaymentsService/Model/OrderReferenceDetails.php +154 -7
  115. lib/OffAmazonPaymentsService/Model/ParentDetails.php +153 -0
  116. lib/OffAmazonPaymentsService/Model/ProviderCredit.php +158 -0
  117. lib/OffAmazonPaymentsService/Model/ProviderCreditDetails.php +503 -0
  118. lib/OffAmazonPaymentsService/Model/ProviderCreditList.php +116 -0
  119. lib/OffAmazonPaymentsService/Model/ProviderCreditReversal.php +158 -0
  120. lib/OffAmazonPaymentsService/Model/ProviderCreditReversalDetails.php +449 -0
  121. lib/OffAmazonPaymentsService/Model/ProviderCreditReversalList.php +116 -0
  122. lib/OffAmazonPaymentsService/Model/ProviderCreditReversalSummary.php +155 -0
  123. lib/OffAmazonPaymentsService/Model/ProviderCreditReversalSummaryList.php +116 -0
  124. lib/OffAmazonPaymentsService/Model/ProviderCreditSummary.php +155 -0
  125. lib/OffAmazonPaymentsService/Model/ProviderCreditSummaryList.php +116 -0
  126. lib/OffAmazonPaymentsService/Model/RefundDetails.php +47 -2
  127. lib/OffAmazonPaymentsService/Model/RefundRequest.php +46 -0
  128. lib/OffAmazonPaymentsService/Model/ReverseProviderCreditRequest.php +302 -0
  129. lib/OffAmazonPaymentsService/Model/ReverseProviderCreditResponse.php +207 -0
  130. lib/OffAmazonPaymentsService/Model/ReverseProviderCreditResult.php +110 -0
  131. lib/OffAmazonPaymentsService/RegionSpecificProperties.php +9 -6
  132. package.xml +13 -12
  133. skin/frontend/base/default/creativestyle/css/amazonpayments.css +21 -2
app/code/community/Creativestyle/AmazonPayments/Block/Abstract.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ abstract class Creativestyle_AmazonPayments_Block_Abstract extends Mage_Core_Block_Template {
17
+
18
+ /**
19
+ * Instance of the current quote
20
+ *
21
+ * @var Mage_Sales_Model_Quote
22
+ */
23
+ protected $_quote = null;
24
+
25
+ protected $_widgetHtmlIdPrefix = null;
26
+
27
+ protected $_widgetHtmlId = null;
28
+
29
+ protected function _isActive() {
30
+ return $this->_getConfig()->isActive();
31
+ }
32
+
33
+ protected function _isConnectionSecure() {
34
+ if ($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::LOGIN_WITH_AMAZON_ACTIVE) {
35
+ return Mage::app()->getStore()->isCurrentlySecure();
36
+ }
37
+ return true;
38
+ }
39
+
40
+ protected function _isOnepageCheckout() {
41
+ $module = strtolower($this->getRequest()->getModuleName());
42
+ $controller = strtolower($this->getRequest()->getControllerName());
43
+ $action = strtolower($this->getRequest()->getActionName());
44
+ if ($module == 'checkout' && $controller == 'onepage' && $action == 'index') {
45
+ return true;
46
+ }
47
+ return false;
48
+ }
49
+
50
+ protected function _getConfig() {
51
+ return Mage::getSingleton('amazonpayments/config');
52
+ }
53
+
54
+ protected function _getCheckoutSession() {
55
+ return Mage::getSingleton('checkout/session');
56
+ }
57
+
58
+ protected function _getCustomerSession() {
59
+ return Mage::getSingleton('customer/session');
60
+ }
61
+
62
+ protected function _getQuote() {
63
+ if (null === $this->_quote) {
64
+ $this->_quote = $this->_getCheckoutSession()->getQuote();
65
+ }
66
+ return $this->_quote;
67
+ }
68
+
69
+ public function getCheckoutUrl() {
70
+ return Mage::getUrl('amazonpayments/advanced_checkout');
71
+ }
72
+
73
+ public function getLoginRedirectUrl() {
74
+ if ($this->_isOnepageCheckout()) {
75
+ return $this->getPayRedirectUrl();
76
+ }
77
+ return Mage::getUrl('amazonpayments/advanced_login');
78
+ }
79
+
80
+ public function getPayRedirectUrl() {
81
+ return Mage::getUrl('amazonpayments/advanced_login', array('target' => 'checkout'));
82
+ }
83
+
84
+ public function getMerchantId() {
85
+ return $this->_getConfig()->getMerchantId();
86
+ }
87
+
88
+ public function getRegion() {
89
+ return $this->_getConfig()->getRegion();
90
+ }
91
+
92
+ public function getEnvironment() {
93
+ return $this->_getConfig()->getEnvironment();
94
+ }
95
+
96
+ public function getWidgetHtmlId() {
97
+ if (null === $this->_widgetHtmlId) {
98
+ if ($this->getIdSuffix()) {
99
+ $this->_widgetHtmlId = $this->_widgetHtmlIdPrefix . ucfirst($this->getIdSuffix());
100
+ } else {
101
+ $this->_widgetHtmlId = uniqid($this->_widgetHtmlIdPrefix);
102
+ }
103
+ }
104
+ return $this->_widgetHtmlId;
105
+ }
106
+
107
+ public function getWidgetClass() {
108
+ return $this->_widgetHtmlIdPrefix;
109
+ }
110
+
111
+ public function isLoginActive() {
112
+ return (bool)($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::LOGIN_WITH_AMAZON_ACTIVE);
113
+ }
114
+
115
+ public function isLive() {
116
+ return $this->getEnvironment() != 'sandbox';
117
+ }
118
+
119
+ public function isVirtual() {
120
+ return $this->_getQuote()->isVirtual();
121
+ }
122
+
123
+ /**
124
+ * Render Amazon Payments block
125
+ *
126
+ * @return string
127
+ */
128
+ protected function _toHtml() {
129
+ try {
130
+ if ($this->_isActive()) {
131
+ return parent::_toHtml();
132
+ }
133
+ } catch (Exception $e) {
134
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
135
+ }
136
+ return '';
137
+ }
138
+
139
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Adminhtml/CredentialsValidator.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Adminhtml_CredentialsValidator extends Mage_Adminhtml_Block_System_Config_Form_Field {
17
+
18
+ public function render(Varien_Data_Form_Element_Abstract $element) {
19
+ $html = '<td class="label"></td>';
20
+ $html .= '<td class="value">';
21
+ $html .= '<div id="amazonAccountValidation"></div>';
22
+ $html .= '<button title="' . $this->__('Validate Amazon Payments account'). '" type="button" class="scalable save" onclick="amazonAccountValidate()" style=""><span><span><span>' . $this->__('Validate Amazon Payments account'). '</span></span></span></button>';
23
+ $html .= '<script type="text/javascript">//<![CDATA[' . "\n";
24
+ $html .= ' function amazonAccountValidate() {' . "\n";
25
+ $html .= ' new Ajax.Updater(\'amazonAccountValidation\', \'' . Mage::helper('adminhtml')->getUrl('admin_amazonpayments/adminhtml_system/validate') . '\', {' . "\n";
26
+ $html .= ' parameters: {' . "\n";
27
+ $html .= ' merchantId: $F(\'amazonpayments_account_merchant_id\'),' . "\n";
28
+ $html .= ' accessKey: $F(\'amazonpayments_account_access_key\'),' . "\n";
29
+ $html .= ' secretKey: $F(\'amazonpayments_account_secret_key\'),' . "\n";
30
+ $html .= ' region: $F(\'amazonpayments_account_region\'),' . "\n";
31
+ $html .= ' sandbox: $F(\'amazonpayments_general_sandbox\')' . "\n";
32
+ $html .= ' }' . "\n";
33
+ $html .= ' });' . "\n";
34
+ $html .= ' }' . "\n";
35
+ $html .= '//]]></script>' . "\n";
36
+
37
+ if ($element->getComment()) {
38
+ $html .= '<p class="note"><span>'.$element->getComment().'</span></p>';
39
+ }
40
+ $html .= '</td>';
41
+
42
+ if ($element->getCanUseWebsiteValue() || $element->getCanUseDefaultValue()) {
43
+ $html .= '<td rowspan="2" class="use-default"></td>';
44
+ }
45
+ $html .= '<td rowspan="2" class="scope-label"></td>';
46
+ $html .= '<td rowspan="2" class=""></td>';
47
+
48
+ return $this->_decorateRowHtml($element, $html);
49
+ }
50
+
51
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Abstract.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This file is part of the official Amazon Payments Advanced extension
5
- * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
- * All rights reserved
7
- *
8
- * Reuse or modification of this source code is not allowed
9
- * without written permission from creativestyle GmbH
10
- *
11
- * @category Creativestyle
12
- * @package Creativestyle_AmazonPayments
13
- * @copyright Copyright (c) 2014 creativestyle GmbH
14
- * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
- */
16
- abstract class Creativestyle_AmazonPayments_Block_Advanced_Abstract extends Mage_Core_Block_Template {
17
-
18
- protected $_quote = null;
19
-
20
- protected $_widgetHtmlId = null;
21
-
22
- protected function _getConfig() {
23
- return Mage::getSingleton('amazonpayments/config');
24
- }
25
-
26
- protected function _getCheckoutSession() {
27
- return Mage::getSingleton('checkout/session');
28
- }
29
-
30
- protected function _getQuote() {
31
- if (null === $this->_quote) {
32
- $this->_quote = $this->_getCheckoutSession()->getQuote();
33
- }
34
- return $this->_quote;
35
- }
36
-
37
- protected function _isActive() {
38
- if ($this->_getConfig()->isActive() && $this->_getConfig()->isCurrentIpAllowed() && $this->_getConfig()->isCurrentLocaleAllowed()) {
39
- $methodInstance = $this->isLive() ? Mage::getModel('amazonpayments/payment_advanced') : Mage::getModel('amazonpayments/payment_advanced_sandbox');
40
- return $methodInstance->isAvailable($this->_getQuote());
41
- }
42
- return false;
43
- }
44
-
45
- public function getCheckoutUrl() {
46
- return Mage::getUrl('amazonpayments/advanced_checkout');
47
- }
48
-
49
- public function getOrderReferenceId() {
50
- return $this->_getCheckoutSession()->getOrderReferenceId();
51
- }
52
-
53
- public function getEnvironment() {
54
- return $this->_getConfig()->getConnectionData('environment');
55
- }
56
-
57
- public function getMerchantId() {
58
- return $this->_getConfig()->getConnectionData('merchantId');
59
- }
60
-
61
- public function getRegion() {
62
- return $this->_getConfig()->getConnectionData('region');
63
- }
64
-
65
- public function getWidgetHtmlId() {
66
- if ($this->getIdSuffix()) {
67
- return $this->_widgetHtmlId . ucfirst($this->getIdSuffix());
68
- }
69
- return $this->_widgetHtmlId;
70
- }
71
-
72
- public function getWidgetClass() {
73
- return $this->_widgetHtmlId;
74
- }
75
-
76
- public function isLive() {
77
- return $this->getEnvironment() != 'sandbox';
78
- }
79
-
80
- /**
81
- * Render Amazon Payments block
82
- *
83
- * @return string
84
- */
85
- protected function _toHtml() {
86
- try {
87
- if ($this->_isActive()) {
88
- return parent::_toHtml();
89
- }
90
- } catch (Exception $e) {
91
- Creativestyle_AmazonPayments_Model_Logger::logException($e);
92
- }
93
- return '';
94
- }
95
-
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Button.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This file is part of the official Amazon Payments Advanced extension
5
- * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
- * All rights reserved
7
- *
8
- * Reuse or modification of this source code is not allowed
9
- * without written permission from creativestyle GmbH
10
- *
11
- * @category Creativestyle
12
- * @package Creativestyle_AmazonPayments
13
- * @copyright Copyright (c) 2014 creativestyle GmbH
14
- * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
- */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Button extends Creativestyle_AmazonPayments_Block_Advanced_Abstract {
17
-
18
- protected $_widgetHtmlId = 'buttonWidget';
19
-
20
- public function getButtonWidgetUrl() {
21
- $buttonUrls = $this->_getConfig()->getGlobalDataValue('button_urls');
22
- if (isset($buttonUrls[$this->getRegion()][$this->getEnvironment()])) {
23
- return sprintf($buttonUrls[$this->getRegion()][$this->getEnvironment()] . '?sellerId=%s&amp;size=%s&amp;color=%s',
24
- $this->getMerchantId(),
25
- $this->_getConfig()->getButtonSize(),
26
- $this->_getConfig()->getButtonColor());
27
- }
28
- return '';
29
- }
30
-
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Creativestyle/AmazonPayments/Block/Advanced/Js.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This file is part of the official Amazon Payments Advanced extension
5
- * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
- * All rights reserved
7
- *
8
- * Reuse or modification of this source code is not allowed
9
- * without written permission from creativestyle GmbH
10
- *
11
- * @category Creativestyle
12
- * @package Creativestyle_AmazonPayments
13
- * @copyright Copyright (c) 2014 creativestyle GmbH
14
- * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
- */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Js extends Creativestyle_AmazonPayments_Block_Advanced_Abstract {
17
-
18
- /**
19
- *
20
- */
21
- protected $_addressBookWidgetSize = null;
22
- protected $_walletWidgetSize = null;
23
-
24
- protected $_widgetHtmlId = 'buttonWidget';
25
-
26
- protected $_idSuffixes = null;
27
-
28
- public function addIdSuffix($suffix) {
29
- if (null === $this->_idSuffixes) {
30
- $this->_idSuffixes = array();
31
- }
32
- $this->_idSuffixes[] = $suffix;
33
- }
34
-
35
- public function getAddressBookWidgetSize() {
36
- if (null === $this->_addressBookWidgetSize) {
37
- $this->_addressBookWidgetSize = $this->_getConfig()->getAddressBookWidgetSize();
38
- }
39
- return $this->_addressBookWidgetSize;
40
- }
41
-
42
- public function getWalletWidgetSize() {
43
- if (null === $this->_walletWidgetSize) {
44
- $this->_walletWidgetSize = $this->_getConfig()->getWalletWidgetSize();
45
- }
46
- return $this->_walletWidgetSize;
47
- }
48
-
49
- public function getQuoteBaseGrandTotal() {
50
- return (float)$this->_getQuote()->getBaseGrandTotal();
51
- }
52
-
53
- public function getWidgetHtmlIds($asJson = false) {
54
- $ids = array();
55
- if (!empty($this->_idSuffixes)) {
56
- foreach ($this->_idSuffixes as $suffix) {
57
- $ids[] = $this->_widgetHtmlId . ucfirst($suffix);
58
- }
59
- }
60
- if ($asJson) return Mage::helper('core')->jsonEncode($ids);
61
- return $ids;
62
- }
63
-
64
- public function isVirtual() {
65
- return $this->_getQuote()->isVirtual();
66
- }
67
-
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Creativestyle/AmazonPayments/Block/Button/Js.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Button_Js extends Creativestyle_AmazonPayments_Block_Abstract {
17
+
18
+ public function getUrlParams() {
19
+ if ($this->isLoginActive()) {
20
+ $params = array(
21
+ 'login' => $this->getLoginRedirectUrl(),
22
+ 'pay' => $this->getPayRedirectUrl()
23
+ );
24
+ } else {
25
+ $params = array(
26
+ 'checkout' => $this->getCheckoutUrl()
27
+ );
28
+ }
29
+ return $this->helper('core')->jsonEncode($params);
30
+ }
31
+
32
+ public function getDesignParams() {
33
+ if ($this->isLoginActive()) {
34
+ $params = array(
35
+ 'payButton' => array(
36
+ 'type' => $this->_getConfig()->getButtonType(),
37
+ 'size' => $this->_getConfig()->getButtonSize(),
38
+ 'color' => $this->_getConfig()->getButtonColor()
39
+ ),
40
+ 'loginButton' => array(
41
+ 'type' => $this->_getConfig()->getButtonType(null, 'login'),
42
+ 'size' => $this->_getConfig()->getButtonSize(null, 'login'),
43
+ 'color' => $this->_getConfig()->getButtonColor(null, 'login')
44
+ )
45
+ );
46
+ return $this->helper('core')->jsonEncode($params);
47
+ }
48
+ return '{}';
49
+ }
50
+
51
+ }
app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout.php → Checkout.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Checkout extends Mage_Checkout_Block_Onepage_Abstract {
17
 
18
  protected function _getConfig() {
19
  return Mage::getSingleton('amazonpayments/config');
@@ -24,7 +24,7 @@ class Creativestyle_AmazonPayments_Block_Advanced_Checkout extends Mage_Checkout
24
  }
25
 
26
  public function getMerchantId() {
27
- return $this->_getConfig()->getMerchantValues()->getMerchantId();
28
  }
29
 
30
  public function showSandboxToolbox() {
@@ -32,7 +32,7 @@ class Creativestyle_AmazonPayments_Block_Advanced_Checkout extends Mage_Checkout
32
  }
33
 
34
  public function isLive() {
35
- return $this->_getConfig()->getMerchantValues()->getEnvironment() != 'sandbox';
36
  }
37
 
38
  public function isVirtual() {
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
+ class Creativestyle_AmazonPayments_Block_Checkout extends Mage_Checkout_Block_Onepage_Abstract {
17
 
18
  protected function _getConfig() {
19
  return Mage::getSingleton('amazonpayments/config');
24
  }
25
 
26
  public function getMerchantId() {
27
+ return $this->_getConfig()->getMerchantId();
28
  }
29
 
30
  public function showSandboxToolbox() {
32
  }
33
 
34
  public function isLive() {
35
+ return $this->_getConfig()->getEnvironment() != 'sandbox';
36
  }
37
 
38
  public function isVirtual() {
app/code/community/Creativestyle/AmazonPayments/Block/Checkout/Abstract.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ abstract class Creativestyle_AmazonPayments_Block_Checkout_Abstract extends Creativestyle_AmazonPayments_Block_Abstract {
17
+
18
+ protected function _isActive() {
19
+ if (($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::PAY_WITH_AMAZON_ACTIVE)
20
+ && $this->_getConfig()->isCurrentIpAllowed()
21
+ && $this->_getConfig()->isCurrentLocaleAllowed()
22
+ && $this->_isConnectionSecure())
23
+ {
24
+ $methodInstance = $this->isLive() ? Mage::getModel('amazonpayments/payment_advanced') : Mage::getModel('amazonpayments/payment_advanced_sandbox');
25
+ return $methodInstance->isAvailable($this->_getQuote());
26
+ }
27
+ return false;
28
+ }
29
+
30
+ public function getOrderReferenceId() {
31
+ return $this->_getCheckoutSession()->getOrderReferenceId();
32
+ }
33
+
34
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Checkout/Js.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Checkout_Js extends Creativestyle_AmazonPayments_Block_Checkout_Abstract {
17
+
18
+ public function getAddressBookWidgetSize() {
19
+ return $this->_getConfig()->getAddressBookWidgetSize();
20
+ }
21
+
22
+ public function getWalletWidgetSize() {
23
+ return $this->_getConfig()->getWalletWidgetSize();
24
+ }
25
+
26
+ public function getQuoteBaseGrandTotal() {
27
+ return (float)$this->_getQuote()->getBaseGrandTotal();
28
+ }
29
+
30
+ }
app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout → Checkout}/Notice.php RENAMED
@@ -13,7 +13,7 @@
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Checkout_Notice extends Creativestyle_AmazonPayments_Block_Advanced_Abstract {
17
 
18
  public function willBeCapturedImmediately() {
19
  return $this->_getConfig()->captureImmediately();
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
+ class Creativestyle_AmazonPayments_Block_Checkout_Notice extends Creativestyle_AmazonPayments_Block_Checkout_Abstract {
17
 
18
  public function willBeCapturedImmediately() {
19
  return $this->_getConfig()->captureImmediately();
app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Checkout → Checkout}/SandboxToolbox.php RENAMED
@@ -13,7 +13,7 @@
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Checkout_SandboxToolbox extends Creativestyle_AmazonPayments_Block_Advanced_Abstract {
17
 
18
  public function getSimulationOptions() {
19
  return Mage::helper('core')->jsonEncode(Creativestyle_AmazonPayments_Model_Simulator::getAvailableSimulations());
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
+ class Creativestyle_AmazonPayments_Block_Checkout_SandboxToolbox extends Creativestyle_AmazonPayments_Block_Checkout_Abstract {
17
 
18
  public function getSimulationOptions() {
19
  return Mage::helper('core')->jsonEncode(Creativestyle_AmazonPayments_Model_Simulator::getAvailableSimulations());
app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Head.php → Head.php} RENAMED
@@ -13,10 +13,10 @@
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Head extends Creativestyle_AmazonPayments_Block_Advanced_Abstract {
17
 
18
  public function getWidgetUrl() {
19
- return $this->_getConfig()->getMerchantValues()->getWidgetUrl();
20
  }
21
 
22
  }
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
+ class Creativestyle_AmazonPayments_Block_Head extends Creativestyle_AmazonPayments_Block_Abstract {
17
 
18
  public function getWidgetUrl() {
19
+ return $this->_getConfig()->getWidgetUrl();
20
  }
21
 
22
  }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Abstract.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ abstract class Creativestyle_AmazonPayments_Block_Login_Abstract extends Creativestyle_AmazonPayments_Block_Abstract {
17
+
18
+ protected $_widgetHtmlIdPrefix = 'loginButtonWidget';
19
+
20
+ protected function _isActive() {
21
+ return ($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::LOGIN_WITH_AMAZON_ACTIVE)
22
+ && $this->_getConfig()->isCurrentIpAllowed()
23
+ && $this->_getConfig()->isCurrentLocaleAllowed()
24
+ && $this->_isConnectionSecure();
25
+ }
26
+
27
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Account/Confirm.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Login_Account_Confirm extends Creativestyle_AmazonPayments_Block_Login_Abstract {
17
+
18
+ public function getPostActionUrl() {
19
+ return $this->getUrl('*/*/', array('_current' => true));
20
+ }
21
+
22
+ public function getForgotPasswordUrl() {
23
+ return $this->helper('customer')->getForgotPasswordUrl();
24
+ }
25
+
26
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Account/Update.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Login_Account_Update extends Mage_Customer_Block_Form_Register {
17
+
18
+ public function getPostActionUrl() {
19
+ return $this->getUrl('*/*/', array('_current' => true));
20
+ }
21
+
22
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Button.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Login_Button extends Creativestyle_AmazonPayments_Block_Login_Abstract {
17
+
18
+ protected function _construct() {
19
+ parent::_construct();
20
+ if (!$this->hasData('template')) {
21
+ $this->setTemplate('creativestyle/amazonpayments/login/button.phtml');
22
+ }
23
+ }
24
+
25
+ protected function _isActive() {
26
+ if ($this->_getCustomerSession()->isLoggedIn()
27
+ && $this->_getCustomerSession()->getCustomer()->getAmazonUserId()) {
28
+ return false;
29
+ }
30
+ return parent::_isActive();
31
+ }
32
+
33
+ public function isCustomDesignSet() {
34
+ return $this->getData('button_type') || $this->getData('button_size') || $this->getData('button_color');
35
+ }
36
+
37
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Head.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Login_Head extends Creativestyle_AmazonPayments_Block_Login_Abstract {
17
+
18
+ public function getClientId() {
19
+ return $this->_getConfig()->getClientId();
20
+ }
21
+
22
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Login/Logout.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Login_Logout extends Creativestyle_AmazonPayments_Block_Login_Abstract {}
app/code/community/Creativestyle/AmazonPayments/Block/Onepage/Button.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Onepage_Button extends Creativestyle_AmazonPayments_Block_Abstract {
17
+
18
+ /**
19
+ * Render Amazon Payments button
20
+ *
21
+ * @return string
22
+ */
23
+ protected function _toHtml() {
24
+ try {
25
+ if ($this->_isActive()) {
26
+ if ($this->isLoginActive()) {
27
+ $button = $this->getChild('onepage.amazonpayments.button.login');
28
+ } else {
29
+ $button = $this->getChild('onepage.amazonpayments.button.pay');
30
+ }
31
+ if ($button) {
32
+ return $button->toHtml();
33
+ }
34
+ }
35
+ } catch (Exception $e) {
36
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
37
+ }
38
+ return parent::_toHtml();
39
+ }
40
+
41
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Pay/Abstract.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ abstract class Creativestyle_AmazonPayments_Block_Pay_Abstract extends Creativestyle_AmazonPayments_Block_Abstract {
17
+
18
+ protected $_widgetHtmlIdPrefix = 'payButtonWidget';
19
+
20
+ protected function _isActive() {
21
+ if (($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::PAY_WITH_AMAZON_ACTIVE)
22
+ && $this->_getConfig()->isCurrentIpAllowed()
23
+ && $this->_getConfig()->isCurrentLocaleAllowed()
24
+ && $this->_isConnectionSecure())
25
+ {
26
+ $methodInstance = $this->isLive() ? Mage::getModel('amazonpayments/payment_advanced') : Mage::getModel('amazonpayments/payment_advanced_sandbox');
27
+ return $methodInstance->isAvailable($this->_getQuote());
28
+ }
29
+ return false;
30
+ }
31
+
32
+ }
app/code/community/Creativestyle/AmazonPayments/Block/Pay/Button.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Block_Pay_Button extends Creativestyle_AmazonPayments_Block_Pay_Abstract {
17
+
18
+ protected function _construct() {
19
+ parent::_construct();
20
+ if (!$this->hasData('template')) {
21
+ $this->setTemplate('creativestyle/amazonpayments/pay/button.phtml');
22
+ }
23
+ }
24
+
25
+ public function getButtonWidgetUrl() {
26
+ return $this->_getConfig()->getButtonUrl();
27
+ }
28
+
29
+ public function isCustomDesignSet() {
30
+ return $this->getData('button_type') || $this->getData('button_size') || $this->getData('button_color');
31
+ }
32
+
33
+ }
app/code/community/Creativestyle/AmazonPayments/Block/{Advanced/Payment → Payment}/Info.php RENAMED
@@ -13,15 +13,15 @@
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
- class Creativestyle_AmazonPayments_Block_Advanced_Payment_Info extends Mage_Payment_Block_Info {
17
 
18
  protected function _construct() {
19
  parent::_construct();
20
- $this->setTemplate('creativestyle/amazonpayments/advanced/payment/info.phtml');
21
  }
22
 
23
  public function toPdf() {
24
- $this->setTemplate('creativestyle/amazonpayments/advanced/payment/pdf/info.phtml');
25
  return $this->toHtml();
26
  }
27
 
13
  * @copyright Copyright (c) 2014 creativestyle GmbH
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
+ class Creativestyle_AmazonPayments_Block_Payment_Info extends Mage_Payment_Block_Info {
17
 
18
  protected function _construct() {
19
  parent::_construct();
20
+ $this->setTemplate('creativestyle/amazonpayments/payment/info.phtml');
21
  }
22
 
23
  public function toPdf() {
24
+ $this->setTemplate('creativestyle/amazonpayments/payment/pdf/info.phtml');
25
  return $this->toHtml();
26
  }
27
 
app/code/community/Creativestyle/AmazonPayments/Helper/Data.php CHANGED
@@ -84,4 +84,69 @@ class Creativestyle_AmazonPayments_Helper_Data extends Mage_Core_Helper_Abstract
84
  return preg_match('/iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini/', $userAgent);
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
84
  return preg_match('/iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini/', $userAgent);
85
  }
86
 
87
+ public function getTransactionStatus($transaction) {
88
+ $statusArray = $transaction->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
89
+ if (is_array($statusArray) && array_key_exists('State', $statusArray)) {
90
+ return $statusArray['State'];
91
+ }
92
+ return null;
93
+ }
94
+
95
+ public function getTransactionReasonCode($transaction) {
96
+ $statusArray = $transaction->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
97
+ if (is_array($statusArray) && array_key_exists('ReasonCode', $statusArray)) {
98
+ return $statusArray['ReasonCode'];
99
+ }
100
+ return null;
101
+ }
102
+
103
+ public function explodeCustomerName($customerName) {
104
+ $explodedName = explode(' ', trim($customerName));
105
+ $result = array();
106
+ if (count($explodedName) > 1) {
107
+ $result['firstname'] = reset($explodedName);
108
+ $result['lastname'] = trim(str_replace($result['firstname'], "", $customerName));
109
+ } else {
110
+ $result['firstname'] = Mage::helper('amazonpayments')->__('n/a');
111
+ $result['lastname'] = reset($explodedName);
112
+ }
113
+ return new Varien_Object($result);
114
+ }
115
+
116
+ public function getHeadCss() {
117
+ if ($this->_getConfig()->isActive()) {
118
+ return 'creativestyle/css/amazonpayments.css';
119
+ }
120
+ }
121
+
122
+ public function getHeadJs() {
123
+ if ($this->_getConfig()->isActive()) {
124
+ return 'creativestyle/apa_checkout.min.js';
125
+ }
126
+ }
127
+
128
+ public function getHeadTooltipJs() {
129
+ if ($this->_getConfig()->isActive()) {
130
+ return 'prototype/tooltip.js';
131
+ }
132
+ }
133
+
134
+ public function getPayWithAmazonButton($buttonType = null, $buttonSize = null, $buttonColor = null, $idSuffix = null) {
135
+ return Mage::getSingleton('core/layout')->createBlock('amazonpayments/pay_button')
136
+ ->setData('button_type', $buttonType)
137
+ ->setData('button_size', $buttonSize)
138
+ ->setData('button_color', $buttonColor)
139
+ ->setData('id_suffix', $idSuffix)
140
+ ->toHtml();
141
+ }
142
+
143
+ public function getLoginWithAmazonButton($buttonType = null, $buttonSize = null, $buttonColor = null, $idSuffix = null) {
144
+ return Mage::getSingleton('core/layout')->createBlock('amazonpayments/login_button')
145
+ ->setData('button_type', $buttonType)
146
+ ->setData('button_size', $buttonSize)
147
+ ->setData('button_color', $buttonColor)
148
+ ->setData('id_suffix', $idSuffix)
149
+ ->toHtml();
150
+ }
151
+
152
  }
app/code/community/Creativestyle/AmazonPayments/Model/Api/Abstract.php CHANGED
@@ -15,20 +15,20 @@
15
  */
16
  abstract class Creativestyle_AmazonPayments_Model_Api_Abstract {
17
 
18
- protected
19
- $_api = null;
20
 
21
  protected function _getConfig() {
22
  return Mage::getSingleton('amazonpayments/config');
23
  }
24
 
25
- protected function _getConnectionData() {
26
- return $this->_getConfig()->getConnectionData();
27
  }
28
 
29
- public function getMerchantId() {
30
- return $this->_getConfig()->getMerchantValues()->getMerchantId();
 
31
  }
32
 
33
- abstract protected function _getApi();
34
  }
15
  */
16
  abstract class Creativestyle_AmazonPayments_Model_Api_Abstract {
17
 
18
+ protected $_api = null;
19
+ protected $_store = null;
20
 
21
  protected function _getConfig() {
22
  return Mage::getSingleton('amazonpayments/config');
23
  }
24
 
25
+ public function getMerchantId() {
26
+ return $this->_getConfig()->getMerchantId($this->_store);
27
  }
28
 
29
+ public function setStore($store = null) {
30
+ $this->_store = $store;
31
+ return $this;
32
  }
33
 
 
34
  }
app/code/community/Creativestyle/AmazonPayments/Model/Api/Advanced.php CHANGED
@@ -17,7 +17,7 @@ class Creativestyle_AmazonPayments_Model_Api_Advanced extends Creativestyle_Amaz
17
 
18
  protected function _getApi() {
19
  if (null === $this->_api) {
20
- $this->_api = new OffAmazonPaymentsService_Client($this->_getConnectionData());
21
  }
22
  return $this->_api;
23
  }
17
 
18
  protected function _getApi() {
19
  if (null === $this->_api) {
20
+ $this->_api = new OffAmazonPaymentsService_Client($this->_getConfig()->getConnectionData(null, $this->_store));
21
  }
22
  return $this->_api;
23
  }
app/code/community/Creativestyle/AmazonPayments/Model/Api/Login.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Api_Login extends Creativestyle_AmazonPayments_Model_Api_Abstract {
17
+
18
+ protected function _getApi($path, $params = null) {
19
+ $url = trim($this->_getConfig()->getLoginApiUrl($this->_store), '/') . '/' . vsprintf($path, $params);
20
+ $this->_api = curl_init($url);
21
+ curl_setopt($this->_api, CURLOPT_RETURNTRANSFER, true);
22
+ return $this;
23
+ }
24
+
25
+ protected function _call() {
26
+ if (null !== $this->_api) {
27
+ $response = curl_exec($this->_api);
28
+ $responseData = $this->_processApiResponse($response);
29
+ curl_close($this->_api);
30
+ $this->_api = null;
31
+ if ($responseData->getError()) {
32
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-API:' . $responseData->getError() . '] ' . ($responseData->hasErrorDescription() ? $responseData->getErrorDescription() : $responseData->getError()));
33
+ }
34
+ return $responseData;
35
+ }
36
+ return null;
37
+ }
38
+
39
+ protected function _setAuthorizationHeader($header) {
40
+ if (null !== $this->_api) {
41
+ curl_setopt($this->_api, CURLOPT_HTTPHEADER, array('Authorization: bearer ' . $header));
42
+ }
43
+ return $this;
44
+ }
45
+
46
+ protected function _processApiResponse($response) {
47
+ if ($response !== false) {
48
+ $responseData = json_decode($response, true);
49
+ if (!empty($responseData)) {
50
+ return new Varien_Object($responseData);
51
+ }
52
+ }
53
+ return null;
54
+ }
55
+
56
+ public function getTokenInfo($accessToken) {
57
+ return $this->_getApi('auth/o2/tokeninfo?access_token=%s', array($accessToken))->_call();
58
+ }
59
+
60
+ public function getUserProfile($accessToken) {
61
+ return $this->_getApi('user/profile')->_setAuthorizationHeader($accessToken)->_call();
62
+ }
63
+
64
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Checkout.php CHANGED
@@ -20,7 +20,7 @@ class Creativestyle_AmazonPayments_Model_Checkout extends Mage_Checkout_Model_Ty
20
  }
21
 
22
  protected function _getPaymentMethod() {
23
- if ($this->_getConfig()->getConnectionData('environment') == 'sandbox') {
24
  return array('method' => 'amazonpayments_advanced_sandbox');
25
  }
26
  return array('method' => 'amazonpayments_advanced');
@@ -154,7 +154,8 @@ class Creativestyle_AmazonPayments_Model_Checkout extends Mage_Checkout_Model_Ty
154
 
155
  // add order information to the session
156
  $this->_checkoutSession->setLastOrderId($order->getId())
157
- ->setLastRealOrderId($order->getIncrementId());
 
158
 
159
  }
160
 
20
  }
21
 
22
  protected function _getPaymentMethod() {
23
+ if ($this->_getConfig()->getEnvironment() == 'sandbox') {
24
  return array('method' => 'amazonpayments_advanced_sandbox');
25
  }
26
  return array('method' => 'amazonpayments_advanced');
154
 
155
  // add order information to the session
156
  $this->_checkoutSession->setLastOrderId($order->getId())
157
+ ->setLastRealOrderId($order->getIncrementId())
158
+ ->setOrderReferenceId(null);
159
 
160
  }
161
 
app/code/community/Creativestyle/AmazonPayments/Model/Config.php CHANGED
@@ -26,42 +26,57 @@ class Creativestyle_AmazonPayments_Model_Config {
26
  const XML_PATH_GENERAL_PAYMENT_ACTION = 'amazonpayments/general/payment_action';
27
  const XML_PATH_GENERAL_IPN_ACTIVE = 'amazonpayments/general/ipn_active';
28
  const XML_PATH_GENERAL_ORDER_STATUS = 'amazonpayments/general/authorized_order_status';
 
 
 
 
29
 
30
  const XML_PATH_EMAIL_ORDER_CONFIRMATION = 'amazonpayments/email/order_confirmation';
31
  const XML_PATH_EMAIL_DECLINED_TEMPLATE = 'amazonpayments/email/authorization_declined_template';
32
  const XML_PATH_EMAIL_DECLINED_IDENTITY = 'amazonpayments/email/authorization_declined_identity';
33
 
34
- const XML_PATH_DESIGN_BUTTON_SIZE = 'amazonpayments/design/button_size';
35
- const XML_PATH_DESIGN_BUTTON_COLOR = 'amazonpayments/design/button_color';
 
36
  const XML_PATH_DESIGN_ADDRESS_WIDTH = 'amazonpayments/design/address_width';
37
  const XML_PATH_DESIGN_ADDRESS_HEIGHT = 'amazonpayments/design/address_height';
38
  const XML_PATH_DESIGN_PAYMENT_WIDTH = 'amazonpayments/design/payment_width';
39
  const XML_PATH_DESIGN_PAYMENT_HEIGHT = 'amazonpayments/design/payment_height';
40
 
 
 
 
 
 
 
 
41
  const XML_PATH_DEVELOPER_ALLOWED_IPS = 'amazonpayments/developer/allowed_ips';
42
  const XML_PATH_DEVELOPER_LOG_ACTIVE = 'amazonpayments/developer/log_active';
43
 
44
- protected $_config = null;
 
 
 
45
  protected $_globalData = null;
46
  protected $_merchantValues = null;
47
 
48
- protected function _getConfig() {
49
- if (null === $this->_config) {
50
- $this->_config = array(
51
- 'merchantId' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_MERCHANT_ID)),
52
- 'accessKey' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_ACCESS_KEY)),
53
- 'secretKey' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_SECRET_KEY)),
54
  'applicationName' => 'Creativestyle Amazon Payments Advanced Magento Extension',
55
  'applicationVersion' => Mage::getConfig()->getNode('modules/Creativestyle_AmazonPayments/version'),
56
- 'region' => Mage::getStoreConfig(self::XML_PATH_ACCOUNT_REGION),
57
- 'environment' => Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_SANDBOX) ? 'sandbox' : 'live',
58
  'serviceURL' => '',
59
  'widgetURL' => '',
60
  'caBundleFile' => '',
61
  'clientId' => ''
62
  );
63
  }
64
- return $this->_config;
65
  }
66
 
67
  protected function _getGlobalData() {
@@ -71,15 +86,15 @@ class Creativestyle_AmazonPayments_Model_Config {
71
  return $this->_globalData;
72
  }
73
 
74
- public function getConnectionData($key = null) {
75
  if (null !== $key) {
76
- $config = $this->_getConfig();
77
  if (array_key_exists($key, $config)) {
78
  return $config[$key];
79
  }
80
  return null;
81
  }
82
- return $this->_getConfig();
83
  }
84
 
85
  public function getGlobalDataValue($key = null) {
@@ -93,84 +108,176 @@ class Creativestyle_AmazonPayments_Model_Config {
93
  return $this->_getGlobalData();
94
  }
95
 
96
- public function getMerchantValues() {
97
  if (null === $this->_merchantValues) {
98
  $this->_merchantValues = new OffAmazonPaymentsService_MerchantValues(
99
- $this->getConnectionData('merchantId'),
100
- $this->getConnectionData('accessKey'),
101
- $this->getConnectionData('secretKey'),
102
- $this->getConnectionData('applicationName'),
103
- $this->getConnectionData('applicationVersion'),
104
- $this->getConnectionData('region'),
105
- $this->getConnectionData('environment'),
106
- $this->getConnectionData('serviceURL'),
107
- $this->getConnectionData('widgetURL'),
108
- $this->getConnectionData('caBundleFile'),
109
- $this->getConnectionData('clientId')
110
  );
111
  }
112
  return $this->_merchantValues;
113
  }
114
 
115
- public function showSandboxToolbox() {
116
- return $this->getConnectionData('environment') == 'sandbox' && Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_SANDBOX_TOOLBOX);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
- public function getButtonColor() {
120
- return Mage::getStoreConfig(self::XML_PATH_DESIGN_BUTTON_COLOR);
 
 
 
 
 
 
 
 
121
  }
122
 
123
- public function getButtonSize() {
124
- return Mage::getStoreConfig(self::XML_PATH_DESIGN_BUTTON_SIZE);
 
 
 
 
 
 
 
 
125
  }
126
 
127
- public function getAddressBookWidgetSize() {
128
  return new Varien_Object(array(
129
- 'width' => Mage::getStoreConfig(self::XML_PATH_DESIGN_ADDRESS_WIDTH) . 'px',
130
- 'height' => Mage::getStoreConfig(self::XML_PATH_DESIGN_ADDRESS_HEIGHT) . 'px'
131
  ));
132
  }
133
 
134
- public function getWalletWidgetSize() {
135
  return new Varien_Object(array(
136
- 'width' => Mage::getStoreConfig(self::XML_PATH_DESIGN_PAYMENT_WIDTH) . 'px',
137
- 'height' => Mage::getStoreConfig(self::XML_PATH_DESIGN_PAYMENT_HEIGHT) . 'px'
138
  ));
139
  }
140
 
141
- public function authorizeImmediately() {
142
- return in_array(Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION), array(
143
  Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE,
144
  Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE_CAPTURE
145
  ));
146
  }
147
 
148
- public function captureImmediately() {
149
- return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION) == Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE_CAPTURE;
150
  }
151
 
152
- public function isManualAuthorizationAllowed() {
153
- return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION) == Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_MANUAL;
154
  }
155
 
156
- public function isPaymentProcessingAllowed() {
157
- return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION) != Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_ERP;
158
  }
159
 
160
- public function getAuthorizedOrderStatus() {
161
- return Mage::getStoreConfig(self::XML_PATH_GENERAL_ORDER_STATUS);
162
  }
163
 
164
- public function sendEmailConfirmation() {
165
- return Mage::getStoreConfigFlag(self::XML_PATH_EMAIL_ORDER_CONFIRMATION);
166
  }
167
 
168
- public function getAuthorizationDeclinedEmailTemplate() {
169
- return Mage::getStoreConfig(self::XML_PATH_EMAIL_DECLINED_TEMPLATE);
170
  }
171
 
172
- public function getAuthorizationDeclinedEmailIdentity() {
173
- return Mage::getStoreConfig(self::XML_PATH_EMAIL_DECLINED_IDENTITY);
174
  }
175
 
176
  public function getLogDelimiter() {
@@ -181,21 +288,8 @@ class Creativestyle_AmazonPayments_Model_Config {
181
  return '"';
182
  }
183
 
184
- /**
185
- * Checks if Pay with Amazon is enabled in the extension settings
186
- *
187
- * @return bool
188
- */
189
- public function isActive() {
190
- return Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_ACTIVE);
191
- }
192
-
193
- public function isIpnActive() {
194
- return Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_IPN_ACTIVE);
195
- }
196
-
197
- public function isCurrentIpAllowed() {
198
- $allowedIps = trim(Mage::getStoreConfig(self::XML_PATH_DEVELOPER_ALLOWED_IPS), ' ,');
199
  if ($allowedIps) {
200
  $allowedIps = explode(',', str_replace(' ', '', $allowedIps));
201
  if (is_array($allowedIps) && !empty($allowedIps)) {
@@ -209,13 +303,13 @@ class Creativestyle_AmazonPayments_Model_Config {
209
  return true;
210
  }
211
 
212
- public function isCurrentLocaleAllowed() {
213
  $currentLocale = Mage::app()->getLocale()->getLocaleCode();
214
  $language = strtolower($currentLocale);
215
  if (strpos($language, '_')) {
216
  $language = substr($language, 0, strpos($language, '_'));
217
  }
218
- switch ($this->getConnectionData('region')) {
219
  case 'de':
220
  return ($language == 'de');
221
  case 'uk':
@@ -226,8 +320,12 @@ class Creativestyle_AmazonPayments_Model_Config {
226
  }
227
  }
228
 
229
- public function isLogEnabled() {
230
- return Mage::getStoreConfigFlag(self::XML_PATH_DEVELOPER_LOG_ACTIVE);
 
 
 
 
231
  }
232
 
233
  }
26
  const XML_PATH_GENERAL_PAYMENT_ACTION = 'amazonpayments/general/payment_action';
27
  const XML_PATH_GENERAL_IPN_ACTIVE = 'amazonpayments/general/ipn_active';
28
  const XML_PATH_GENERAL_ORDER_STATUS = 'amazonpayments/general/authorized_order_status';
29
+ const XML_PATH_GENERAL_RECENT_POLLED_TXN = 'amazonpayments/general/recent_polled_transaction';
30
+
31
+ const XML_PATH_LOGIN_ACTIVE = 'amazonpayments/login/active';
32
+ const XML_PATH_LOGIN_CLIENT_ID = 'amazonpayments/login/client_id';
33
 
34
  const XML_PATH_EMAIL_ORDER_CONFIRMATION = 'amazonpayments/email/order_confirmation';
35
  const XML_PATH_EMAIL_DECLINED_TEMPLATE = 'amazonpayments/email/authorization_declined_template';
36
  const XML_PATH_EMAIL_DECLINED_IDENTITY = 'amazonpayments/email/authorization_declined_identity';
37
 
38
+ const XML_PATH_DESIGN_BUTTON_SIZE = 'amazonpayments/design_pay/button_size';
39
+ const XML_PATH_DESIGN_BUTTON_COLOR = 'amazonpayments/design_pay/button_color';
40
+
41
  const XML_PATH_DESIGN_ADDRESS_WIDTH = 'amazonpayments/design/address_width';
42
  const XML_PATH_DESIGN_ADDRESS_HEIGHT = 'amazonpayments/design/address_height';
43
  const XML_PATH_DESIGN_PAYMENT_WIDTH = 'amazonpayments/design/payment_width';
44
  const XML_PATH_DESIGN_PAYMENT_HEIGHT = 'amazonpayments/design/payment_height';
45
 
46
+ const XML_PATH_DESIGN_LOGIN_BUTTON_TYPE = 'amazonpayments/design_login/login_button_type';
47
+ const XML_PATH_DESIGN_LOGIN_BUTTON_SIZE = 'amazonpayments/design_login/login_button_size';
48
+ const XML_PATH_DESIGN_LOGIN_BUTTON_COLOR = 'amazonpayments/design_login/login_button_color';
49
+ const XML_PATH_DESIGN_PAY_BUTTON_TYPE = 'amazonpayments/design_login/pay_button_type';
50
+ const XML_PATH_DESIGN_PAY_BUTTON_SIZE = 'amazonpayments/design_login/pay_button_size';
51
+ const XML_PATH_DESIGN_PAY_BUTTON_COLOR = 'amazonpayments/design_login/pay_button_color';
52
+
53
  const XML_PATH_DEVELOPER_ALLOWED_IPS = 'amazonpayments/developer/allowed_ips';
54
  const XML_PATH_DEVELOPER_LOG_ACTIVE = 'amazonpayments/developer/log_active';
55
 
56
+ const PAY_WITH_AMAZON_ACTIVE = 1;
57
+ const LOGIN_WITH_AMAZON_ACTIVE = 2;
58
+
59
+ protected $_config = array();
60
  protected $_globalData = null;
61
  protected $_merchantValues = null;
62
 
63
+ protected function _getConfig($store = null) {
64
+ if (!array_key_exists($store, $this->_config)) {
65
+ $this->_config[$store] = array(
66
+ 'merchantId' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_MERCHANT_ID, $store)),
67
+ 'accessKey' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_ACCESS_KEY, $store)),
68
+ 'secretKey' => trim(Mage::getStoreConfig(self::XML_PATH_ACCOUNT_SECRET_KEY, $store)),
69
  'applicationName' => 'Creativestyle Amazon Payments Advanced Magento Extension',
70
  'applicationVersion' => Mage::getConfig()->getNode('modules/Creativestyle_AmazonPayments/version'),
71
+ 'region' => Mage::getStoreConfig(self::XML_PATH_ACCOUNT_REGION, $store),
72
+ 'environment' => Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_SANDBOX, $store) ? 'sandbox' : 'live',
73
  'serviceURL' => '',
74
  'widgetURL' => '',
75
  'caBundleFile' => '',
76
  'clientId' => ''
77
  );
78
  }
79
+ return $this->_config[$store];
80
  }
81
 
82
  protected function _getGlobalData() {
86
  return $this->_globalData;
87
  }
88
 
89
+ public function getConnectionData($key = null, $store = null) {
90
  if (null !== $key) {
91
+ $config = $this->_getConfig($store);
92
  if (array_key_exists($key, $config)) {
93
  return $config[$key];
94
  }
95
  return null;
96
  }
97
+ return $this->_getConfig($store);
98
  }
99
 
100
  public function getGlobalDataValue($key = null) {
108
  return $this->_getGlobalData();
109
  }
110
 
111
+ public function getMerchantValues($store = null) {
112
  if (null === $this->_merchantValues) {
113
  $this->_merchantValues = new OffAmazonPaymentsService_MerchantValues(
114
+ $this->getConnectionData('merchantId', $store),
115
+ $this->getConnectionData('accessKey', $store),
116
+ $this->getConnectionData('secretKey', $store),
117
+ $this->getConnectionData('applicationName', $store),
118
+ $this->getConnectionData('applicationVersion', $store),
119
+ $this->getConnectionData('region', $store),
120
+ $this->getConnectionData('environment', $store),
121
+ $this->getConnectionData('serviceURL', $store),
122
+ $this->getConnectionData('widgetURL', $store),
123
+ $this->getConnectionData('caBundleFile', $store),
124
+ $this->getConnectionData('clientId', $store)
125
  );
126
  }
127
  return $this->_merchantValues;
128
  }
129
 
130
+ public function isActive($store = null) {
131
+ $active = Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_ACTIVE, $store) ? self::PAY_WITH_AMAZON_ACTIVE : 0;
132
+ $active |= Mage::getStoreConfigFlag(self::XML_PATH_LOGIN_ACTIVE, $store) ? self::LOGIN_WITH_AMAZON_ACTIVE : 0;
133
+ return $active;
134
+ }
135
+
136
+ public function isIpnActive($store = null) {
137
+ return Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_IPN_ACTIVE, $store);
138
+ }
139
+
140
+ public function isLoggingActive($store = null) {
141
+ return Mage::getStoreConfigFlag(self::XML_PATH_DEVELOPER_LOG_ACTIVE, $store);
142
+ }
143
+
144
+ public function getMerchantId($store = null) {
145
+ return $this->getConnectionData('merchantId', $store);
146
+ }
147
+
148
+ public function getRegion($store = null) {
149
+ return $this->getConnectionData('region', $store);
150
+ }
151
+
152
+ public function getEnvironment($store = null) {
153
+ return $this->getConnectionData('environment', $store);
154
+ }
155
+
156
+ public function getClientId($store = null) {
157
+ return Mage::getStoreConfig(self::XML_PATH_LOGIN_CLIENT_ID, $store);
158
+ }
159
+
160
+ public function getWidgetUrl($store = null) {
161
+ if ($this->isActive() & self::LOGIN_WITH_AMAZON_ACTIVE) {
162
+ $widgetUrls = $this->getGlobalDataValue('login_widget_urls');
163
+ if (isset($widgetUrls[$this->getRegion($store)][$this->getEnvironment($store)])) {
164
+ return sprintf($widgetUrls[$this->getRegion($store)][$this->getEnvironment($store)] . '?sellerId=%s',
165
+ $this->getMerchantId($store)
166
+ );
167
+ }
168
+ } else if ($this->isActive()) {
169
+ return $this->getMerchantValues()->getWidgetUrl();
170
+ }
171
+ return null;
172
+ }
173
+
174
+ public function getButtonUrl($store = null) {
175
+ if (!($this->isActive() & self::LOGIN_WITH_AMAZON_ACTIVE)) {
176
+ $buttonUrls = $this->getGlobalDataValue('button_urls');
177
+ if (isset($buttonUrls[$this->getRegion($store)][$this->getEnvironment($store)])) {
178
+ return sprintf($buttonUrls[$this->getRegion($store)][$this->getEnvironment($store)] . '?sellerId=%s&amp;size=%s&amp;color=%s',
179
+ $this->getMerchantId($store),
180
+ $this->getButtonSize($store),
181
+ $this->getButtonColor($store)
182
+ );
183
+ }
184
+ }
185
+ return null;
186
+ }
187
+
188
+ public function getLoginApiUrl($store = null) {
189
+ $apiUrls = $this->getGlobalDataValue('login_api_urls');
190
+ if (isset($apiUrls[$this->getRegion($store)][$this->getEnvironment($store)])) {
191
+ return $apiUrls[$this->getRegion($store)][$this->getEnvironment($store)];
192
+ }
193
+ return '';
194
+ }
195
+
196
+ public function showSandboxToolbox($store = null) {
197
+ return $this->getEnvironment($store) == 'sandbox' && Mage::getStoreConfigFlag(self::XML_PATH_GENERAL_SANDBOX_TOOLBOX, $store);
198
+ }
199
+
200
+
201
+ public function getButtonType($store = null, $serviceType = null) {
202
+ switch (strtolower($serviceType)) {
203
+ case 'login':
204
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_LOGIN_BUTTON_TYPE, $store);
205
+ default:
206
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_PAY_BUTTON_TYPE, $store);
207
+ }
208
  }
209
 
210
+ public function getButtonColor($store = null, $serviceType = null) {
211
+ if ($this->isActive() & self::LOGIN_WITH_AMAZON_ACTIVE) {
212
+ switch (strtolower($serviceType)) {
213
+ case 'login':
214
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_LOGIN_BUTTON_COLOR, $store);
215
+ default:
216
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_PAY_BUTTON_COLOR, $store);
217
+ }
218
+ }
219
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_BUTTON_COLOR, $store);
220
  }
221
 
222
+ public function getButtonSize($store = null, $serviceType = null) {
223
+ if ($this->isActive() & self::LOGIN_WITH_AMAZON_ACTIVE) {
224
+ switch (strtolower($serviceType)) {
225
+ case 'login':
226
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_LOGIN_BUTTON_SIZE, $store);
227
+ default:
228
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_PAY_BUTTON_SIZE, $store);
229
+ }
230
+ }
231
+ return Mage::getStoreConfig(self::XML_PATH_DESIGN_BUTTON_SIZE, $store);
232
  }
233
 
234
+ public function getAddressBookWidgetSize($store = null) {
235
  return new Varien_Object(array(
236
+ 'width' => Mage::getStoreConfig(self::XML_PATH_DESIGN_ADDRESS_WIDTH, $store) . 'px',
237
+ 'height' => Mage::getStoreConfig(self::XML_PATH_DESIGN_ADDRESS_HEIGHT, $store) . 'px'
238
  ));
239
  }
240
 
241
+ public function getWalletWidgetSize($store = null) {
242
  return new Varien_Object(array(
243
+ 'width' => Mage::getStoreConfig(self::XML_PATH_DESIGN_PAYMENT_WIDTH, $store) . 'px',
244
+ 'height' => Mage::getStoreConfig(self::XML_PATH_DESIGN_PAYMENT_HEIGHT, $store) . 'px'
245
  ));
246
  }
247
 
248
+ public function authorizeImmediately($store = null) {
249
+ return in_array(Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION, $store), array(
250
  Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE,
251
  Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE_CAPTURE
252
  ));
253
  }
254
 
255
+ public function captureImmediately($store = null) {
256
+ return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION, $store) == Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_AUTHORIZE_CAPTURE;
257
  }
258
 
259
+ public function isManualAuthorizationAllowed($store = null) {
260
+ return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION, $store) == Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_MANUAL;
261
  }
262
 
263
+ public function isPaymentProcessingAllowed($store = null) {
264
+ return Mage::getStoreConfig(self::XML_PATH_GENERAL_PAYMENT_ACTION, $store) != Creativestyle_AmazonPayments_Model_Payment_Abstract::ACTION_ERP;
265
  }
266
 
267
+ public function getAuthorizedOrderStatus($store = null) {
268
+ return Mage::getStoreConfig(self::XML_PATH_GENERAL_ORDER_STATUS, $store);
269
  }
270
 
271
+ public function sendEmailConfirmation($store = null) {
272
+ return Mage::getStoreConfigFlag(self::XML_PATH_EMAIL_ORDER_CONFIRMATION, $store);
273
  }
274
 
275
+ public function getAuthorizationDeclinedEmailTemplate($store = null) {
276
+ return Mage::getStoreConfig(self::XML_PATH_EMAIL_DECLINED_TEMPLATE, $store);
277
  }
278
 
279
+ public function getAuthorizationDeclinedEmailIdentity($store = null) {
280
+ return Mage::getStoreConfig(self::XML_PATH_EMAIL_DECLINED_IDENTITY, $store);
281
  }
282
 
283
  public function getLogDelimiter() {
288
  return '"';
289
  }
290
 
291
+ public function isCurrentIpAllowed($store = null) {
292
+ $allowedIps = trim(Mage::getStoreConfig(self::XML_PATH_DEVELOPER_ALLOWED_IPS, $store), ' ,');
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  if ($allowedIps) {
294
  $allowedIps = explode(',', str_replace(' ', '', $allowedIps));
295
  if (is_array($allowedIps) && !empty($allowedIps)) {
303
  return true;
304
  }
305
 
306
+ public function isCurrentLocaleAllowed($store = null) {
307
  $currentLocale = Mage::app()->getLocale()->getLocaleCode();
308
  $language = strtolower($currentLocale);
309
  if (strpos($language, '_')) {
310
  $language = substr($language, 0, strpos($language, '_'));
311
  }
312
+ switch ($this->getRegion($store)) {
313
  case 'de':
314
  return ($language == 'de');
315
  case 'uk':
320
  }
321
  }
322
 
323
+ public function getRecentPolledTransaction() {
324
+ return Mage::getStoreConfig(self::XML_PATH_GENERAL_RECENT_POLLED_TXN);
325
+ }
326
+
327
+ public function setRecentPolledTransaction($txnId) {
328
+ Mage::getConfig()->saveConfig(self::XML_PATH_GENERAL_RECENT_POLLED_TXN, $txnId)->cleanCache();
329
  }
330
 
331
  }
app/code/community/Creativestyle/AmazonPayments/Model/Logger.php CHANGED
@@ -64,7 +64,7 @@ final class Creativestyle_AmazonPayments_Model_Logger {
64
  * @param array $callData
65
  */
66
  public static function logApiCall($callData) {
67
- if (self::_getConfig()->isLogEnabled()) {
68
  array_unshift($callData, Mage::getModel('core/date')->gmtTimestamp());
69
  if (($fileHandle = fopen(self::getAbsoluteLogFilePath('api'), 'a')) !== false) {
70
  fputcsv($fileHandle, $callData, self::_getConfig()->getLogDelimiter(), self::_getConfig()->getLogEnclosure());
@@ -81,7 +81,7 @@ final class Creativestyle_AmazonPayments_Model_Logger {
81
  * @param array $callData
82
  */
83
  public static function logIpnCall($callData) {
84
- if (self::_getConfig()->isLogEnabled()) {
85
  array_unshift($callData, Mage::getModel('core/date')->gmtTimestamp());
86
  $callData['message_xml'] = '';
87
  if (isset($callData['request_body']) && $callData['request_body']) {
@@ -114,7 +114,7 @@ final class Creativestyle_AmazonPayments_Model_Logger {
114
  * @param Exception $e
115
  */
116
  public static function logException(Exception $e) {
117
- if (self::_getConfig()->isLogEnabled()) {
118
  if (($fileHandle = fopen(self::getAbsoluteLogFilePath('exception'), 'a')) !== false) {
119
  $exceptionData = array(
120
  'timestamp' => Mage::getModel('core/date')->gmtTimestamp(),
64
  * @param array $callData
65
  */
66
  public static function logApiCall($callData) {
67
+ if (self::_getConfig()->isLoggingActive()) {
68
  array_unshift($callData, Mage::getModel('core/date')->gmtTimestamp());
69
  if (($fileHandle = fopen(self::getAbsoluteLogFilePath('api'), 'a')) !== false) {
70
  fputcsv($fileHandle, $callData, self::_getConfig()->getLogDelimiter(), self::_getConfig()->getLogEnclosure());
81
  * @param array $callData
82
  */
83
  public static function logIpnCall($callData) {
84
+ if (self::_getConfig()->isLoggingActive()) {
85
  array_unshift($callData, Mage::getModel('core/date')->gmtTimestamp());
86
  $callData['message_xml'] = '';
87
  if (isset($callData['request_body']) && $callData['request_body']) {
114
  * @param Exception $e
115
  */
116
  public static function logException(Exception $e) {
117
+ if (self::_getConfig()->isLoggingActive()) {
118
  if (($fileHandle = fopen(self::getAbsoluteLogFilePath('exception'), 'a')) !== false) {
119
  $exceptionData = array(
120
  'timestamp' => Mage::getModel('core/date')->gmtTimestamp(),
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Color.php CHANGED
@@ -24,7 +24,6 @@ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Color extends Crea
24
  array('value' => self::COLOR_ORANGE, 'label' => Mage::helper('amazonpayments')->__('Orange (recommended)')),
25
  array('value' => self::COLOR_TAN, 'label' => Mage::helper('amazonpayments')->__('Tan')),
26
  );
27
-
28
  }
29
  return $this->_options;
30
  }
24
  array('value' => self::COLOR_ORANGE, 'label' => Mage::helper('amazonpayments')->__('Orange (recommended)')),
25
  array('value' => self::COLOR_TAN, 'label' => Mage::helper('amazonpayments')->__('Tan')),
26
  );
 
27
  }
28
  return $this->_options;
29
  }
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Color/LoginPay.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Color_LoginPay extends Creativestyle_AmazonPayments_Model_Lookup_Abstract {
17
+
18
+ const COLOR_GOLD = 'Gold';
19
+ const COLOR_DARK_GRAY = 'DarkGray';
20
+ const COLOR_LIGHT_GRAY= 'LightGray';
21
+
22
+ public function toOptionArray() {
23
+ if (null === $this->_options) {
24
+ $this->_options = array(
25
+ array('value' => self::COLOR_GOLD, 'label' => Mage::helper('amazonpayments')->__('Gold')),
26
+ array('value' => self::COLOR_DARK_GRAY, 'label' => Mage::helper('amazonpayments')->__('Dark gray')),
27
+ array('value' => self::COLOR_LIGHT_GRAY, 'label' => Mage::helper('amazonpayments')->__('Light gray'))
28
+ );
29
+ }
30
+ return $this->_options;
31
+ }
32
+
33
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Size.php CHANGED
@@ -22,9 +22,9 @@ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Size extends Creat
22
  public function toOptionArray() {
23
  if (null === $this->_options) {
24
  $this->_options = array(
25
- array('value' => self::SIZE_MEDIUM, 'label' => Mage::helper('amazonpayments')->__('Medium (126 x 24 pixels)')),
26
- array('value' => self::SIZE_LARGE, 'label' => Mage::helper('amazonpayments')->__('Large (151 x 27 pixels)')),
27
- array('value' => self::SIZE_XLARGE, 'label' => Mage::helper('amazonpayments')->__('X-Large (173 x 27 pixels)'))
28
  );
29
  }
30
  return $this->_options;
22
  public function toOptionArray() {
23
  if (null === $this->_options) {
24
  $this->_options = array(
25
+ array('value' => self::SIZE_MEDIUM, 'label' => Mage::helper('amazonpayments')->__('Medium')),
26
+ array('value' => self::SIZE_LARGE, 'label' => Mage::helper('amazonpayments')->__('Large')),
27
+ array('value' => self::SIZE_XLARGE, 'label' => Mage::helper('amazonpayments')->__('X-Large'))
28
  );
29
  }
30
  return $this->_options;
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Size/LoginPay.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Size_LoginPay extends Creativestyle_AmazonPayments_Model_Lookup_Abstract {
17
+
18
+ const SIZE_SMALL = 'small';
19
+ const SIZE_MEDIUM = 'medium';
20
+ const SIZE_LARGE = 'large';
21
+ const SIZE_XLARGE = 'x-large';
22
+
23
+ public function toOptionArray() {
24
+ if (null === $this->_options) {
25
+ $this->_options = array(
26
+ array('value' => self::SIZE_SMALL, 'label' => Mage::helper('amazonpayments')->__('Small')),
27
+ array('value' => self::SIZE_MEDIUM, 'label' => Mage::helper('amazonpayments')->__('Medium')),
28
+ array('value' => self::SIZE_LARGE, 'label' => Mage::helper('amazonpayments')->__('Large')),
29
+ array('value' => self::SIZE_XLARGE, 'label' => Mage::helper('amazonpayments')->__('X-Large'))
30
+ );
31
+ }
32
+ return $this->_options;
33
+ }
34
+
35
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Type/Login.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Type_Login extends Creativestyle_AmazonPayments_Model_Lookup_Abstract {
17
+
18
+ const TYPE_FULL = 'LwA';
19
+ const TYPE_SHORT = 'Login';
20
+ const TYPE_LOGO = 'A';
21
+
22
+ public function toOptionArray() {
23
+ if (null === $this->_options) {
24
+ $this->_options = array(
25
+ array('value' => self::TYPE_FULL, 'label' => Mage::helper('amazonpayments')->__('Login with Amazon')),
26
+ array('value' => self::TYPE_SHORT, 'label' => Mage::helper('amazonpayments')->__('Login')),
27
+ array('value' => self::TYPE_LOGO, 'label' => Mage::helper('amazonpayments')->__('Amazon logo'))
28
+ );
29
+ }
30
+ return $this->_options;
31
+ }
32
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Lookup/Design/Button/Type/Pay.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Lookup_Design_Button_Type_Pay extends Creativestyle_AmazonPayments_Model_Lookup_Abstract {
17
+
18
+ const TYPE_FULL = 'PwA';
19
+ const TYPE_SHORT = 'Pay';
20
+ const TYPE_LOGO = 'A';
21
+
22
+ public function toOptionArray() {
23
+ if (null === $this->_options) {
24
+ $this->_options = array(
25
+ array('value' => self::TYPE_FULL, 'label' => Mage::helper('amazonpayments')->__('Pay with Amazon')),
26
+ array('value' => self::TYPE_SHORT, 'label' => Mage::helper('amazonpayments')->__('Pay')),
27
+ array('value' => self::TYPE_LOGO, 'label' => Mage::helper('amazonpayments')->__('Amazon logo'))
28
+ );
29
+ }
30
+ return $this->_options;
31
+ }
32
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Manager.php CHANGED
@@ -170,14 +170,9 @@ class Creativestyle_AmazonPayments_Model_Manager {
170
  protected function _convertAmazonAddressToArray($amazonAddress) {
171
  $address = array('street' => array());
172
  if ($amazonAddress->isSetName()) {
173
- $recipientName = explode(' ', trim($amazonAddress->getName()));
174
- if (count($recipientName) > 1) {
175
- $address['firstname'] = reset($recipientName);
176
- $address['lastname'] = trim(str_replace($address['firstname'], "", $amazonAddress->getName()));
177
- } else {
178
- $address['firstname'] = Mage::helper('amazonpayments')->__('n/a');
179
- $address['lastname'] = reset($recipientName);
180
- }
181
  }
182
  if ($amazonAddress->isSetAddressLine1()) {
183
  $address['street'][] = $amazonAddress->getAddressLine1();
@@ -215,6 +210,23 @@ class Creativestyle_AmazonPayments_Model_Manager {
215
  * @param OffAmazonPaymentsService_Model_Status|OffAmazonPaymentsNotifications_Model_Status $transactionStatus
216
  * @return Mage_Sales_Model_Order_Payment_Transaction
217
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  protected function _updateTransactionStatus($transaction, $transactionStatus) {
219
  if ($transactionStatus->isSetState()) {
220
  $statusArray = array('State' => $transactionStatus->getState());
@@ -229,6 +241,7 @@ class Creativestyle_AmazonPayments_Model_Manager {
229
  }
230
  return $transaction;
231
  }
 
232
 
233
  /**
234
  *
@@ -275,62 +288,61 @@ class Creativestyle_AmazonPayments_Model_Manager {
275
  * @param OffAmazonPaymentsService_Model_OrderReferenceDetails|OffAmazonPaymentsNotifications_Model_OrderReference $orderReferenceDetails
276
  */
277
  protected function _handleOpenOrderReference($payment, $transaction, $orderReferenceDetails) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
 
279
- $order = $payment->getOrder();
280
- $orderUpdated = false;
281
-
282
- // lookup for the transaction if not provided explicitly
283
- if (null === $transaction) {
284
- $transaction = $payment->lookupTransaction(
285
- $orderReferenceDetails->getAmazonOrderReferenceId(), Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER
286
- );
287
- }
 
 
 
 
 
 
288
 
289
- if ($transaction && $orderReferenceDetails->isSetOrderReferenceStatus()) {
290
- $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus());
291
- }
292
 
293
- // depending on the data source, some fields may be not available, process below section
294
- // only for responses to GetOrderReferenceDetails calls, skip for OrderReference notifications
295
- if ($orderReferenceDetails instanceof OffAmazonPaymentsService_Model_OrderReferenceDetails) {
296
- if ($orderReferenceDetails->isSetBuyer()) {
297
- if ($orderReferenceDetails->getBuyer()->isSetEmail()) {
298
- $orderUpdated = $this->_updateCustomerEmail($order, $orderReferenceDetails->getBuyer()->getEmail()) || $orderUpdated;
299
  }
300
- }
301
 
302
- if ($orderReferenceDetails->isSetDestination()) {
303
- if ($orderReferenceDetails->getDestination()->isSetPhysicalDestination()) {
304
- $shippingAddress = $this->_convertAmazonAddressToArray($orderReferenceDetails->getDestination()->getPhysicalDestination());
305
- if (isset($shippingAddress['firstname']) && isset($shippingAddress['lastname'])) {
306
- $customerName = array(
307
- 'firstname' => $shippingAddress['firstname'],
308
- 'lastname' => $shippingAddress['lastname']
309
- );
310
- $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
311
- }
312
- $orderUpdated = $this->_updateOrderAddress($order->getBillingAddress(), $shippingAddress) || $orderUpdated;
313
- $orderUpdated = $this->_updateOrderAddress($order->getShippingAddress(), $shippingAddress) || $orderUpdated;
314
  }
315
- }
316
- }
317
 
318
- $this->_addHistoryComment($order, $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState());
 
 
319
 
320
- /*
321
- $transactionSave = Mage::getModel('core/resource_transaction');
322
- $transactionSave->addObject($transaction);
323
- $transactionSave->addObject($order);
324
- $transactionSave->addCommitCallback(array($order, 'save'));
325
- */
326
- // check if authorization should be re-submitted
327
- $authTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
328
- if ($authTransaction && $authTransaction->getIsClosed() && ($order->getBaseTotalDue() > 0)) {
329
- $payment->authorize(true, $order->getBaseTotalDue())->save();
330
- // $transactionSave->addObject($payment);
331
  }
332
-
333
- $order->save();
334
  }
335
 
336
  /**
@@ -342,10 +354,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
342
  */
343
  protected function _handleSuspendedOrderReference($payment, $transaction, $orderReferenceDetails) {
344
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
345
- $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus())->save();
 
 
 
 
346
  }
347
-
348
- $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
349
  }
350
 
351
  /**
@@ -357,10 +372,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
357
  */
358
  protected function _handleCanceledOrderReference($payment, $transaction, $orderReferenceDetails) {
359
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
360
- $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus())->setIsClosed(true)->save();
 
 
 
 
361
  }
362
-
363
- $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
364
  }
365
 
366
  /**
@@ -372,10 +390,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
372
  */
373
  protected function _handleClosedOrderReference($payment, $transaction, $orderReferenceDetails) {
374
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
375
- $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus())->setIsClosed(true)->save();
 
 
 
 
376
  }
377
-
378
- $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
379
  }
380
 
381
 
@@ -392,8 +413,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
392
  */
393
  protected function _handlePendingAuthorization($payment, $transaction, $authorizationDetails) {
394
  if ($authorizationDetails->isSetAuthorizationStatus()) {
395
- $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus())->save();
 
 
 
 
396
  }
 
397
  }
398
 
399
  /**
@@ -404,62 +430,66 @@ class Creativestyle_AmazonPayments_Model_Manager {
404
  * @param OffAmazonPaymentsService_Model_AuthorizationDetails|OffAmazonPaymentsNotifications_Model_AuthorizationDetails $authorizationDetails
405
  */
406
  protected function _handleOpenAuthorization($payment, $transaction, $authorizationDetails) {
407
-
408
- $order = $payment->getOrder();
409
- $orderUpdated = false;
410
-
411
  if ($authorizationDetails->isSetAuthorizationStatus()) {
412
- $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus());
413
- }
414
-
415
- if ($authorizationDetails->isSetAuthorizationBillingAddress()) {
416
- $billingAddress = $this->_convertAmazonAddressToArray($authorizationDetails->getAuthorizationBillingAddress());
417
- if (isset($billingAddress['firstname']) && isset($billingAddress['lastname'])) {
418
- $customerName = array(
419
- 'firstname' => $billingAddress['firstname'],
420
- 'lastname' => $billingAddress['lastname']
421
- );
422
- $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
423
- }
 
 
 
 
 
424
 
425
- $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
426
- $orderUpdated = $this->_updateOrderAddress($order->getBillingAddress(), $billingAddress) || $orderUpdated;
427
- }
 
 
 
 
 
 
 
 
 
 
428
 
429
- if ($order->getStatus() != $this->_getConfig()->getAuthorizedOrderStatus()) {
430
- $order->setState(
431
- Mage_Sales_Model_Order::STATE_PROCESSING,
432
- $this->_getConfig()->getAuthorizedOrderStatus(),
433
- Mage::helper('amazonpayments')->__('An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.',
434
- $order->getStore()->convertPrice($authorizationDetails->getAuthorizationAmount()->getAmount(), true, false),
435
- $authorizationDetails->getAmazonAuthorizationId(),
436
- strtoupper($authorizationDetails->getAuthorizationStatus()->getState())
437
- ), Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE
438
- );
439
- $orderUpdated = true;
440
- }
441
 
442
- $transactionSave = Mage::getModel('core/resource_transaction');
443
- $transactionSave->addObject($transaction);
444
- if ($orderUpdated) {
445
- $transactionSave->addObject($order);
446
- $transactionSave->addCommitCallback(array($order, 'save'));
447
- }
 
 
448
 
449
- if ($this->_getConfig()->captureImmediately() && $order->canInvoice()) {
450
- $invoice = $order->prepareInvoice()
451
- ->register()
452
- ->capture();
453
- $invoice->setTransactionId($authorizationDetails->getAmazonAuthorizationId());
454
- $transactionSave->addObject($invoice);
455
- }
456
 
457
- $transactionSave->save();
 
 
458
 
459
- if (!$order->getEmailSent() && $this->_getConfig()->sendEmailConfirmation()) {
460
- $order->sendNewOrderEmail();
461
  }
462
-
463
  }
464
 
465
  /**
@@ -471,12 +501,16 @@ class Creativestyle_AmazonPayments_Model_Manager {
471
  */
472
  protected function _handleDeclinedAuthorization($payment, $transaction, $authorizationDetails) {
473
  if ($authorizationDetails->isSetAuthorizationStatus()) {
474
- $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus())->setIsClosed(true)->save();
475
- if ($authorizationDetails->getAuthorizationStatus()->getReasonCode() == 'InvalidPaymentMethod') {
476
- Mage::helper('amazonpayments')->sendAuthorizationDeclinedEmail($payment, $authorizationDetails);
 
 
 
477
  }
 
478
  }
479
- $this->_addHistoryComment($payment->getOrder(), $transaction, $authorizationDetails->getAuthorizationAmount()->getAmount(), $authorizationDetails->getAuthorizationStatus()->getState())->setIsCustomerNotified(true)->save();
480
  }
481
 
482
  /**
@@ -488,10 +522,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
488
  */
489
  protected function _handleClosedAuthorization($payment, $transaction, $authorizationDetails) {
490
  if ($authorizationDetails->isSetAuthorizationStatus()) {
491
- $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus())->setIsClosed(true)->save();
 
 
 
 
492
  }
493
-
494
- $this->_addHistoryComment($payment->getOrder(), $transaction, $authorizationDetails->getAuthorizationAmount()->getAmount(), $authorizationDetails->getAuthorizationStatus()->getState())->save();
495
  }
496
 
497
 
@@ -508,8 +545,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
508
  */
509
  protected function _handlePendingCapture($payment, $transaction, $captureDetails) {
510
  if ($captureDetails->isSetCaptureStatus()) {
511
- $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus())->save();
 
 
 
 
512
  }
 
513
  }
514
 
515
  /**
@@ -521,9 +563,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
521
  */
522
  protected function _handleDeclinedCapture($payment, $transaction, $captureDetails) {
523
  if ($captureDetails->isSetCaptureStatus()) {
524
- $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus())->setIsClosed(true)->save();
 
 
 
 
525
  }
526
- $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
527
  }
528
 
529
  /**
@@ -535,9 +581,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
535
  */
536
  protected function _handleCompletedCapture($payment, $transaction, $captureDetails) {
537
  if ($captureDetails->isSetCaptureStatus()) {
538
- $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus())->setIsClosed(true)->save();
 
 
 
 
539
  }
540
- $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
541
  }
542
 
543
  /**
@@ -549,9 +599,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
549
  */
550
  protected function _handleClosedCapture($payment, $transaction, $captureDetails) {
551
  if ($captureDetails->isSetCaptureStatus()) {
552
- $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus())->setIsClosed(true)->save();
 
 
 
 
553
  }
554
- $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
555
  }
556
 
557
 
@@ -568,8 +622,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
568
  */
569
  protected function _handlePendingRefund($payment, $transaction, $refundDetails) {
570
  if ($refundDetails->isSetRefundStatus()) {
571
- $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus())->save();
 
 
 
 
572
  }
 
573
  }
574
 
575
  /**
@@ -581,9 +640,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
581
  */
582
  protected function _handleDeclinedRefund($payment, $transaction, $refundDetails) {
583
  if ($refundDetails->isSetRefundStatus()) {
584
- $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus())->setIsClosed(true)->save();
 
 
 
 
585
  }
586
- $this->_addHistoryComment($payment->getOrder(), $transaction, $refundDetails->getRefundAmount()->getAmount(), $refundDetails->getRefundStatus()->getState())->save();
587
  }
588
 
589
  /**
@@ -595,9 +658,13 @@ class Creativestyle_AmazonPayments_Model_Manager {
595
  */
596
  protected function _handleCompletedRefund($payment, $transaction, $refundDetails) {
597
  if ($refundDetails->isSetRefundStatus()) {
598
- $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus())->setIsClosed(true)->save();
 
 
 
 
599
  }
600
- $this->_addHistoryComment($payment->getOrder(), $transaction, $refundDetails->getRefundAmount()->getAmount(), $refundDetails->getRefundStatus()->getState())->save();
601
  }
602
 
603
 
@@ -615,34 +682,30 @@ class Creativestyle_AmazonPayments_Model_Manager {
615
  public function importTransactionDetails($payment, $transaction) {
616
  switch ($transaction->getTxnType()) {
617
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER:
618
- $this->importOrderReferenceDetails(
619
- $this->_getApi()->getOrderReferenceDetails($transaction->getTxnId()),
620
  $payment,
621
  $transaction
622
  );
623
- break;
624
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH:
625
- $this->importAuthorizationDetails(
626
- $this->_getApi()->getAuthorizationDetails($transaction->getTxnId()),
627
  $payment,
628
  $transaction,
629
  false
630
  );
631
- break;
632
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE:
633
- $this->importCaptureDetails(
634
- $this->_getApi()->getCaptureDetails($transaction->getTxnId()),
635
  $payment,
636
  $transaction
637
  );
638
- break;
639
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND:
640
- $this->importRefundDetails(
641
- $this->_getApi()->getRefundDetails($transaction->getTxnId()),
642
  $payment,
643
  $transaction
644
  );
645
- break;
646
  }
647
  return null;
648
  }
@@ -673,21 +736,18 @@ class Creativestyle_AmazonPayments_Model_Manager {
673
  if ($orderReferenceStatus->isSetState()) {
674
  switch (strtolower($orderReferenceStatus->getState())) {
675
  case 'open':
676
- $this->_handleOpenOrderReference($payment, $transaction, $orderReferenceDetails);
677
- break;
678
  case 'suspended':
679
- $this->_handleSuspendedOrderReference($payment, $transaction, $orderReferenceDetails);
680
- break;
681
  case 'canceled':
682
- $this->_handleCanceledOrderReference($payment, $transaction, $orderReferenceDetails);
683
- break;
684
  case 'closed':
685
- $this->_handleClosedOrderReference($payment, $transaction, $orderReferenceDetails);
686
- break;
687
  }
688
  }
689
  }
690
  }
 
691
  }
692
 
693
  /**
@@ -718,24 +778,21 @@ class Creativestyle_AmazonPayments_Model_Manager {
718
  if ($authorizationStatus->isSetState()) {
719
  switch (strtolower($authorizationStatus->getState())) {
720
  case 'pending':
721
- $this->_handlePendingAuthorization($payment, $transaction, $authorizationDetails);
722
- break;
723
  case 'open':
724
  if ($refetchDetails) {
725
  $authorizationDetails = $this->_getApi()->getAuthorizationDetails($authorizationDetails->getAmazonAuthorizationId());
726
  }
727
- $this->_handleOpenAuthorization($payment, $transaction, $authorizationDetails);
728
- break;
729
  case 'declined':
730
- $this->_handleDeclinedAuthorization($payment, $transaction, $authorizationDetails);
731
- break;
732
  case 'closed':
733
- $this->_handleClosedAuthorization($payment, $transaction, $authorizationDetails);
734
- break;
735
  }
736
  }
737
  }
738
  }
 
739
  }
740
 
741
  /**
@@ -765,21 +822,18 @@ class Creativestyle_AmazonPayments_Model_Manager {
765
  if ($captureStatus->isSetState()) {
766
  switch (strtolower($captureStatus->getState())) {
767
  case 'pending':
768
- $this->_handlePendingCapture($payment, $transaction, $captureDetails);
769
- break;
770
  case 'declined':
771
- $this->_handleDeclinedCapture($payment, $transaction, $captureDetails);
772
- break;
773
  case 'completed':
774
- $this->_handleCompletedCapture($payment, $transaction, $captureDetails);
775
- break;
776
  case 'closed':
777
- $this->_handleClosedCapture($payment, $transaction, $captureDetails);
778
- break;
779
  }
780
  }
781
  }
782
  }
 
783
  }
784
 
785
  /**
@@ -809,18 +863,16 @@ class Creativestyle_AmazonPayments_Model_Manager {
809
  if ($refundStatus->isSetState()) {
810
  switch (strtolower($refundStatus->getState())) {
811
  case 'pending':
812
- $this->_handlePendingRefund($payment, $transaction, $refundDetails);
813
- break;
814
  case 'declined':
815
- $this->_handleDeclinedRefund($payment, $transaction, $refundDetails);
816
- break;
817
  case 'completed':
818
- $this->_handleCompletedRefund($payment, $transaction, $refundDetails);
819
- break;
820
  }
821
  }
822
  }
823
  }
 
824
  }
825
 
826
  /**
@@ -833,28 +885,83 @@ class Creativestyle_AmazonPayments_Model_Manager {
833
  switch ($notification->getNotificationType()) {
834
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_ORDER_REFERENCE:
835
  if ($notification->isSetOrderReference()) {
836
- $this->importOrderReferenceDetails($notification->getOrderReference());
 
 
 
 
 
 
 
 
 
 
 
 
 
837
  } else {
838
  throw new Creativestyle_AmazonPayments_Exception('OrderReference field not found in submitted notification');
839
  }
840
  break;
841
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_AUTHORIZATION:
842
  if ($notification->isSetAuthorizationDetails()) {
843
- $this->importAuthorizationDetails($notification->getAuthorizationDetails());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
844
  } else {
845
  throw new Creativestyle_AmazonPayments_Exception('AuthorizationDetails field not found in submitted notification');
846
  }
847
  break;
848
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_CAPTURE:
849
  if ($notification->isSetCaptureDetails()) {
850
- $this->importCaptureDetails($notification->getCaptureDetails());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
851
  } else {
852
  throw new Creativestyle_AmazonPayments_Exception('CaptureDetails field not found in submitted notification');
853
  }
854
  break;
855
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_REFUND:
856
  if ($notification->isSetRefundDetails()) {
857
- $this->importRefundDetails($notification->getRefundDetails());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
858
  } else {
859
  throw new Creativestyle_AmazonPayments_Exception('RefundDetails field not found in submitted notification');
860
  }
@@ -868,4 +975,3 @@ class Creativestyle_AmazonPayments_Model_Manager {
868
  }
869
 
870
  }
871
-
170
  protected function _convertAmazonAddressToArray($amazonAddress) {
171
  $address = array('street' => array());
172
  if ($amazonAddress->isSetName()) {
173
+ $customerName = Mage::helper('amazonpayments')->explodeCustomerName($amazonAddress->getName());
174
+ $address['firstname'] = $customerName->getFirstname();
175
+ $address['lastname'] = $customerName->getLastname();
 
 
 
 
 
176
  }
177
  if ($amazonAddress->isSetAddressLine1()) {
178
  $address['street'][] = $amazonAddress->getAddressLine1();
210
  * @param OffAmazonPaymentsService_Model_Status|OffAmazonPaymentsNotifications_Model_Status $transactionStatus
211
  * @return Mage_Sales_Model_Order_Payment_Transaction
212
  */
213
+ protected function _updateTransactionStatus($transaction, $transactionStatus) {
214
+ if ($transactionStatus->isSetState()) {
215
+ if (Mage::helper('amazonpayments')->getTransactionStatus($transaction) != $transactionStatus->getState()) {
216
+ $statusArray = array('State' => $transactionStatus->getState());
217
+ if ($transactionStatus->isSetReasonCode()) {
218
+ $statusArray['ReasonCode'] = $transactionStatus->getReasonCode();
219
+ }
220
+ if ($transactionStatus->isSetReasonDescription()) {
221
+ $statusArray['ReasonDescription'] = $transactionStatus->getReasonDescription();
222
+ }
223
+ return $statusArray;
224
+ }
225
+ }
226
+ return null;
227
+ }
228
+
229
+ /*
230
  protected function _updateTransactionStatus($transaction, $transactionStatus) {
231
  if ($transactionStatus->isSetState()) {
232
  $statusArray = array('State' => $transactionStatus->getState());
241
  }
242
  return $transaction;
243
  }
244
+ */
245
 
246
  /**
247
  *
288
  * @param OffAmazonPaymentsService_Model_OrderReferenceDetails|OffAmazonPaymentsNotifications_Model_OrderReference $orderReferenceDetails
289
  */
290
  protected function _handleOpenOrderReference($payment, $transaction, $orderReferenceDetails) {
291
+ if ($transaction && $orderReferenceDetails->isSetOrderReferenceStatus()) {
292
+ $newStatus = $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus());
293
+ if (null !== $newStatus) {
294
+ $order = $payment->getOrder();
295
+ $orderUpdated = false;
296
+
297
+ // depending on the data source, some fields may be not available, process below section
298
+ // only for responses to GetOrderReferenceDetails calls, skip for OrderReference notifications
299
+ if ($orderReferenceDetails instanceof OffAmazonPaymentsService_Model_OrderReferenceDetails) {
300
+ if ($orderReferenceDetails->isSetBuyer()) {
301
+ if ($orderReferenceDetails->getBuyer()->isSetEmail()) {
302
+ $orderUpdated = $this->_updateCustomerEmail($order, $orderReferenceDetails->getBuyer()->getEmail()) || $orderUpdated;
303
+ }
304
+ }
305
 
306
+ if ($orderReferenceDetails->isSetDestination()) {
307
+ if ($orderReferenceDetails->getDestination()->isSetPhysicalDestination()) {
308
+ $shippingAddress = $this->_convertAmazonAddressToArray($orderReferenceDetails->getDestination()->getPhysicalDestination());
309
+ if (isset($shippingAddress['firstname']) && isset($shippingAddress['lastname'])) {
310
+ $customerName = array(
311
+ 'firstname' => $shippingAddress['firstname'],
312
+ 'lastname' => $shippingAddress['lastname']
313
+ );
314
+ $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
315
+ }
316
+ $orderUpdated = $this->_updateOrderAddress($order->getBillingAddress(), $shippingAddress) || $orderUpdated;
317
+ $orderUpdated = $this->_updateOrderAddress($order->getShippingAddress(), $shippingAddress) || $orderUpdated;
318
+ }
319
+ }
320
+ }
321
 
322
+ $this->_addHistoryComment($order, $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState());
 
 
323
 
324
+ $transactionSave = Mage::getModel('core/resource_transaction');
325
+ if ($orderUpdated) {
326
+ $transactionSave->addObject($order);
327
+ $transactionSave->addCommitCallback(array($order, 'save'));
 
 
328
  }
 
329
 
330
+ // check if authorization should be re-submitted
331
+ $authTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
332
+ if ($authTransaction && $authTransaction->getIsClosed() && ($order->getBaseTotalDue() > 0)) {
333
+ $payment->authorize(true, $order->getBaseTotalDue());
334
+ $transactionSave->addObject($payment);
335
+ $orderUpdated = true;
 
 
 
 
 
 
336
  }
 
 
337
 
338
+ if ($orderUpdated) {
339
+ $transactionSave->save();
340
+ }
341
 
342
+ }
343
+ return $newStatus;
 
 
 
 
 
 
 
 
 
344
  }
345
+ return null;
 
346
  }
347
 
348
  /**
354
  */
355
  protected function _handleSuspendedOrderReference($payment, $transaction, $orderReferenceDetails) {
356
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
357
+ $newStatus = $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus());
358
+ if (null !== $newStatus) {
359
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
360
+ }
361
+ return $newStatus;
362
  }
363
+ return null;
 
364
  }
365
 
366
  /**
372
  */
373
  protected function _handleCanceledOrderReference($payment, $transaction, $orderReferenceDetails) {
374
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
375
+ $newStatus = $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus());
376
+ if (null !== $newStatus) {
377
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
378
+ }
379
+ return $newStatus;
380
  }
381
+ return null;
 
382
  }
383
 
384
  /**
390
  */
391
  protected function _handleClosedOrderReference($payment, $transaction, $orderReferenceDetails) {
392
  if ($orderReferenceDetails->isSetOrderReferenceStatus()) {
393
+ $newStatus = $this->_updateTransactionStatus($transaction, $orderReferenceDetails->getOrderReferenceStatus());
394
+ if (null !== $newStatus) {
395
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $orderReferenceDetails->getOrderTotal()->getAmount(), $orderReferenceDetails->getOrderReferenceStatus()->getState())->save();
396
+ }
397
+ return $newStatus;
398
  }
399
+ return null;
 
400
  }
401
 
402
 
413
  */
414
  protected function _handlePendingAuthorization($payment, $transaction, $authorizationDetails) {
415
  if ($authorizationDetails->isSetAuthorizationStatus()) {
416
+ $newStatus = $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus());
417
+ if (null !== $newStatus) {
418
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $authorizationDetails->getAuthorizationAmount()->getAmount(), $authorizationDetails->getAuthorizationStatus()->getState())->save();
419
+ }
420
+ return $newStatus;
421
  }
422
+ return null;
423
  }
424
 
425
  /**
430
  * @param OffAmazonPaymentsService_Model_AuthorizationDetails|OffAmazonPaymentsNotifications_Model_AuthorizationDetails $authorizationDetails
431
  */
432
  protected function _handleOpenAuthorization($payment, $transaction, $authorizationDetails) {
 
 
 
 
433
  if ($authorizationDetails->isSetAuthorizationStatus()) {
434
+ $newStatus = $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus());
435
+ if (null !== $newStatus) {
436
+ $order = $payment->getOrder();
437
+ $orderUpdated = false;
438
+
439
+ if ($authorizationDetails->isSetAuthorizationBillingAddress()) {
440
+ $billingAddress = $this->_convertAmazonAddressToArray($authorizationDetails->getAuthorizationBillingAddress());
441
+ if (isset($billingAddress['firstname']) && isset($billingAddress['lastname'])) {
442
+ $customerName = array(
443
+ 'firstname' => $billingAddress['firstname'],
444
+ 'lastname' => $billingAddress['lastname']
445
+ );
446
+ $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
447
+ }
448
+ $orderUpdated = $this->_updateCustomerName($order, $customerName) || $orderUpdated;
449
+ $orderUpdated = $this->_updateOrderAddress($order->getBillingAddress(), $billingAddress) || $orderUpdated;
450
+ }
451
 
452
+ if ($order->getStatus() != $this->_getConfig()->getAuthorizedOrderStatus()) {
453
+ $order->setState(
454
+ Mage_Sales_Model_Order::STATE_PROCESSING,
455
+ $this->_getConfig()->getAuthorizedOrderStatus(),
456
+ Mage::helper('amazonpayments')->__('An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.',
457
+ $order->getStore()->convertPrice($authorizationDetails->getAuthorizationAmount()->getAmount(), true, false),
458
+ $authorizationDetails->getAmazonAuthorizationId(),
459
+ strtoupper($authorizationDetails->getAuthorizationStatus()->getState())
460
+ ),
461
+ Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE
462
+ );
463
+ $orderUpdated = true;
464
+ }
465
 
466
+ $transactionSave = Mage::getModel('core/resource_transaction');
467
+ if ($orderUpdated) {
468
+ $transactionSave->addObject($order);
469
+ $transactionSave->addCommitCallback(array($order, 'save'));
470
+ }
 
 
 
 
 
 
 
471
 
472
+ if ($this->_getConfig()->captureImmediately() && $order->canInvoice()) {
473
+ $invoice = $order->prepareInvoice()
474
+ ->register()
475
+ ->capture();
476
+ $invoice->setTransactionId($authorizationDetails->getAmazonAuthorizationId());
477
+ $transactionSave->addObject($invoice);
478
+ $orderUpdated = true;
479
+ }
480
 
481
+ if ($orderUpdated) {
482
+ $transactionSave->save();
483
+ }
 
 
 
 
484
 
485
+ if (!$order->getEmailSent() && $this->_getConfig()->sendEmailConfirmation()) {
486
+ $order->sendNewOrderEmail();
487
+ }
488
 
489
+ }
490
+ return $newStatus;
491
  }
492
+ return null;
493
  }
494
 
495
  /**
501
  */
502
  protected function _handleDeclinedAuthorization($payment, $transaction, $authorizationDetails) {
503
  if ($authorizationDetails->isSetAuthorizationStatus()) {
504
+ $newStatus = $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus());
505
+ if (null !== $newStatus) {
506
+ if ($authorizationDetails->getAuthorizationStatus()->getReasonCode() == 'InvalidPaymentMethod') {
507
+ Mage::helper('amazonpayments')->sendAuthorizationDeclinedEmail($payment, $authorizationDetails);
508
+ }
509
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $authorizationDetails->getAuthorizationAmount()->getAmount(), $authorizationDetails->getAuthorizationStatus()->getState())->setIsCustomerNotified(true)->save();
510
  }
511
+ return $newStatus;
512
  }
513
+ return null;
514
  }
515
 
516
  /**
522
  */
523
  protected function _handleClosedAuthorization($payment, $transaction, $authorizationDetails) {
524
  if ($authorizationDetails->isSetAuthorizationStatus()) {
525
+ $newStatus = $this->_updateTransactionStatus($transaction, $authorizationDetails->getAuthorizationStatus());
526
+ if (null !== $newStatus) {
527
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $authorizationDetails->getAuthorizationAmount()->getAmount(), $authorizationDetails->getAuthorizationStatus()->getState())->save();
528
+ }
529
+ return $newStatus;
530
  }
531
+ return null;
 
532
  }
533
 
534
 
545
  */
546
  protected function _handlePendingCapture($payment, $transaction, $captureDetails) {
547
  if ($captureDetails->isSetCaptureStatus()) {
548
+ $newStatus = $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus());
549
+ if (null !== $newStatus) {
550
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
551
+ }
552
+ return $newStatus;
553
  }
554
+ return null;
555
  }
556
 
557
  /**
563
  */
564
  protected function _handleDeclinedCapture($payment, $transaction, $captureDetails) {
565
  if ($captureDetails->isSetCaptureStatus()) {
566
+ $newStatus = $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus());
567
+ if (null !== $newStatus) {
568
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
569
+ }
570
+ return $newStatus;
571
  }
572
+ return null;
573
  }
574
 
575
  /**
581
  */
582
  protected function _handleCompletedCapture($payment, $transaction, $captureDetails) {
583
  if ($captureDetails->isSetCaptureStatus()) {
584
+ $newStatus = $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus());
585
+ if (null !== $newStatus) {
586
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
587
+ }
588
+ return $newStatus;
589
  }
590
+ return null;
591
  }
592
 
593
  /**
599
  */
600
  protected function _handleClosedCapture($payment, $transaction, $captureDetails) {
601
  if ($captureDetails->isSetCaptureStatus()) {
602
+ $newStatus = $this->_updateTransactionStatus($transaction, $captureDetails->getCaptureStatus());
603
+ if (null !== $newStatus) {
604
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $captureDetails->getCaptureAmount()->getAmount(), $captureDetails->getCaptureStatus()->getState())->save();
605
+ }
606
+ return $newStatus;
607
  }
608
+ return null;
609
  }
610
 
611
 
622
  */
623
  protected function _handlePendingRefund($payment, $transaction, $refundDetails) {
624
  if ($refundDetails->isSetRefundStatus()) {
625
+ $newStatus = $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus());
626
+ if (null !== $newStatus) {
627
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $refundDetails->getRefundAmount()->getAmount(), $refundDetails->getRefundStatus()->getState())->save();
628
+ }
629
+ return $newStatus;
630
  }
631
+ return null;
632
  }
633
 
634
  /**
640
  */
641
  protected function _handleDeclinedRefund($payment, $transaction, $refundDetails) {
642
  if ($refundDetails->isSetRefundStatus()) {
643
+ $newStatus = $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus());
644
+ if (null !== $newStatus) {
645
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $refundDetails->getRefundAmount()->getAmount(), $refundDetails->getRefundStatus()->getState())->save();
646
+ }
647
+ return $newStatus;
648
  }
649
+ return null;
650
  }
651
 
652
  /**
658
  */
659
  protected function _handleCompletedRefund($payment, $transaction, $refundDetails) {
660
  if ($refundDetails->isSetRefundStatus()) {
661
+ $newStatus = $this->_updateTransactionStatus($transaction, $refundDetails->getRefundStatus());
662
+ if (null !== $newStatus) {
663
+ $this->_addHistoryComment($payment->getOrder(), $transaction, $refundDetails->getRefundAmount()->getAmount(), $refundDetails->getRefundStatus()->getState())->save();
664
+ }
665
+ return $newStatus;
666
  }
667
+ return null;
668
  }
669
 
670
 
682
  public function importTransactionDetails($payment, $transaction) {
683
  switch ($transaction->getTxnType()) {
684
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER:
685
+ return $this->importOrderReferenceDetails(
686
+ $this->_getApi()->setStore($payment->getOrder()->getStoreId())->getOrderReferenceDetails($transaction->getTxnId()),
687
  $payment,
688
  $transaction
689
  );
 
690
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH:
691
+ return $this->importAuthorizationDetails(
692
+ $this->_getApi()->setStore($payment->getOrder()->getStoreId())->getAuthorizationDetails($transaction->getTxnId()),
693
  $payment,
694
  $transaction,
695
  false
696
  );
 
697
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE:
698
+ return $this->importCaptureDetails(
699
+ $this->_getApi()->setStore($payment->getOrder()->getStoreId())->getCaptureDetails($transaction->getTxnId()),
700
  $payment,
701
  $transaction
702
  );
 
703
  case Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND:
704
+ return $this->importRefundDetails(
705
+ $this->_getApi()->setStore($payment->getOrder()->getStoreId())->getRefundDetails($transaction->getTxnId()),
706
  $payment,
707
  $transaction
708
  );
 
709
  }
710
  return null;
711
  }
736
  if ($orderReferenceStatus->isSetState()) {
737
  switch (strtolower($orderReferenceStatus->getState())) {
738
  case 'open':
739
+ return $this->_handleOpenOrderReference($payment, $transaction, $orderReferenceDetails);
 
740
  case 'suspended':
741
+ return $this->_handleSuspendedOrderReference($payment, $transaction, $orderReferenceDetails);
 
742
  case 'canceled':
743
+ return $this->_handleCanceledOrderReference($payment, $transaction, $orderReferenceDetails);
 
744
  case 'closed':
745
+ return $this->_handleClosedOrderReference($payment, $transaction, $orderReferenceDetails);
 
746
  }
747
  }
748
  }
749
  }
750
+ return null;
751
  }
752
 
753
  /**
778
  if ($authorizationStatus->isSetState()) {
779
  switch (strtolower($authorizationStatus->getState())) {
780
  case 'pending':
781
+ return $this->_handlePendingAuthorization($payment, $transaction, $authorizationDetails);
 
782
  case 'open':
783
  if ($refetchDetails) {
784
  $authorizationDetails = $this->_getApi()->getAuthorizationDetails($authorizationDetails->getAmazonAuthorizationId());
785
  }
786
+ return $this->_handleOpenAuthorization($payment, $transaction, $authorizationDetails);
 
787
  case 'declined':
788
+ return $this->_handleDeclinedAuthorization($payment, $transaction, $authorizationDetails);
 
789
  case 'closed':
790
+ return $this->_handleClosedAuthorization($payment, $transaction, $authorizationDetails);
 
791
  }
792
  }
793
  }
794
  }
795
+ return null;
796
  }
797
 
798
  /**
822
  if ($captureStatus->isSetState()) {
823
  switch (strtolower($captureStatus->getState())) {
824
  case 'pending':
825
+ return $this->_handlePendingCapture($payment, $transaction, $captureDetails);
 
826
  case 'declined':
827
+ return $this->_handleDeclinedCapture($payment, $transaction, $captureDetails);
 
828
  case 'completed':
829
+ return $this->_handleCompletedCapture($payment, $transaction, $captureDetails);
 
830
  case 'closed':
831
+ return $this->_handleClosedCapture($payment, $transaction, $captureDetails);
 
832
  }
833
  }
834
  }
835
  }
836
+ return null;
837
  }
838
 
839
  /**
863
  if ($refundStatus->isSetState()) {
864
  switch (strtolower($refundStatus->getState())) {
865
  case 'pending':
866
+ return $this->_handlePendingRefund($payment, $transaction, $refundDetails);
 
867
  case 'declined':
868
+ return $this->_handleDeclinedRefund($payment, $transaction, $refundDetails);
 
869
  case 'completed':
870
+ return $this->_handleCompletedRefund($payment, $transaction, $refundDetails);
 
871
  }
872
  }
873
  }
874
  }
875
+ return null;
876
  }
877
 
878
  /**
885
  switch ($notification->getNotificationType()) {
886
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_ORDER_REFERENCE:
887
  if ($notification->isSetOrderReference()) {
888
+ $transactionStatus = $this->importOrderReferenceDetails($notification->getOrderReference());
889
+ if (null !== $transactionStatus) {
890
+ $payment = $this->_lookupPayment($notification->getOrderReference()->getAmazonOrderReferenceId());
891
+ if ($payment) {
892
+ $transaction = $payment->lookupTransaction(
893
+ $notification->getOrderReference()->getAmazonOrderReferenceId(),
894
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER
895
+ );
896
+ if ($transaction) {
897
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
898
+ $transaction->save();
899
+ }
900
+ }
901
+ }
902
  } else {
903
  throw new Creativestyle_AmazonPayments_Exception('OrderReference field not found in submitted notification');
904
  }
905
  break;
906
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_AUTHORIZATION:
907
  if ($notification->isSetAuthorizationDetails()) {
908
+ $transactionStatus = $this->importAuthorizationDetails($notification->getAuthorizationDetails());
909
+ if (null !== $transactionStatus) {
910
+ $referenceId = $this->_sanitizeReferenceId($notification->getAuthorizationDetails()->getAuthorizationReferenceId());
911
+ $payment = $this->_lookupPayment($referenceId);
912
+ if ($payment) {
913
+ $transaction = $payment->lookupTransaction(
914
+ $notification->getAuthorizationDetails()->getAmazonAuthorizationId(),
915
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH
916
+ );
917
+ if ($transaction) {
918
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
919
+ $transaction->save();
920
+ }
921
+ }
922
+ }
923
  } else {
924
  throw new Creativestyle_AmazonPayments_Exception('AuthorizationDetails field not found in submitted notification');
925
  }
926
  break;
927
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_CAPTURE:
928
  if ($notification->isSetCaptureDetails()) {
929
+ $transactionStatus = $this->importCaptureDetails($notification->getCaptureDetails());
930
+ if (null !== $transactionStatus) {
931
+ $referenceId = $this->_sanitizeReferenceId($notification->getCaptureDetails()->getCaptureReferenceId());
932
+ $payment = $this->_lookupPayment($referenceId);
933
+ if ($payment) {
934
+ $transaction = $payment->lookupTransaction(
935
+ $notification->getCaptureDetails()->getAmazonCaptureId(),
936
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE
937
+ );
938
+ if ($transaction) {
939
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
940
+ $transaction->save();
941
+ }
942
+ }
943
+ }
944
  } else {
945
  throw new Creativestyle_AmazonPayments_Exception('CaptureDetails field not found in submitted notification');
946
  }
947
  break;
948
  case Creativestyle_AmazonPayments_Model_Api_Ipn::NOTIFICATION_TYPE_REFUND:
949
  if ($notification->isSetRefundDetails()) {
950
+ $transactionStatus = $this->importRefundDetails($notification->getRefundDetails());
951
+ if (null !== $transactionStatus) {
952
+ $referenceId = $this->_sanitizeReferenceId($notification->getRefundDetails()->getRefundReferenceId());
953
+ $payment = $this->_lookupPayment($referenceId);
954
+ if ($payment) {
955
+ $transaction = $payment->lookupTransaction(
956
+ $notification->getRefundDetails()->getAmazonRefundId(),
957
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND
958
+ );
959
+ if ($transaction) {
960
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
961
+ $transaction->save();
962
+ }
963
+ }
964
+ }
965
  } else {
966
  throw new Creativestyle_AmazonPayments_Exception('RefundDetails field not found in submitted notification');
967
  }
975
  }
976
 
977
  }
 
app/code/community/Creativestyle/AmazonPayments/Model/Observer.php CHANGED
@@ -15,6 +15,10 @@
15
  */
16
  class Creativestyle_AmazonPayments_Model_Observer {
17
 
 
 
 
 
18
 
19
  // **********************************************************************
20
  // Object instances geters
@@ -25,6 +29,84 @@ class Creativestyle_AmazonPayments_Model_Observer {
25
 
26
 
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  // **********************************************************************
29
  // Event observers
30
 
@@ -94,6 +176,56 @@ class Creativestyle_AmazonPayments_Model_Observer {
94
  }
95
 
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
  // **********************************************************************
99
  // Cronjobs
@@ -113,4 +245,21 @@ class Creativestyle_AmazonPayments_Model_Observer {
113
  return $this;
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  }
15
  */
16
  class Creativestyle_AmazonPayments_Model_Observer {
17
 
18
+ const DATA_POLL_TRANSACTION_LIMIT = 36;
19
+ const DATA_POLL_SLEEP_BETWEEN_TIME = 300000;
20
+
21
+
22
 
23
  // **********************************************************************
24
  // Object instances geters
29
 
30
 
31
 
32
+ // **********************************************************************
33
+ // Transactions details fetching routines
34
+
35
+ /**
36
+ * Fetch details for the provided transaction
37
+ *
38
+ * @param Mage_Sales_Model_Order_Payment_Transaction $transaction
39
+ */
40
+ protected function _fetchTransactionInfo($transaction) {
41
+ $transaction->getOrderPaymentObject()
42
+ ->setOrder($transaction->getOrder())
43
+ ->importTransactionInfo($transaction);
44
+ $transaction->save();
45
+ return $transaction->getId();
46
+ }
47
+
48
+ protected function _pollTransactionData() {
49
+ $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
50
+ ->addPaymentInformation(array('method'))
51
+ ->addFieldToFilter('method', array('in' => Mage::helper('amazonpayments')->getAvailablePaymentMethods()))
52
+ ->addFieldToFilter('is_closed', 0)
53
+ ->setOrder('transaction_id', 'asc');
54
+
55
+ $recentPolledTransaction = $this->_getConfig()->getRecentPolledTransaction();
56
+ if ($recentPolledTransaction) {
57
+ $collection->addFieldToFilter('transaction_id', array('gt' => (int)$recentPolledTransaction));
58
+ }
59
+
60
+ $collection->load();
61
+
62
+ $recentTransactionId = null;
63
+ $count = 0;
64
+ $dateModel = Mage::getModel('core/date');
65
+
66
+ foreach ($collection as $transaction) {
67
+ try {
68
+ $txnType = $transaction->getTxnType();
69
+ switch (strtolower(Mage::helper('amazonpayments')->getTransactionStatus($transaction))) {
70
+ case 'pending':
71
+ $recentTransactionId = $this->_fetchTransactionInfo($transaction);
72
+ $count++;
73
+ usleep(self::DATA_POLL_SLEEP_BETWEEN_TIME);
74
+ break;
75
+ case 'suspended':
76
+ if ($txnType == Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER) {
77
+ $recentTransactionId = $this->_fetchTransactionInfo($transaction);
78
+ $count++;
79
+ usleep(self::DATA_POLL_SLEEP_BETWEEN_TIME);
80
+ }
81
+ break;
82
+ case 'open':
83
+ $txnAge = floor(($dateModel->timestamp() - $dateModel->timestamp($transaction->getCreatedAt())) / (60 * 60 * 24));
84
+ if (($txnType == Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER && $txnAge > 180) ||
85
+ ($txnType == Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH && $txnAge > 30)) {
86
+ $recentTransactionId = $this->_fetchTransactionInfo($transaction);
87
+ $count++;
88
+ usleep(self::DATA_POLL_SLEEP_BETWEEN_TIME);
89
+ }
90
+ break;
91
+ }
92
+ if ($count >= self::DATA_POLL_TRANSACTION_LIMIT) {
93
+ break;
94
+ }
95
+ } catch (Exception $e) {
96
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
97
+ }
98
+ }
99
+
100
+ if ($count < self::DATA_POLL_TRANSACTION_LIMIT) {
101
+ $recentTransactionId = null;
102
+ }
103
+
104
+ $this->_getConfig()->setRecentPolledTransaction($recentTransactionId);
105
+
106
+ }
107
+
108
+
109
+
110
  // **********************************************************************
111
  // Event observers
112
 
176
  }
177
 
178
 
179
+ public function closeTransaction($observer) {
180
+ try {
181
+ $transaction = $observer->getEvent()->getOrderPaymentTransaction();
182
+ if ($transaction->getId() && in_array($transaction->getOrderPaymentObject()->getMethod(), Mage::helper('amazonpayments')->getAvailablePaymentMethods())) {
183
+ $closeFor = array('canceled', 'closed', 'declined', 'completed');
184
+ if (in_array(strtolower(Mage::helper('amazonpayments')->getTransactionStatus($transaction)), $closeFor)) {
185
+ $transaction->setIsClosed(true);
186
+ } else {
187
+ $transaction->setIsClosed(false);
188
+ }
189
+ }
190
+ } catch (Exception $e) {
191
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
192
+ }
193
+ return $this;
194
+ }
195
+
196
+ public function updateParentTransaction($observer) {
197
+ try {
198
+ $transaction = $observer->getEvent()->getOrderPaymentTransaction();
199
+ if ($transaction->getId() && in_array($transaction->getOrderPaymentObject()->getMethod(), Mage::helper('amazonpayments')->getAvailablePaymentMethods())) {
200
+ $updateFor = array();
201
+ switch ($transaction->getTxnType()) {
202
+ case Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH:
203
+ $updateFor = array('closed', 'declined');
204
+ break;
205
+ case Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE:
206
+ $updateFor = array('completed', 'closed', 'declined');
207
+ break;
208
+ case Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND:
209
+ $updateFor = array('completed', 'declined');
210
+ break;
211
+ }
212
+ if (!empty($updateFor)) {
213
+ $parentTransaction = $transaction->getParentTransaction();
214
+ if (in_array(strtolower(Mage::helper('amazonpayments')->getTransactionStatus($transaction)), $updateFor) && $parentTransaction && !$parentTransaction->getIsClosed()) {
215
+ $parentTransaction->getOrderPaymentObject()
216
+ ->setOrder($parentTransaction->getOrder())
217
+ ->importTransactionInfo($parentTransaction);
218
+ $parentTransaction->save();
219
+ }
220
+ }
221
+ }
222
+ } catch (Exception $e) {
223
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
224
+ }
225
+ return $this;
226
+ }
227
+
228
+
229
 
230
  // **********************************************************************
231
  // Cronjobs
245
  return $this;
246
  }
247
 
248
+ /**
249
+ * Invokes data polling from Amazon Payments gateway
250
+ *
251
+ * @return Creativestyle_AmazonPayments_Model_Observer
252
+ */
253
+ public function pollObjectsData() {
254
+ try {
255
+ if (!$this->_getConfig()->isIpnActive()) {
256
+ $this->_pollTransactionData();
257
+ }
258
+ } catch (Exception $e) {
259
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
260
+ throw $e;
261
+ }
262
+ return $this;
263
+ }
264
+
265
  }
app/code/community/Creativestyle/AmazonPayments/Model/Payment/Advanced/Abstract.php CHANGED
@@ -16,7 +16,7 @@
16
  abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract extends Creativestyle_AmazonPayments_Model_Payment_Abstract {
17
 
18
  protected $_code = 'amazonpayments_advanced_abstract';
19
- protected $_infoBlockType = 'amazonpayments/advanced_payment_info';
20
 
21
  /**
22
  * Pay with Amazon method features
@@ -57,7 +57,7 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
57
  protected function _authorize(Varien_Object $payment, $amount) {
58
  $order = $payment->getOrder();
59
 
60
- $authorizationDetails = $this->_getApi()->authorize(
61
  $order->getExtOrderId(),
62
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
63
  $amount,
@@ -70,12 +70,18 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
70
  $payment->setIsTransactionClosed(false);
71
 
72
  $message = Mage::helper('amazonpayments')->__('An authorize request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
73
- $this->_getManager()->importAuthorizationDetails(
 
74
  $authorizationDetails,
75
  $payment,
76
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, null, false, $message)
77
  );
78
 
 
 
 
 
 
79
  return $this;
80
  }
81
 
@@ -85,7 +91,7 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
85
  $authTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
86
  $authTransactionId = $authTransaction->getTxnId();
87
 
88
- $captureDetails = $this->_getApi()->capture(
89
  $authTransactionId,
90
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
91
  $amount,
@@ -98,12 +104,18 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
98
  $payment->setIsTransactionClosed(false);
99
 
100
  $message = Mage::helper('amazonpayments')->__('A capture request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
101
- $this->_getManager()->importCaptureDetails(
 
102
  $captureDetails,
103
  $payment,
104
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, null, false, $message)
105
  );
106
 
 
 
 
 
 
107
  return $this;
108
  }
109
 
@@ -113,7 +125,7 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
113
  $captureTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
114
  $captureTransactionId = $captureTransaction->getTxnId();
115
 
116
- $refundDetails = $this->_getApi()->refund(
117
  $captureTransactionId,
118
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
119
  $amount,
@@ -126,22 +138,30 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
126
  $payment->setIsTransactionClosed(false);
127
 
128
  $message = Mage::helper('amazonpayments')->__('A refund request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
129
- $this->_getManager()->importRefundDetails(
 
130
  $refundDetails,
131
  $payment,
132
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, null, false, $message)
133
  );
134
 
 
 
 
 
 
135
  return $this;
136
  }
137
 
138
  protected function _void(Varien_Object $payment) {
 
 
139
  $orderTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER);
140
- if ($orderTransaction) {
141
- $orderTransactionId = $orderTransaction->getTxnId();
142
- $this->_getApi()->cancelOrderReference($orderTransactionId);
143
- $orderTransaction->close(true);
144
- }
145
  return $this;
146
  }
147
 
@@ -272,12 +292,18 @@ abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract exte
272
  $payment->setSkipOrderProcessing(true);
273
 
274
  $message = Mage::helper('amazonpayments')->__('An order of %s has been sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
275
- $this->_getManager()->importOrderReferenceDetails(
 
276
  $this->_getApi()->getOrderReferenceDetails($order->getExtOrderId()),
277
  $payment,
278
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $message)
279
  );
280
 
 
 
 
 
 
281
  Creativestyle_AmazonPayments_Model_Simulator::simulate($payment, 'OrderReference');
282
 
283
  if ($this->_getConfig()->authorizeImmediately()) {
16
  abstract class Creativestyle_AmazonPayments_Model_Payment_Advanced_Abstract extends Creativestyle_AmazonPayments_Model_Payment_Abstract {
17
 
18
  protected $_code = 'amazonpayments_advanced_abstract';
19
+ protected $_infoBlockType = 'amazonpayments/payment_info';
20
 
21
  /**
22
  * Pay with Amazon method features
57
  protected function _authorize(Varien_Object $payment, $amount) {
58
  $order = $payment->getOrder();
59
 
60
+ $authorizationDetails = $this->_getApi()->setStore($order->getStoreId())->authorize(
61
  $order->getExtOrderId(),
62
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
63
  $amount,
70
  $payment->setIsTransactionClosed(false);
71
 
72
  $message = Mage::helper('amazonpayments')->__('An authorize request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
73
+ $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, null, false, $message);
74
+ $transactionStatus = $this->_getManager()->importAuthorizationDetails(
75
  $authorizationDetails,
76
  $payment,
77
+ $transaction
78
  );
79
 
80
+ if (null !== $transactionStatus) {
81
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
82
+ $transaction->save();
83
+ }
84
+
85
  return $this;
86
  }
87
 
91
  $authTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
92
  $authTransactionId = $authTransaction->getTxnId();
93
 
94
+ $captureDetails = $this->_getApi()->setStore($order->getStoreId())->capture(
95
  $authTransactionId,
96
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
97
  $amount,
104
  $payment->setIsTransactionClosed(false);
105
 
106
  $message = Mage::helper('amazonpayments')->__('A capture request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
107
+ $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, null, false, $message);
108
+ $transactionStatus = $this->_getManager()->importCaptureDetails(
109
  $captureDetails,
110
  $payment,
111
+ $transaction
112
  );
113
 
114
+ if (null !== $transactionStatus) {
115
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
116
+ $transaction->save();
117
+ }
118
+
119
  return $this;
120
  }
121
 
125
  $captureTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
126
  $captureTransactionId = $captureTransaction->getTxnId();
127
 
128
+ $refundDetails = $this->_getApi()->setStore($order->getStoreId())->refund(
129
  $captureTransactionId,
130
  $order->getExtOrderId() . '-' . $this->_increaseSequenceNumber($payment),
131
  $amount,
138
  $payment->setIsTransactionClosed(false);
139
 
140
  $message = Mage::helper('amazonpayments')->__('A refund request for %s has been submitted to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
141
+ $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, null, false, $message);
142
+ $transactionStatus = $this->_getManager()->importRefundDetails(
143
  $refundDetails,
144
  $payment,
145
+ $transaction
146
  );
147
 
148
+ if (null !== $transactionStatus) {
149
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
150
+ $transaction->save();
151
+ }
152
+
153
  return $this;
154
  }
155
 
156
  protected function _void(Varien_Object $payment) {
157
+ $order = $payment->getOrder();
158
+
159
  $orderTransaction = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER);
160
+ $orderTransactionId = $orderTransaction->getTxnId();
161
+
162
+ $cancelDetails = $this->_getApi()->setStore($order->getStoreId())->cancelOrderReference($orderTransactionId);
163
+ $orderTransaction->close(true);
164
+
165
  return $this;
166
  }
167
 
292
  $payment->setSkipOrderProcessing(true);
293
 
294
  $message = Mage::helper('amazonpayments')->__('An order of %s has been sent to Amazon Payments.', $order->getStore()->convertPrice($amount, true, false));
295
+ $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $message);
296
+ $transactionStatus = $this->_getManager()->importOrderReferenceDetails(
297
  $this->_getApi()->getOrderReferenceDetails($order->getExtOrderId()),
298
  $payment,
299
+ $transaction
300
  );
301
 
302
+ if (null !== $transactionStatus) {
303
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $transactionStatus);
304
+ $transaction->save();
305
+ }
306
+
307
  Creativestyle_AmazonPayments_Model_Simulator::simulate($payment, 'OrderReference');
308
 
309
  if ($this->_getConfig()->authorizeImmediately()) {
app/code/community/Creativestyle/AmazonPayments/Model/Service/Login.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Model_Service_Login {
17
+
18
+ const ACCOUNT_STATUS_OK = 1;
19
+ const ACCOUNT_STATUS_CONFIRM = 2;
20
+ const ACCOUNT_STATUS_DATA_MISSING = 4;
21
+ const ACCOUNT_STATUS_ERROR = 16;
22
+
23
+ protected $_amazonUserData;
24
+
25
+ protected $_customer = null;
26
+
27
+ protected $_websiteId = null;
28
+
29
+ public function __construct($amazonUserData) {
30
+ if (!$this->_validateAmazonUserData($amazonUserData)) {
31
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-service] Provided user profile is invalid');
32
+ }
33
+ $this->_amazonUserData = $amazonUserData;
34
+ }
35
+
36
+ protected function _getConfig() {
37
+ return Mage::getSingleton('amazonpayments/config');
38
+ }
39
+
40
+ protected function _getWebsiteId() {
41
+ if (null === $this->_websiteId) {
42
+ $this->_websiteId = Mage::app()->getStore()->getWebsiteId();
43
+ }
44
+ return $this->_websiteId;
45
+ }
46
+
47
+ protected function _validateAmazonUserData($amazonUserData) {
48
+ return $amazonUserData instanceof Varien_Object && $amazonUserData->getEmail() && $amazonUserData->getName() && $amazonUserData->getUserId();
49
+ }
50
+
51
+ protected function _getCustomer() {
52
+ if (null === $this->_customer) {
53
+ $customer = Mage::getModel('customer/customer');
54
+ $collection = $customer->getCollection()
55
+ ->addAttributeToFilter('amazon_user_id', $this->_amazonUserData->getUserId())
56
+ ->setPageSize(1);
57
+ if ($customer->getSharingConfig()->isWebsiteScope()) {
58
+ $collection->addAttributeToFilter('website_id', $this->_getWebsiteId());
59
+ }
60
+ if ($collection->count()) {
61
+ $this->_customer = $collection->getFirstItem();
62
+ }
63
+ }
64
+ return $this->_customer;
65
+ }
66
+
67
+ protected function _getCustomerByEmail() {
68
+ if (null === $this->_customer) {
69
+ $this->_customer = Mage::getModel('customer/customer')->setWebsiteId($this->_getWebsiteId())->loadByEmail($this->_amazonUserData->getEmail());
70
+ if (!$this->_customer->getId()) {
71
+ $this->_customer = null;
72
+ }
73
+ }
74
+ return $this->_customer;
75
+ }
76
+
77
+ protected function _getEmptyCustomer() {
78
+ if (null === $this->_customer) {
79
+ $this->_customer = Mage::getModel('customer/customer');
80
+ }
81
+ return $this->_customer;
82
+ }
83
+
84
+ protected function _getCustomerRequiredData() {
85
+ $requiredData = array();
86
+ $config = Mage::getSingleton('eav/config');
87
+ foreach ($this->_getConfig()->getGlobalDataValue('customer_attributes') as $attributeCode => $attributeData) {
88
+ $attributeModel = $config->getAttribute('customer', $attributeCode);
89
+ if ($attributeModel instanceof Varien_Object) {
90
+ if ($attributeModel->getIsRequired()) {
91
+ $requiredData[] = $attributeCode;
92
+ }
93
+ }
94
+ }
95
+ return $requiredData;
96
+ }
97
+
98
+ protected function _createCustomer($accountData = array()) {
99
+ if ($customer = $this->_getEmptyCustomer()) {
100
+ $password = $customer->generatePassword(8);
101
+ $customerName = Mage::helper('amazonpayments')->explodeCustomerName($this->_amazonUserData->getName());
102
+ $customer->setId(null)
103
+ ->setWebsiteId($this->_getWebsiteId())
104
+ ->setSkipConfirmationIfEmail($this->_amazonUserData->getEmail())
105
+ ->setFirstname($customerName->getFirstname())
106
+ ->setLastname($customerName->getLastname())
107
+ ->setEmail($this->_amazonUserData->getEmail())
108
+ ->setPassword($password)
109
+ ->setConfirmation($password)
110
+ ->setAmazonUserId($this->_amazonUserData->getUserId());
111
+
112
+ foreach ($accountData as $attribute => $value) {
113
+ $customer->setData($attribute, $value);
114
+ }
115
+
116
+ // validate customer
117
+ $validation = $customer->validate();
118
+ if ($validation !== true && !empty($validation)) {
119
+ $validation = implode(", ", $validation);
120
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-service] error while creating customer account: ' . $validation);
121
+ }
122
+
123
+ $customer->save();
124
+ return $customer;
125
+ }
126
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-service] unable to create new customer account');
127
+ }
128
+
129
+ public function connect($accountData = array()) {
130
+ if (null !== $this->_getCustomer()) {
131
+ return new Varien_Object(array(
132
+ 'status' => self::ACCOUNT_STATUS_OK,
133
+ 'customer' => $this->_getCustomer()
134
+ ));
135
+ } elseif (null !== $this->_getCustomerByEmail()) {
136
+ return new Varien_Object(array(
137
+ 'status' => self::ACCOUNT_STATUS_CONFIRM,
138
+ 'customer' => $this->_getCustomerByEmail()
139
+ ));
140
+ } else {
141
+ $requiredData = $this->_getCustomerRequiredData();
142
+ $postedData = array_keys($accountData);
143
+ $dataDiff = array_diff($requiredData, $postedData);
144
+ if (!(empty($requiredData) || empty($dataDiff))) {
145
+ return new Varien_Object(array(
146
+ 'status' => self::ACCOUNT_STATUS_DATA_MISSING,
147
+ 'required_data' => $requiredData
148
+ ));
149
+ } else {
150
+ $customer = $this->_createCustomer($accountData);
151
+ if (null !== $customer) {
152
+ return new Varien_Object(array(
153
+ 'status' => self::ACCOUNT_STATUS_OK,
154
+ 'customer' => $customer
155
+ ));
156
+ }
157
+ }
158
+ }
159
+ return new Varien_Object(array('status' => self::ACCOUNT_STATUS_ERROR));
160
+ }
161
+
162
+ public function setWebsiteId($websiteId) {
163
+ $this->_websiteId = $websiteId;
164
+ return $this;
165
+ }
166
+ }
app/code/community/Creativestyle/AmazonPayments/Model/Simulator.php CHANGED
@@ -81,7 +81,7 @@ class Creativestyle_AmazonPayments_Model_Simulator {
81
  */
82
  public static function simulate(Varien_Object $payment, $transactionType = null) {
83
  // object state simulations are available only in the sandbox mode
84
- if (null !== $transactionType && self::_getConfig()->getConnectionData('environment') == 'sandbox') {
85
  $availableSimulations = self::getAvailableSimulations();
86
  // check if the requested transaction type is on the list of allowed simulations
87
  if (array_key_exists($transactionType, $availableSimulations)) {
81
  */
82
  public static function simulate(Varien_Object $payment, $transactionType = null) {
83
  // object state simulations are available only in the sandbox mode
84
+ if (null !== $transactionType && self::_getConfig()->getEnvironment() == 'sandbox') {
85
  $availableSimulations = self::getAvailableSimulations();
86
  // check if the requested transaction type is on the list of allowed simulations
87
  if (array_key_exists($transactionType, $availableSimulations)) {
app/code/community/Creativestyle/AmazonPayments/Model/System/Config/Backend/DataPolling/Cron.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ class Creativestyle_AmazonPayments_Model_System_Config_Backend_DataPolling_Cron extends Mage_Core_Model_Config_Data {
16
+
17
+ const XML_PATH_DATA_POLLING_CRON_EXPR = 'crontab/jobs/amazonpayments_advanced_data_poll/schedule/cron_expr';
18
+
19
+ protected function _afterSave() {
20
+ $frequency = $this->getData('groups/general/fields/polling_frequency/value');
21
+
22
+ $months = floor($frequency / (30 * 24 * 60 * 60));
23
+ $days = floor(($frequency - $months * 30 * 24 * 60 * 60) / (24 * 60 * 60));
24
+ $hours = floor(($frequency - $months * 30 * 24 * 60 * 60 - $days * 24 * 60 * 60) / (60 * 60));
25
+ $minutes = floor(($frequency - $months * 30 * 24 * 60 * 60 - $days * 24 * 60 * 60 - $hours * 60 * 60) / 60);
26
+
27
+ $cronExpr = '*/5 * * * *';
28
+
29
+ if ($months) {
30
+ $cronExpr = '0 0 1 * *';
31
+ } else if ($days) {
32
+ $cronExpr = sprintf('0 0 *%s * *', ($days > 1 ? '/' . $days : ''));
33
+ } else if ($hours) {
34
+ $cronExpr = sprintf('0 *%s * * *', ($hours > 1 ? '/' . $hours : ''));
35
+ } else if ($minutes) {
36
+ $cronExpr = sprintf('*/%s * * * *', $minutes);
37
+ }
38
+
39
+ try {
40
+ Mage::getModel('core/config_data')
41
+ ->load(self::XML_PATH_DATA_POLLING_CRON_EXPR, 'path')
42
+ ->setValue($cronExpr)
43
+ ->setPath(self::XML_PATH_DATA_POLLING_CRON_EXPR)
44
+ ->save();
45
+ } catch (Exception $e) {
46
+ throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
47
+ }
48
+ }
49
+
50
+ }
app/code/community/Creativestyle/AmazonPayments/controllers/Adminhtml/SystemController.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Adminhtml_SystemController extends Mage_Adminhtml_Controller_Action {
17
+
18
+ protected function _checkCredentials($merchantId, $accessKey, $secretKey, $region, $sandbox) {
19
+ if (!($merchantId && $accessKey && $secretKey)) {
20
+ return array('error-msg', $this->__('Merchant ID, Access Key ID and Secret Key are required for the validation.'));
21
+ }
22
+
23
+ $result = array('success-msg', $this->__('Congratulations! Your Amazon Payments account settings seem to be OK.'));
24
+
25
+ try {
26
+ $api = new OffAmazonPaymentsService_Client(array(
27
+ 'merchantId' => trim($merchantId),
28
+ 'accessKey' => trim($accessKey),
29
+ 'secretKey' => trim($secretKey),
30
+ 'applicationName' => 'Creativestyle Amazon Payments Advanced Magento Extension',
31
+ 'applicationVersion' => Mage::getConfig()->getNode('modules/Creativestyle_AmazonPayments/version'),
32
+ 'region' => $region,
33
+ 'environment' => $sandbox ? 'sandbox' : 'live',
34
+ 'serviceURL' => '',
35
+ 'widgetURL' => '',
36
+ 'caBundleFile' => '',
37
+ 'clientId' => ''
38
+ ));
39
+ $apiRequest = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(array(
40
+ 'SellerId' => trim($merchantId),
41
+ 'AmazonOrderReferenceId' => 'P00-0000000-0000000'
42
+ ));
43
+ $api->getOrderReferenceDetails($apiRequest);
44
+ } catch (OffAmazonPaymentsService_Exception $e) {
45
+ switch ($e->getErrorCode()) {
46
+ case 'InvalidOrderReferenceId':
47
+ break;
48
+ case 'InvalidParameterValue':
49
+ $result = array('error-msg', $this->__('Whoops! Your Merchant ID seems to be invalid.'));
50
+ break;
51
+ case 'InvalidAccessKeyId':
52
+ $result = array('error-msg', $this->__('Whoops! Your Access Key ID seems to be invalid.'));
53
+ break;
54
+ case 'SignatureDoesNotMatch':
55
+ $result = array('error-msg', $this->__('Whoops! Your Secret Access Key seems to be invalid.'));
56
+ break;
57
+ default:
58
+ $result = array('error-msg', $this->__('Whoops! Something went wrong while validating your account.'));
59
+ break;
60
+ }
61
+ } catch (Exception $ex) {
62
+ Mage::logException($ex);
63
+ $result = array('error-msg', $this->__('Whoops! Something went wrong while validating your account.'));
64
+ }
65
+ return $result;
66
+ }
67
+
68
+ public function validateAction() {
69
+ $merchantId = $this->getRequest()->getPost('merchantId', null);
70
+ $accessKey = $this->getRequest()->getPost('accessKey', null);
71
+ $secretKey = $this->getRequest()->getPost('secretKey', null);
72
+ $region = $this->getRequest()->getPost('region', null);
73
+ $sandbox = $this->getRequest()->getPost('sandbox', null);
74
+
75
+ $response = vsprintf(
76
+ '<ul class="messages">
77
+ <li class="%s">
78
+ <ul>
79
+ <li><span>%s</span></li>
80
+ </ul>
81
+ </li>
82
+ </ul>', $this->_checkCredentials($merchantId, $accessKey, $secretKey, $region, $sandbox));
83
+
84
+ $this->getResponse()->setBody($response);
85
+ }
86
+
87
+ }
app/code/community/Creativestyle/AmazonPayments/controllers/Advanced/CheckoutController.php CHANGED
@@ -17,6 +17,8 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
17
 
18
  protected $_orderReferenceId = null;
19
 
 
 
20
  protected function _getCheckout() {
21
  return Mage::getSingleton('amazonpayments/checkout');
22
  }
@@ -29,6 +31,10 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
29
  return $this->_orderReferenceId;
30
  }
31
 
 
 
 
 
32
  protected function _getApi() {
33
  return Mage::getModel('amazonpayments/api_advanced');
34
  }
@@ -60,8 +66,8 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
60
  protected function _isSubmitAllowed() {
61
  if (!$this->_getQuote()->isVirtual()) {
62
  $address = $this->_getQuote()->getShippingAddress();
63
- $method= $address->getShippingMethod();
64
- $rate = $address->getShippingRateByCode($method);
65
  if (!$this->_getQuote()->isVirtual() && (!$method || !$rate)) {
66
  return false;
67
  }
@@ -72,6 +78,14 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
72
  return true;
73
  }
74
 
 
 
 
 
 
 
 
 
75
  /**
76
  * Send Ajax redirect response
77
  *
@@ -115,6 +129,9 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
115
  if (null === $this->_orderReferenceId) {
116
  $this->_orderReferenceId = $this->_getCheckoutSession()->getOrderReferenceId();
117
  }
 
 
 
118
  }
119
 
120
  public function indexAction() {
@@ -133,15 +150,16 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
133
  return;
134
  }
135
 
136
- if (null === $this->_getOrderReferenceId()) {
137
  $this->_redirect('checkout/cart');
138
  return;
139
  }
140
 
141
- $this->_getApi()->setOrderReferenceDetails($this->_getOrderReferenceId(), $this->_getQuote()->getBaseGrandTotal(), $this->_getQuote()->getBaseCurrencyCode());
142
- $this->_getCheckoutSession()->setOrderReferenceId($this->_getOrderReferenceId());
143
  $this->_getCheckoutSession()->setCartWasUpdated(false);
144
 
 
 
145
  $this->loadLayout();
146
  $this->getLayout()->getBlock('head')->setTitle($this->__('Pay with Amazon'));
147
  $this->renderLayout();
@@ -160,6 +178,8 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
160
  return;
161
  }
162
 
 
 
163
  $orderReference = $this->_getApi()->getOrderReferenceDetails($this->_getOrderReferenceId());
164
  // save billing data in the checkout model
165
  $result = $this->_getCheckout()->saveShipping(array(
@@ -198,6 +218,8 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
198
  return;
199
  }
200
 
 
 
201
  $data = $this->getRequest()->getPost('shipping_method', '');
202
  $result = $this->_getCheckout()->saveShippingMethod($data);
203
 
@@ -233,34 +255,6 @@ class Creativestyle_AmazonPayments_Advanced_CheckoutController extends Mage_Core
233
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
234
  }
235
 
236
- public function savePaymentAction() {
237
- if ($this->getRequest()->isPost()) {
238
- try {
239
- if ($this->_expireAjax()) {
240
- return;
241
- }
242
-
243
- $result = $this->_getCheckout()->savePayment(null);
244
- } catch (Exception $e) {
245
- Creativestyle_AmazonPayments_Model_Logger::logException($e);
246
- $result = array(
247
- 'error' => -1,
248
- 'error_messages' => $e->getMessage()
249
- );
250
- }
251
- if (!isset($result['error'])) {
252
- $result = array(
253
- 'success' => 1,
254
- 'allow_submit' => $this->_isSubmitAllowed()
255
- );
256
- }
257
- } else {
258
- $this->_forward('noRoute');
259
- }
260
-
261
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
262
- }
263
-
264
  public function saveOrderAction() {
265
  $result = array();
266
  try {
17
 
18
  protected $_orderReferenceId = null;
19
 
20
+ protected $_accessToken = null;
21
+
22
  protected function _getCheckout() {
23
  return Mage::getSingleton('amazonpayments/checkout');
24
  }
31
  return $this->_orderReferenceId;
32
  }
33
 
34
+ protected function _getAccessToken() {
35
+ return $this->_accessToken;
36
+ }
37
+
38
  protected function _getApi() {
39
  return Mage::getModel('amazonpayments/api_advanced');
40
  }
66
  protected function _isSubmitAllowed() {
67
  if (!$this->_getQuote()->isVirtual()) {
68
  $address = $this->_getQuote()->getShippingAddress();
69
+ $method = $address->getShippingMethod();
70
+ $rate = $address->getShippingRateByCode($method);
71
  if (!$this->_getQuote()->isVirtual() && (!$method || !$rate)) {
72
  return false;
73
  }
78
  return true;
79
  }
80
 
81
+ protected function _saveOrderReferenceInSessionData() {
82
+ if (null !== $this->_getOrderReferenceId() && !$this->_getCheckoutSession()->getOrderReferenceId()) {
83
+ $this->_getApi()->setOrderReferenceDetails($this->_getOrderReferenceId(), $this->_getQuote()->getBaseGrandTotal(), $this->_getQuote()->getBaseCurrencyCode());
84
+ $this->_getCheckoutSession()->setOrderReferenceId($this->_getOrderReferenceId());
85
+ $this->_getCheckoutSession()->setCartWasUpdated(false);
86
+ }
87
+ }
88
+
89
  /**
90
  * Send Ajax redirect response
91
  *
129
  if (null === $this->_orderReferenceId) {
130
  $this->_orderReferenceId = $this->_getCheckoutSession()->getOrderReferenceId();
131
  }
132
+ if (null === $this->_accessToken) {
133
+ $this->_accessToken = $this->getRequest()->getParam('accessToken', null);
134
+ }
135
  }
136
 
137
  public function indexAction() {
150
  return;
151
  }
152
 
153
+ if (null === $this->_getOrderReferenceId() && null === $this->_getAccessToken()) {
154
  $this->_redirect('checkout/cart');
155
  return;
156
  }
157
 
158
+ $this->_getCheckout()->savePayment(null);
 
159
  $this->_getCheckoutSession()->setCartWasUpdated(false);
160
 
161
+ $this->_saveOrderReferenceInSessionData();
162
+
163
  $this->loadLayout();
164
  $this->getLayout()->getBlock('head')->setTitle($this->__('Pay with Amazon'));
165
  $this->renderLayout();
178
  return;
179
  }
180
 
181
+ $this->_saveOrderReferenceInSessionData();
182
+
183
  $orderReference = $this->_getApi()->getOrderReferenceDetails($this->_getOrderReferenceId());
184
  // save billing data in the checkout model
185
  $result = $this->_getCheckout()->saveShipping(array(
218
  return;
219
  }
220
 
221
+ $this->_saveOrderReferenceInSessionData();
222
+
223
  $data = $this->getRequest()->getPost('shipping_method', '');
224
  $result = $this->_getCheckout()->saveShippingMethod($data);
225
 
255
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  public function saveOrderAction() {
259
  $result = array();
260
  try {
app/code/community/Creativestyle/AmazonPayments/controllers/Advanced/LoginController.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+ class Creativestyle_AmazonPayments_Advanced_LoginController extends Mage_Core_Controller_Front_Action {
17
+
18
+ private function _getApi() {
19
+ return Mage::getModel('amazonpayments/api_login');
20
+ }
21
+
22
+ private function _getConfig() {
23
+ return Mage::getSingleton('amazonpayments/config');
24
+ }
25
+
26
+ private function _getCustomerSession() {
27
+ return Mage::getSingleton('customer/session');
28
+ }
29
+
30
+ protected function _getTargetUrl() {
31
+ $target = $this->getRequest()->getParam('target', null);
32
+ if (strtolower($target) == 'checkout') {
33
+ $accessToken = $this->getRequest()->getParam('access_token', null);
34
+ return Mage::getUrl('amazonpayments/advanced_checkout/', array('accessToken' => $accessToken));
35
+ }
36
+ return Mage::getUrl('customer/account/');
37
+ }
38
+
39
+ private function _validateUserProfile($userProfile) {
40
+ return $userProfile instanceof Varien_Object && $userProfile->getEmail() && $userProfile->getName() && $userProfile->getUserId();
41
+ }
42
+
43
+ private function _validateAuthToken($authToken) {
44
+ return $authToken instanceof Varien_Object && $authToken->getAud() != '';
45
+ }
46
+
47
+ public function preDispatch() {
48
+ parent::preDispatch();
49
+ if (!($this->_getConfig()->isActive() & Creativestyle_AmazonPayments_Model_Config::LOGIN_WITH_AMAZON_ACTIVE)) {
50
+ $this->_forward('noRoute');
51
+ }
52
+ }
53
+
54
+ public function indexAction() {
55
+ $accessToken = $this->getRequest()->getParam('access_token', null);
56
+ if (null !== $accessToken) {
57
+ try {
58
+ $tokenInfo = $this->_getApi()->getTokenInfo($accessToken);
59
+ if ($this->_validateAuthToken($tokenInfo)) {
60
+ $userProfile = $this->_getApi()->getUserProfile($accessToken);
61
+ if ($this->_validateUserProfile($userProfile)) {
62
+ $loginService = Mage::getModel('amazonpayments/service_login', $userProfile);
63
+ $connectStatus = $loginService->connect();
64
+ switch ($connectStatus->getStatus()) {
65
+ case Creativestyle_AmazonPayments_Model_Service_Login::ACCOUNT_STATUS_OK:
66
+ $this->_getCustomerSession()->setCustomerAsLoggedIn($connectStatus->getCustomer());
67
+ $this->_redirectUrl($this->_getTargetUrl());
68
+ return;
69
+ case Creativestyle_AmazonPayments_Model_Service_Login::ACCOUNT_STATUS_CONFIRM:
70
+ $loginPost = $this->getRequest()->getPost('login', array());
71
+ if (!empty($loginPost) && array_key_exists('password', $loginPost)) {
72
+ if ($connectStatus->getCustomer()->validatePassword($loginPost['password'])) {
73
+ $connectStatus->getCustomer()->setAmazonUserId($userProfile->getUserId())->save();
74
+ $this->_getCustomerSession()->setCustomerAsLoggedIn($connectStatus->getCustomer());
75
+ $this->_redirectUrl($this->_getTargetUrl());
76
+ return;
77
+ } else {
78
+ $this->_getCustomerSession()->addError($this->__('Invalid password.'));
79
+ }
80
+ }
81
+ $update = $this->getLayout()->getUpdate();
82
+ $update->addHandle('default');
83
+ $this->addActionLayoutHandles();
84
+ $update->addHandle('amazonpayments_account_confirm');
85
+ $this->loadLayoutUpdates();
86
+ $this->generateLayoutXml()->generateLayoutBlocks();
87
+ $this->_initLayoutMessages('customer/session');
88
+ $formBlock = $this->getLayout()->getBlock('amazonpayments_login_account_confirm');
89
+ if ($formBlock) {
90
+ $formBlock->setData('back_url', $this->_getRefererUrl());
91
+ $formBlock->setUsername($connectStatus->getCustomer()->getEmail());
92
+ }
93
+ $this->renderLayout();
94
+ return;
95
+ case Creativestyle_AmazonPayments_Model_Service_Login::ACCOUNT_STATUS_DATA_MISSING:
96
+ $accountPost = $this->getRequest()->getPost('account', array());
97
+ if ($connectStatus->getRequiredData() && !empty($accountPost)) {
98
+ $requiredData = $connectStatus->getRequiredData();
99
+ $postedData = array();
100
+ foreach ($accountPost as $attribute => $value) {
101
+ if ($value) {
102
+ $postedData[] = $attribute;
103
+ }
104
+ }
105
+ $dataDiff = array_diff($requiredData, $postedData);
106
+ if (empty($dataDiff)) {
107
+ $connectStatus = $loginService->connect($accountPost);
108
+ if ($connectStatus->getStatus() == Creativestyle_AmazonPayments_Model_Service_Login::ACCOUNT_STATUS_OK) {
109
+ $this->_getCustomerSession()->setCustomerAsLoggedIn($connectStatus->getCustomer());
110
+ $this->_redirectUrl($this->_getTargetUrl());
111
+ return;
112
+ } else {
113
+ $this->_getCustomerSession()->addError($this->__('Please provide all required data.'));
114
+ }
115
+ } else {
116
+ $this->_getCustomerSession()->addError($this->__('Please provide all required data.'));
117
+ }
118
+ }
119
+ $update = $this->getLayout()->getUpdate();
120
+ $update->addHandle('default');
121
+ $this->addActionLayoutHandles();
122
+ $update->addHandle('amazonpayments_account_update');
123
+ $this->loadLayoutUpdates();
124
+ $this->generateLayoutXml()->generateLayoutBlocks();
125
+ $this->_initLayoutMessages('customer/session');
126
+ $formBlock = $this->getLayout()->getBlock('amazonpayments_login_account_update');
127
+ if ($formBlock) {
128
+ $formBlock->setData('back_url', $this->_getRefererUrl());
129
+ $formBlock->setFieldNameFormat('account[%s]');
130
+ $formData = new Varien_Object($accountPost);
131
+ if (!$formData->getFirstname() || !$formData->getLastname()) {
132
+ $customerName = Mage::helper('amazonpayments')->explodeCustomerName($userProfile->getName());
133
+ if (!$formData->getFirstname()) {
134
+ $formData->setData('firstname', $customerName->getFirstname());
135
+ }
136
+ if (!$formData->getLastname()) {
137
+ $formData->setData('lastname', $customerName->getLastname());
138
+ }
139
+ }
140
+ $formBlock->setFormData($formData);
141
+ }
142
+ $this->renderLayout();
143
+ return;
144
+ case Creativestyle_AmazonPayments_Model_Service_Login::ACCOUNT_STATUS_ERROR:
145
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-controller] Error when connecting accounts');
146
+ }
147
+ }
148
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-controller] Retrieved user profile is invalid');
149
+ }
150
+ throw new Creativestyle_AmazonPayments_Exception('[LWA-controller] Provided access_token is invalid');
151
+ } catch (Exception $e) {
152
+ Creativestyle_AmazonPayments_Model_Logger::logException($e);
153
+ $this->_getCustomerSession()->addError($this->__('There was an error connecting your Amazon account. Please contact us or try again later.'));
154
+ $this->_redirectReferer();
155
+ return;
156
+ }
157
+ }
158
+ $this->_forward('noRoute');
159
+ }
160
+
161
+ }
app/code/community/Creativestyle/AmazonPayments/etc/adminhtml.xml CHANGED
@@ -21,7 +21,7 @@
21
  <sort_order>99</sort_order>
22
  <children>
23
  <amazonpayments translate="title" module="amazonpayments">
24
- <title>Pay with Amazon</title>
25
  <sort_order>1</sort_order>
26
  <children>
27
  <!--
@@ -51,12 +51,12 @@
51
  <action>admin_amazonpayments/adminhtml_log_exception</action>
52
  </exception>
53
  <api translate="title">
54
- <title>API calls</title>
55
  <sort_order>100</sort_order>
56
  <action>admin_amazonpayments/adminhtml_log_api</action>
57
  </api>
58
  <ipn translate="title">
59
- <title>Notifications</title>
60
  <sort_order>200</sort_order>
61
  <action>admin_amazonpayments/adminhtml_log_ipn</action>
62
  </ipn>
@@ -83,7 +83,7 @@
83
  <creativestyle>
84
  <children>
85
  <amazonpayments translate="title" module="amazonpayments">
86
- <title>Pay with Amazon</title>
87
  <children>
88
  <!--
89
  <orders translate="title">
@@ -100,10 +100,10 @@
100
  <title>Exceptions</title>
101
  </exception>
102
  <api translate="title">
103
- <title>API calls</title>
104
  </api>
105
  <ipn translate="title">
106
- <title>Notifications</title>
107
  </ipn>
108
  </children>
109
  </log>
@@ -116,7 +116,7 @@
116
  <config>
117
  <children>
118
  <amazonpayments translate="title" module="amazonpayments">
119
- <title>Pay with Amazon settings</title>
120
  </amazonpayments>
121
  </children>
122
  </config>
21
  <sort_order>99</sort_order>
22
  <children>
23
  <amazonpayments translate="title" module="amazonpayments">
24
+ <title>Login and Pay with Amazon</title>
25
  <sort_order>1</sort_order>
26
  <children>
27
  <!--
51
  <action>admin_amazonpayments/adminhtml_log_exception</action>
52
  </exception>
53
  <api translate="title">
54
+ <title>API Calls</title>
55
  <sort_order>100</sort_order>
56
  <action>admin_amazonpayments/adminhtml_log_api</action>
57
  </api>
58
  <ipn translate="title">
59
+ <title>IPN Notifications</title>
60
  <sort_order>200</sort_order>
61
  <action>admin_amazonpayments/adminhtml_log_ipn</action>
62
  </ipn>
83
  <creativestyle>
84
  <children>
85
  <amazonpayments translate="title" module="amazonpayments">
86
+ <title>Login and Pay with Amazon</title>
87
  <children>
88
  <!--
89
  <orders translate="title">
100
  <title>Exceptions</title>
101
  </exception>
102
  <api translate="title">
103
+ <title>API Calls</title>
104
  </api>
105
  <ipn translate="title">
106
+ <title>IPN Notifications</title>
107
  </ipn>
108
  </children>
109
  </log>
116
  <config>
117
  <children>
118
  <amazonpayments translate="title" module="amazonpayments">
119
+ <title>Login and Pay with Amazon settings</title>
120
  </amazonpayments>
121
  </children>
122
  </config>
app/code/community/Creativestyle/AmazonPayments/etc/config.xml CHANGED
@@ -17,7 +17,7 @@
17
  <config>
18
  <modules>
19
  <Creativestyle_AmazonPayments>
20
- <version>1.1.2</version>
21
  </Creativestyle_AmazonPayments>
22
  </modules>
23
  <global>
@@ -85,6 +85,24 @@
85
  </amazonpayments_advanced_observer>
86
  </observers>
87
  </controller_action_layout_render_before_adminhtml_sales_order_view>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  </events>
89
  <payment>
90
  <groups>
@@ -116,6 +134,34 @@
116
  <live>https://payments.amazon.co.uk/gp/widgets/button</live>
117
  </uk>
118
  </button_urls>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  <objects>
120
  <OrderReference>
121
  <states>
@@ -179,7 +225,7 @@
179
  <InvalidPaymentMethod>
180
  <simulation_allowed>1</simulation_allowed>
181
  <simulation_options>
182
- <PaymentMethodUpdateTimeInMins type="int">60</PaymentMethodUpdateTimeInMins>
183
  </simulation_options>
184
  </InvalidPaymentMethod>
185
  <AmazonRejected>
@@ -198,7 +244,7 @@
198
  <ExpiredUnused>
199
  <simulation_allowed>1</simulation_allowed>
200
  <simulation_options>
201
- <ExpirationTimeInMins type="int">60</ExpirationTimeInMins>
202
  </simulation_options>
203
  </ExpiredUnused>
204
  <MaxCapturesProcessed>
@@ -312,6 +358,7 @@
312
  </translate>
313
  <secure_url>
314
  <amazonpayments>/amazonpayments</amazonpayments>
 
315
  </secure_url>
316
  </frontend>
317
  <admin>
@@ -349,6 +396,9 @@
349
  <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
350
  <run><model>amazonpayments/observer::rotateLogfiles</model></run>
351
  </amazonpayments_advanced_log_rotate>
 
 
 
352
  </jobs>
353
  </crontab>
354
  <default>
@@ -382,19 +432,32 @@
382
  <payment_action>authorize</payment_action>
383
  <authorized_order_status>processing</authorized_order_status>
384
  </general>
 
 
 
385
  <email>
386
  <order_confirmation>1</order_confirmation>
387
  <authorization_declined_template>amazonpayments_advanced_authorization_declined</authorization_declined_template>
388
  <authorization_declined_identity>sales</authorization_declined_identity>
389
  </email>
390
  <design>
391
- <button_size>large</button_size>
392
- <button_color>orange</button_color>
393
  <address_width>442</address_width>
394
  <address_height>260</address_height>
395
  <payment_width>442</payment_width>
396
  <payment_height>260</payment_height>
397
  </design>
 
 
 
 
 
 
 
 
 
 
 
 
398
  <developer>
399
  <log_active>1</log_active>
400
  </developer>
17
  <config>
18
  <modules>
19
  <Creativestyle_AmazonPayments>
20
+ <version>1.2.2</version>
21
  </Creativestyle_AmazonPayments>
22
  </modules>
23
  <global>
85
  </amazonpayments_advanced_observer>
86
  </observers>
87
  </controller_action_layout_render_before_adminhtml_sales_order_view>
88
+ <sales_order_payment_transaction_save_before>
89
+ <observers>
90
+ <amazonpayments_advanced_observer>
91
+ <type>singleton</type>
92
+ <class>Creativestyle_AmazonPayments_Model_Observer</class>
93
+ <method>closeTransaction</method>
94
+ </amazonpayments_advanced_observer>
95
+ </observers>
96
+ </sales_order_payment_transaction_save_before>
97
+ <sales_order_payment_transaction_save_after>
98
+ <observers>
99
+ <amazonpayments_advanced_observer>
100
+ <type>singleton</type>
101
+ <class>Creativestyle_AmazonPayments_Model_Observer</class>
102
+ <method>updateParentTransaction</method>
103
+ </amazonpayments_advanced_observer>
104
+ </observers>
105
+ </sales_order_payment_transaction_save_after>
106
  </events>
107
  <payment>
108
  <groups>
134
  <live>https://payments.amazon.co.uk/gp/widgets/button</live>
135
  </uk>
136
  </button_urls>
137
+ <login_api_urls>
138
+ <de>
139
+ <sandbox>https://api.sandbox.amazon.de/</sandbox>
140
+ <live>https://api.amazon.de/</live>
141
+ </de>
142
+ <uk>
143
+ <sandbox>https://api.sandbox.amazon.co.uk/</sandbox>
144
+ <live>https://api.amazon.co.uk/</live>
145
+ </uk>
146
+ </login_api_urls>
147
+ <login_widget_urls>
148
+ <de>
149
+ <sandbox>https://static-eu.payments-amazon.com/OffAmazonPayments/de/sandbox/lpa/js/Widgets.js</sandbox>
150
+ <live>https://static-eu.payments-amazon.com/OffAmazonPayments/de/lpa/js/Widgets.js</live>
151
+ </de>
152
+ <uk>
153
+ <sandbox>https://static-eu.payments-amazon.com/OffAmazonPayments/uk/sandbox/lpa/js/Widgets.js</sandbox>
154
+ <live>https://static-eu.payments-amazon.com/OffAmazonPayments/uk/lpa/js/Widgets.js</live>
155
+ </uk>
156
+ </login_widget_urls>
157
+ <customer_attributes>
158
+ <prefix />
159
+ <middlename/>
160
+ <suffix/>
161
+ <dob/>
162
+ <taxvat/>
163
+ <gender/>
164
+ </customer_attributes>
165
  <objects>
166
  <OrderReference>
167
  <states>
225
  <InvalidPaymentMethod>
226
  <simulation_allowed>1</simulation_allowed>
227
  <simulation_options>
228
+ <PaymentMethodUpdateTimeInMins type="int">10</PaymentMethodUpdateTimeInMins>
229
  </simulation_options>
230
  </InvalidPaymentMethod>
231
  <AmazonRejected>
244
  <ExpiredUnused>
245
  <simulation_allowed>1</simulation_allowed>
246
  <simulation_options>
247
+ <ExpirationTimeInMins type="int">10</ExpirationTimeInMins>
248
  </simulation_options>
249
  </ExpiredUnused>
250
  <MaxCapturesProcessed>
358
  </translate>
359
  <secure_url>
360
  <amazonpayments>/amazonpayments</amazonpayments>
361
+ <amazon_cart>/checkout/cart</amazon_cart>
362
  </secure_url>
363
  </frontend>
364
  <admin>
396
  <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
397
  <run><model>amazonpayments/observer::rotateLogfiles</model></run>
398
  </amazonpayments_advanced_log_rotate>
399
+ <amazonpayments_advanced_data_poll>
400
+ <run><model>amazonpayments/observer::pollObjectsData</model></run>
401
+ </amazonpayments_advanced_data_poll>
402
  </jobs>
403
  </crontab>
404
  <default>
432
  <payment_action>authorize</payment_action>
433
  <authorized_order_status>processing</authorized_order_status>
434
  </general>
435
+ <login>
436
+ <active>0</active>
437
+ </login>
438
  <email>
439
  <order_confirmation>1</order_confirmation>
440
  <authorization_declined_template>amazonpayments_advanced_authorization_declined</authorization_declined_template>
441
  <authorization_declined_identity>sales</authorization_declined_identity>
442
  </email>
443
  <design>
 
 
444
  <address_width>442</address_width>
445
  <address_height>260</address_height>
446
  <payment_width>442</payment_width>
447
  <payment_height>260</payment_height>
448
  </design>
449
+ <design_login>
450
+ <login_button_type>LwA</login_button_type>
451
+ <login_button_size>small</login_button_size>
452
+ <login_button_color>Gold</login_button_color>
453
+ <pay_button_type>PwA</pay_button_type>
454
+ <pay_button_size>small</pay_button_size>
455
+ <pay_button_color>Gold</pay_button_color>
456
+ </design_login>
457
+ <design_pay>
458
+ <button_size>large</button_size>
459
+ <button_color>orange</button_color>
460
+ </design_pay>
461
  <developer>
462
  <log_active>1</log_active>
463
  </developer>
app/code/community/Creativestyle/AmazonPayments/etc/system.xml CHANGED
@@ -81,6 +81,13 @@
81
  <show_in_website>1</show_in_website>
82
  <show_in_store>1</show_in_store>
83
  </region>
 
 
 
 
 
 
 
84
  </fields>
85
  </account>
86
  <general translate="label">
@@ -140,8 +147,8 @@
140
  <source_model>amazonpayments/lookup_ipnActive</source_model>
141
  <sort_order>50</sort_order>
142
  <show_in_default>1</show_in_default>
143
- <show_in_website>1</show_in_website>
144
- <show_in_store>1</show_in_store>
145
  <depends><active>1</active></depends>
146
  </ipn_active>
147
  <ipn_url>
@@ -161,15 +168,24 @@
161
  <label>Data polling frequency</label>
162
  <frontend_type>select</frontend_type>
163
  <source_model>amazonpayments/lookup_frequency</source_model>
 
164
  <sort_order>70</sort_order>
165
  <show_in_default>1</show_in_default>
166
- <show_in_website>1</show_in_website>
167
- <show_in_store>1</show_in_store>
168
  <depends>
169
  <active>1</active>
170
  <ipn_active>0</ipn_active>
171
  </depends>
172
  </polling_frequency>
 
 
 
 
 
 
 
 
173
  <authorized_order_status translate="label">
174
  <label>Order status on authorization</label>
175
  <frontend_type>select</frontend_type>
@@ -182,6 +198,33 @@
182
  </authorized_order_status>
183
  </fields>
184
  </general>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  <email translate="label">
186
  <label>Email Options</label>
187
  <frontend_type>text</frontend_type>
@@ -221,30 +264,12 @@
221
  </fields>
222
  </email>
223
  <design>
224
- <label>Appearance Settings</label>
225
  <sort_order>400</sort_order>
226
  <show_in_default>1</show_in_default>
227
  <show_in_website>1</show_in_website>
228
  <show_in_store>1</show_in_store>
229
  <fields>
230
- <button_size translate="label">
231
- <label>"Pay with Amazon" button size</label>
232
- <frontend_type>select</frontend_type>
233
- <source_model>amazonpayments/lookup_design_button_size</source_model>
234
- <sort_order>10</sort_order>
235
- <show_in_default>1</show_in_default>
236
- <show_in_website>1</show_in_website>
237
- <show_in_store>1</show_in_store>
238
- </button_size>
239
- <button_color translate="label">
240
- <label>"Pay with Amazon" button color</label>
241
- <frontend_type>select</frontend_type>
242
- <source_model>amazonpayments/lookup_design_button_color</source_model>
243
- <sort_order>20</sort_order>
244
- <show_in_default>1</show_in_default>
245
- <show_in_website>1</show_in_website>
246
- <show_in_store>1</show_in_store>
247
- </button_color>
248
  <address_width translate="label comment">
249
  <label>Address widget width</label>
250
  <comment>Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.</comment>
@@ -266,7 +291,7 @@
266
  <show_in_store>1</show_in_store>
267
  </address_height>
268
  <payment_width translate="label comment">
269
- <label>Payment widget width</label>
270
  <comment>Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.</comment>
271
  <frontend_type>text</frontend_type>
272
  <validate>validate-digits-range digits-range-200-600</validate>
@@ -276,7 +301,7 @@
276
  <show_in_store>1</show_in_store>
277
  </payment_width>
278
  <payment_height translate="label comment">
279
- <label>Payment widget height</label>
280
  <comment>Enter a value between 228 and 400 pixels</comment>
281
  <frontend_type>text</frontend_type>
282
  <validate>validate-digits-range digits-range-228-400</validate>
@@ -287,6 +312,96 @@
287
  </payment_height>
288
  </fields>
289
  </design>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  <developer translate="label">
291
  <label>Developer Options</label>
292
  <sort_order>900</sort_order>
81
  <show_in_website>1</show_in_website>
82
  <show_in_store>1</show_in_store>
83
  </region>
84
+ <validator translate="label">
85
+ <frontend_model>amazonpayments/adminhtml_credentialsValidator</frontend_model>
86
+ <sort_order>50</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ </validator>
91
  </fields>
92
  </account>
93
  <general translate="label">
147
  <source_model>amazonpayments/lookup_ipnActive</source_model>
148
  <sort_order>50</sort_order>
149
  <show_in_default>1</show_in_default>
150
+ <show_in_website>0</show_in_website>
151
+ <show_in_store>0</show_in_store>
152
  <depends><active>1</active></depends>
153
  </ipn_active>
154
  <ipn_url>
168
  <label>Data polling frequency</label>
169
  <frontend_type>select</frontend_type>
170
  <source_model>amazonpayments/lookup_frequency</source_model>
171
+ <backend_model>amazonpayments/system_config_backend_dataPolling_cron</backend_model>
172
  <sort_order>70</sort_order>
173
  <show_in_default>1</show_in_default>
174
+ <show_in_website>0</show_in_website>
175
+ <show_in_store>0</show_in_store>
176
  <depends>
177
  <active>1</active>
178
  <ipn_active>0</ipn_active>
179
  </depends>
180
  </polling_frequency>
181
+ <recent_polled_transaction>
182
+ <label>ID of recent polled transaction</label>
183
+ <frontend_type>text</frontend_type>
184
+ <sort_order>990</sort_order>
185
+ <show_in_default>0</show_in_default>
186
+ <show_in_website>0</show_in_website>
187
+ <show_in_store>0</show_in_store>
188
+ </recent_polled_transaction>
189
  <authorized_order_status translate="label">
190
  <label>Order status on authorization</label>
191
  <frontend_type>select</frontend_type>
198
  </authorized_order_status>
199
  </fields>
200
  </general>
201
+ <login translate="label">
202
+ <label>Login with Amazon</label>
203
+ <sort_order>250</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>1</show_in_website>
206
+ <show_in_store>1</show_in_store>
207
+ <fields>
208
+ <active translate="label">
209
+ <label>Enable Login with Amazon</label>
210
+ <frontend_type>select</frontend_type>
211
+ <source_model>adminhtml/system_config_source_yesno</source_model>
212
+ <sort_order>10</sort_order>
213
+ <show_in_default>1</show_in_default>
214
+ <show_in_website>1</show_in_website>
215
+ <show_in_store>1</show_in_store>
216
+ </active>
217
+ <client_id translate="label">
218
+ <label>Client ID</label>
219
+ <frontend_type>text</frontend_type>
220
+ <sort_order>20</sort_order>
221
+ <show_in_default>1</show_in_default>
222
+ <show_in_website>1</show_in_website>
223
+ <show_in_store>1</show_in_store>
224
+ <depends><active>1</active></depends>
225
+ </client_id>
226
+ </fields>
227
+ </login>
228
  <email translate="label">
229
  <label>Email Options</label>
230
  <frontend_type>text</frontend_type>
264
  </fields>
265
  </email>
266
  <design>
267
+ <label>Common Appearance Settings</label>
268
  <sort_order>400</sort_order>
269
  <show_in_default>1</show_in_default>
270
  <show_in_website>1</show_in_website>
271
  <show_in_store>1</show_in_store>
272
  <fields>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  <address_width translate="label comment">
274
  <label>Address widget width</label>
275
  <comment>Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.</comment>
291
  <show_in_store>1</show_in_store>
292
  </address_height>
293
  <payment_width translate="label comment">
294
+ <label>Wallet widget width</label>
295
  <comment>Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.</comment>
296
  <frontend_type>text</frontend_type>
297
  <validate>validate-digits-range digits-range-200-600</validate>
301
  <show_in_store>1</show_in_store>
302
  </payment_width>
303
  <payment_height translate="label comment">
304
+ <label>Wallet widget height</label>
305
  <comment>Enter a value between 228 and 400 pixels</comment>
306
  <frontend_type>text</frontend_type>
307
  <validate>validate-digits-range digits-range-228-400</validate>
312
  </payment_height>
313
  </fields>
314
  </design>
315
+ <design_login>
316
+ <label>Appearance Settings for Login and Pay with Amazon</label>
317
+ <sort_order>420</sort_order>
318
+ <show_in_default>1</show_in_default>
319
+ <show_in_website>1</show_in_website>
320
+ <show_in_store>1</show_in_store>
321
+ <fields>
322
+ <login_button_type translate="label">
323
+ <label>"Login with Amazon" button type</label>
324
+ <frontend_type>select</frontend_type>
325
+ <source_model>amazonpayments/lookup_design_button_type_login</source_model>
326
+ <sort_order>10</sort_order>
327
+ <show_in_default>1</show_in_default>
328
+ <show_in_website>1</show_in_website>
329
+ <show_in_store>1</show_in_store>
330
+ </login_button_type>
331
+ <login_button_size translate="label">
332
+ <label>"Login with Amazon" button size</label>
333
+ <frontend_type>select</frontend_type>
334
+ <source_model>amazonpayments/lookup_design_button_size_loginPay</source_model>
335
+ <sort_order>20</sort_order>
336
+ <show_in_default>1</show_in_default>
337
+ <show_in_website>1</show_in_website>
338
+ <show_in_store>1</show_in_store>
339
+ </login_button_size>
340
+ <login_button_color translate="label">
341
+ <label>"Login with Amazon" button color</label>
342
+ <frontend_type>select</frontend_type>
343
+ <source_model>amazonpayments/lookup_design_button_color_loginPay</source_model>
344
+ <sort_order>30</sort_order>
345
+ <show_in_default>1</show_in_default>
346
+ <show_in_website>1</show_in_website>
347
+ <show_in_store>1</show_in_store>
348
+ </login_button_color>
349
+ <pay_button_type translate="label">
350
+ <label>"Pay with Amazon" button type</label>
351
+ <frontend_type>select</frontend_type>
352
+ <source_model>amazonpayments/lookup_design_button_type_pay</source_model>
353
+ <sort_order>40</sort_order>
354
+ <show_in_default>1</show_in_default>
355
+ <show_in_website>1</show_in_website>
356
+ <show_in_store>1</show_in_store>
357
+ </pay_button_type>
358
+ <pay_button_size translate="label">
359
+ <label>"Pay with Amazon" button size</label>
360
+ <frontend_type>select</frontend_type>
361
+ <source_model>amazonpayments/lookup_design_button_size_loginPay</source_model>
362
+ <sort_order>50</sort_order>
363
+ <show_in_default>1</show_in_default>
364
+ <show_in_website>1</show_in_website>
365
+ <show_in_store>1</show_in_store>
366
+ </pay_button_size>
367
+ <pay_button_color translate="label">
368
+ <label>"Pay with Amazon" button color</label>
369
+ <frontend_type>select</frontend_type>
370
+ <source_model>amazonpayments/lookup_design_button_color_loginPay</source_model>
371
+ <sort_order>60</sort_order>
372
+ <show_in_default>1</show_in_default>
373
+ <show_in_website>1</show_in_website>
374
+ <show_in_store>1</show_in_store>
375
+ </pay_button_color>
376
+ </fields>
377
+ </design_login>
378
+ <design_pay>
379
+ <label>Appearance Settings for standalone Pay with Amazon</label>
380
+ <sort_order>440</sort_order>
381
+ <show_in_default>1</show_in_default>
382
+ <show_in_website>1</show_in_website>
383
+ <show_in_store>1</show_in_store>
384
+ <fields>
385
+ <button_size translate="label">
386
+ <label>"Pay with Amazon" button size</label>
387
+ <frontend_type>select</frontend_type>
388
+ <source_model>amazonpayments/lookup_design_button_size</source_model>
389
+ <sort_order>10</sort_order>
390
+ <show_in_default>1</show_in_default>
391
+ <show_in_website>1</show_in_website>
392
+ <show_in_store>1</show_in_store>
393
+ </button_size>
394
+ <button_color translate="label">
395
+ <label>"Pay with Amazon" button color</label>
396
+ <frontend_type>select</frontend_type>
397
+ <source_model>amazonpayments/lookup_design_button_color</source_model>
398
+ <sort_order>20</sort_order>
399
+ <show_in_default>1</show_in_default>
400
+ <show_in_website>1</show_in_website>
401
+ <show_in_store>1</show_in_store>
402
+ </button_color>
403
+ </fields>
404
+ </design_pay>
405
  <developer translate="label">
406
  <label>Developer Options</label>
407
  <sort_order>900</sort_order>
app/code/community/Creativestyle/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-1.1.6-1.2.0.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the official Amazon Payments Advanced extension
5
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
6
+ * All rights reserved
7
+ *
8
+ * Reuse or modification of this source code is not allowed
9
+ * without written permission from creativestyle GmbH
10
+ *
11
+ * @category Creativestyle
12
+ * @package Creativestyle_AmazonPayments
13
+ * @copyright Copyright (c) 2014 creativestyle GmbH
14
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
+ */
16
+
17
+ $installer = $this;
18
+ $installer->startSetup();
19
+
20
+ $installer->addAttribute('customer', 'amazon_user_id', array(
21
+ 'type' => 'varchar',
22
+ 'label' => 'Amazon UID',
23
+ 'visible' => false,
24
+ 'required' => false,
25
+ 'unique' => true
26
+ ));
27
+
28
+ $installer->endSetup();
app/design/adminhtml/default/default/template/creativestyle/amazonpayments/info.phtml CHANGED
@@ -17,7 +17,7 @@
17
  <a class="creativestyle-logo" href="http://www.creativestyle.de" target="_blank">
18
  <img src="<?php echo $this->getSkinUrl('creativestyle/images/amazon-payments-advanced-creativestyle-logo.png'); ?>" alt="creativestyle" />
19
  </a>
20
- <h3><?php echo $this->__('Pay with Amazon'); ?><small> (v. <?php echo $this->getExtensionVersion(); ?>)</small></h3>
21
  <p style="clear:both;"><?php echo $this->__('This extension integrates easily your Magento shop with Pay with Amazon service.'); ?></p>
22
  <p>--------------------------------------------------------<br />
23
  <?php echo $this->helper('amazonpayments')->__(
17
  <a class="creativestyle-logo" href="http://www.creativestyle.de" target="_blank">
18
  <img src="<?php echo $this->getSkinUrl('creativestyle/images/amazon-payments-advanced-creativestyle-logo.png'); ?>" alt="creativestyle" />
19
  </a>
20
+ <h3><?php echo $this->__('Login and Pay with Amazon'); ?><small> (v. <?php echo $this->getExtensionVersion(); ?>)</small></h3>
21
  <p style="clear:both;"><?php echo $this->__('This extension integrates easily your Magento shop with Pay with Amazon service.'); ?></p>
22
  <p>--------------------------------------------------------<br />
23
  <?php echo $this->helper('amazonpayments')->__(
app/design/adminhtml/default/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/info.phtml RENAMED
File without changes
app/design/adminhtml/default/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/pdf/info.phtml RENAMED
File without changes
app/design/frontend/base/default/layout/amazonpayments.xml CHANGED
@@ -14,41 +14,52 @@
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
  -->
17
- <layout version="1.0.0">
18
  <default>
19
  <reference name="head">
20
- <action method="addCss" ifconfig="amazonpayments/general/active"><stylesheet>creativestyle/css/amazonpayments.css</stylesheet></action>
21
- <action method="addJs" ifconfig="amazonpayments/general/active"><script>creativestyle/apa_checkout.min.js</script></action>
22
- <action method="addJs" ifconfig="amazonpayments/general/active"><script>prototype/tooltip.js</script></action>
23
- <block type="amazonpayments/advanced_head" name="amazonpayments_advanced.head" template="creativestyle/amazonpayments/advanced/head.phtml"/>
 
 
24
  </reference>
25
  <reference name="cart_sidebar.extra_actions">
26
- <block type="amazonpayments/advanced_button" name="top_cart.amazonpayments_advanced.shorcut" template="creativestyle/amazonpayments/advanced/button.phtml" before="-">
27
  <action method="setIdSuffix"><value>sidebar</value></action>
28
  </block>
29
  </reference>
30
  <reference name="before_body_end">
31
- <block type="amazonpayments/advanced_js" name="amazonpayments_advanced.button_js" template="creativestyle/amazonpayments/advanced/button/js.phtml">
32
- <block type="core/template" name="amazonpayments_advanced.button_js.tooltip" as="amazonpayments_button_tooltip" template="creativestyle/amazonpayments/advanced/button/tooltip.phtml"/>
33
  </block>
34
  </reference>
35
  </default>
36
  <checkout_cart_index>
37
  <reference name="checkout.cart.methods">
38
- <block type="amazonpayments/advanced_button" name="checkout.cart.methods.amazonpayments_advanced.bottom" template="creativestyle/amazonpayments/advanced/button.phtml" before="-">
39
  <action method="setIdSuffix"><value>div</value></action>
 
40
  </block>
41
  </reference>
42
  <reference name="checkout.cart.top_methods">
43
- <block type="amazonpayments/advanced_button" name="checkout.cart.methods.amazonpayments_advanced.top" template="creativestyle/amazonpayments/advanced/button.phtml" before="checkout.cart.methods.onepage">
44
  <action method="setIdSuffix"><value>top</value></action>
 
45
  </block>
46
  </reference>
47
  </checkout_cart_index>
48
  <checkout_onepage_index>
49
  <reference name="checkout.onepage.login.before">
50
- <block type="amazonpayments/advanced_button" name="amazonpayments_advanced.onepage_button" template="creativestyle/amazonpayments/advanced/button/onepage.phtml">
51
- <block type="core/template" name="amazonpayments_advanced.onepage_button.tooltip" as="amazonpayments_onepage_button_tooltip" template="creativestyle/amazonpayments/advanced/button/tooltip.phtml"/>
 
 
 
 
 
 
 
52
  </block>
53
  </reference>
54
  </checkout_onepage_index>
@@ -60,12 +71,12 @@
60
  <action method="setTemplate"><template>page/1column.phtml</template></action>
61
  </reference>
62
  <reference name="content">
63
- <block type="amazonpayments/advanced_checkout" name="amazonpayments_advanced.checkout" as="checkout" template="creativestyle/amazonpayments/advanced/checkout.phtml">
64
- <block type="amazonpayments/advanced_checkout_notice" name="amazonpayments_advanced.checkout.capture_notice" as="capture_notice" template="creativestyle/amazonpayments/advanced/checkout/capture_notice.phtml"/>
65
- <block type="checkout/onepage_shipping_method" name="amazonpayments_advanced.checkout.shipping_method" as="shipping_method" template="creativestyle/amazonpayments/advanced/checkout/shipping_method.phtml">
66
- <block type="checkout/onepage_shipping_method_additional" name="amazonpayments_advanced.checkout.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
67
  </block>
68
- <block type="amazonpayments/advanced_checkout_sandboxToolbox" name="amazonpayments_advanced.checkout.sandbox_toolbox" as="sandbox_toolbox" template="creativestyle/amazonpayments/advanced/checkout/sandbox_toolbox.phtml"/>
69
  <block type="checkout/onepage_review_info" name="amazonpayments_advanced.checkout.review" as="review" template="checkout/onepage/review/info.phtml">
70
  <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
71
  <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
@@ -78,12 +89,12 @@
78
  <label>Items After</label>
79
  </block>
80
  <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
81
- <block type="core/template" name="checkout.onepage.review.button" as="button" template="creativestyle/amazonpayments/advanced/checkout/review/button.phtml"/>
82
  </block>
83
  </block>
84
  </reference>
85
  <reference name="before_body_end">
86
- <block type="amazonpayments/advanced_js" name="amazonpayments_advanced.checkout_js" template="creativestyle/amazonpayments/advanced/checkout/js.phtml"/>
87
  </reference>
88
  </amazonpayments_advanced_checkout_index>
89
  <amazonpayments_advanced_shippingmethod>
@@ -106,7 +117,37 @@
106
  <label>Items After</label>
107
  </block>
108
  <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
109
- <block type="core/template" name="checkout.onepage.review.button" as="button" template="creativestyle/amazonpayments/advanced/checkout/review/button.phtml"/>
110
  </block>
111
  </amazonpayments_advanced_review>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  </layout>
14
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
15
  */
16
  -->
17
+ <layout version="1.2.0">
18
  <default>
19
  <reference name="head">
20
+ <action method="addCss"><stylesheet helper="amazonpayments/getHeadCss"/></action>
21
+ <action method="addJs"><script helper="amazonpayments/getHeadJs"/></action>
22
+ <action method="addJs"><script helper="amazonpayments/getHeadTooltipJs"/></action>
23
+ <block type="amazonpayments/head" name="amazonpayments.head" template="creativestyle/amazonpayments/head.phtml">
24
+ <block type="amazonpayments/login_head" name="amazonpayments.head.login" as="amazonpayments_login_head" template="creativestyle/amazonpayments/login/head.phtml"/>
25
+ </block>
26
  </reference>
27
  <reference name="cart_sidebar.extra_actions">
28
+ <block type="amazonpayments/pay_button" name="top_cart.amazonpayments.pay_button" before="-">
29
  <action method="setIdSuffix"><value>sidebar</value></action>
30
  </block>
31
  </reference>
32
  <reference name="before_body_end">
33
+ <block type="amazonpayments/button_js" name="amazonpayments.button.js" template="creativestyle/amazonpayments/button/js.phtml">
34
+ <block type="core/template" name="amazonpayments.button.tooltip" as="amazonpayments_button_tooltip" template="creativestyle/amazonpayments/button/tooltip.phtml"/>
35
  </block>
36
  </reference>
37
  </default>
38
  <checkout_cart_index>
39
  <reference name="checkout.cart.methods">
40
+ <block type="amazonpayments/pay_button" name="checkout.cart.methods.amazonpayments_pay.bottom" before="-">
41
  <action method="setIdSuffix"><value>div</value></action>
42
+ <action method="setEnableOr"><value>1</value></action>
43
  </block>
44
  </reference>
45
  <reference name="checkout.cart.top_methods">
46
+ <block type="amazonpayments/pay_button" name="checkout.cart.methods.amazonpayments_pay.top" before="-">
47
  <action method="setIdSuffix"><value>top</value></action>
48
+ <action method="setEnableOr"><value>1</value></action>
49
  </block>
50
  </reference>
51
  </checkout_cart_index>
52
  <checkout_onepage_index>
53
  <reference name="checkout.onepage.login.before">
54
+ <block type="amazonpayments/onepage_button" name="onepage.amazonpayments.button">
55
+ <block type="amazonpayments/pay_button" name="onepage.amazonpayments.button.pay" template="creativestyle/amazonpayments/onepage/button.phtml">
56
+ <action method="setIdSuffix"><value>onepage</value></action>
57
+ <block type="core/template" name="onepage.amazonpayments.button.tooltip" as="amazonpayments_button_tooltip" template="creativestyle/amazonpayments/button/tooltip.phtml"/>
58
+ </block>
59
+ <block type="amazonpayments/login_button" name="onepage.amazonpayments.button.login" template="creativestyle/amazonpayments/onepage/button.phtml">
60
+ <action method="setIdSuffix"><value>onepage</value></action>
61
+ <block type="core/template" name="onepage.amazonpayments.button.tooltip" as="amazonpayments_button_tooltip" template="creativestyle/amazonpayments/button/tooltip.phtml"/>
62
+ </block>
63
  </block>
64
  </reference>
65
  </checkout_onepage_index>
71
  <action method="setTemplate"><template>page/1column.phtml</template></action>
72
  </reference>
73
  <reference name="content">
74
+ <block type="amazonpayments/checkout" name="amazonpayments.checkout" as="checkout" template="creativestyle/amazonpayments/checkout.phtml">
75
+ <block type="amazonpayments/checkout_notice" name="amazonpayments.checkout.capture_notice" as="capture_notice" template="creativestyle/amazonpayments/checkout/capture_notice.phtml"/>
76
+ <block type="checkout/onepage_shipping_method" name="amazonpayments.checkout.shipping_method" as="shipping_method" template="creativestyle/amazonpayments/checkout/shipping_method.phtml">
77
+ <block type="checkout/onepage_shipping_method_additional" name="amazonpayments.checkout.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
78
  </block>
79
+ <block type="amazonpayments/checkout_sandboxToolbox" name="amazonpayments.checkout.sandbox_toolbox" as="sandbox_toolbox" template="creativestyle/amazonpayments/checkout/sandbox_toolbox.phtml"/>
80
  <block type="checkout/onepage_review_info" name="amazonpayments_advanced.checkout.review" as="review" template="checkout/onepage/review/info.phtml">
81
  <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
82
  <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
89
  <label>Items After</label>
90
  </block>
91
  <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
92
+ <block type="core/template" name="checkout.onepage.review.button" as="button" template="creativestyle/amazonpayments/checkout/review/button.phtml"/>
93
  </block>
94
  </block>
95
  </reference>
96
  <reference name="before_body_end">
97
+ <block type="amazonpayments/checkout_js" name="amazonpayments.checkout.js" template="creativestyle/amazonpayments/checkout/js.phtml"/>
98
  </reference>
99
  </amazonpayments_advanced_checkout_index>
100
  <amazonpayments_advanced_shippingmethod>
117
  <label>Items After</label>
118
  </block>
119
  <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
120
+ <block type="core/template" name="checkout.onepage.review.button" as="button" template="creativestyle/amazonpayments/checkout/review/button.phtml"/>
121
  </block>
122
  </amazonpayments_advanced_review>
123
+ <customer_account_login>
124
+ <reference name="content">
125
+ <block type="amazonpayments/login_button" name="amazonpayments_login" template="creativestyle/amazonpayments/login/button/account_login.phtml">
126
+ <action method="setIdSuffix"><value>div</value></action>
127
+ <action method="setMoveBefore"><value>login-form</value></action>
128
+ </block>
129
+ </reference>
130
+ </customer_account_login>
131
+ <customer_account_logoutsuccess translate="label">
132
+ <reference name="before_body_end">
133
+ <block type="amazonpayments/login_logout" name="amazonpayments_login_logout" template="creativestyle/amazonpayments/login/logout.phtml"/>
134
+ </reference>
135
+ </customer_account_logoutsuccess>
136
+ <amazonpayments_advanced_login_index>
137
+ <remove name="right"/>
138
+ <remove name="left"/>
139
+ <reference name="root">
140
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
141
+ </reference>
142
+ </amazonpayments_advanced_login_index>
143
+ <amazonpayments_account_confirm>
144
+ <reference name="content">
145
+ <block type="amazonpayments/login_account_confirm" name="amazonpayments_login_account_confirm" template="creativestyle/amazonpayments/login/form/account_confirm.phtml" />
146
+ </reference>
147
+ </amazonpayments_account_confirm>
148
+ <amazonpayments_account_update>
149
+ <reference name="content">
150
+ <block type="amazonpayments/login_account_update" name="amazonpayments_login_account_update" template="creativestyle/amazonpayments/login/form/account_update.phtml" />
151
+ </reference>
152
+ </amazonpayments_account_update>
153
  </layout>
app/design/frontend/base/default/template/creativestyle/amazonpayments/advanced/button.phtml DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- /**
3
- * This file is part of the official Amazon Payments Advanced extension
4
- * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
- * All rights reserved
6
- *
7
- * Reuse or modification of this source code is not allowed
8
- * without written permission from creativestyle GmbH
9
- *
10
- * @category Creativestyle
11
- * @package Creativestyle_AmazonPayments
12
- * @copyright Copyright (c) 2014 creativestyle GmbH
13
- * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
- */
15
- ?>
16
- <?php echo $this->getChildHtml('amazonpayments_button_hint'); ?>
17
- <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?> with-tooltip">
18
- <img src="<?php echo $this->getButtonWidgetUrl(); ?>" style="cursor:pointer;" />
19
- <?php if (!$this->getDisableOr()): ?>
20
- <span class="amazonpayments-or"><?php echo $this->__('-OR-'); ?></span>
21
- <?php endif; ?>
22
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/creativestyle/amazonpayments/advanced/button/tooltip.phtml DELETED
@@ -1 +0,0 @@
1
- <img src="<?php echo $this->getSkinUrl('creativestyle/images/logo_a-glyph_1x.png'); ?>" alt="<?php echo $this->__('Pay with Amazon'); ?>"/><?php echo $this->__('<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.'); ?>
 
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/button → button}/js.phtml RENAMED
@@ -14,6 +14,7 @@
14
  */
15
  ?>
16
  <script type="text/javascript">//<![CDATA[
17
- APA.initialize('<?php echo $this->getMerchantId(); ?>', null, <?php echo ($this->isLive() ? 'true' : 'false'); ?>, <?php echo ($this->isVirtual() ? 'true' : 'false'); ?>, {checkout: '<?php echo $this->getCheckoutUrl(); ?>'})
18
- .renderButtonWidget('<?php echo $this->getChildHtml('amazonpayments_button_tooltip'); ?>');
 
19
  //]]></script>
14
  */
15
  ?>
16
  <script type="text/javascript">//<![CDATA[
17
+ APA.initialize(
18
+ '<?php echo $this->getMerchantId(); ?>', null, <?php echo ($this->isLive() ? 'true' : 'false'); ?>, <?php echo ($this->isVirtual() ? 'true' : 'false'); ?>, <?php echo $this->getUrlParams(); ?>, null, <?php echo $this->getDesignParams(); ?>
19
+ ).renderButtonWidget('<?php echo $this->getChildHtml('amazonpayments_button_tooltip'); ?>');
20
  //]]></script>
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/button/onepage.phtml → button/tooltip.phtml} RENAMED
@@ -13,10 +13,4 @@
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
16
- <div class="pay-with-amazon-onepage-shortcut">
17
- <h3><?php echo $this->__('Pay with Amazon'); ?></h3>
18
- <p><?php echo $this->getChildHtml('amazonpayments_onepage_button_tooltip'); ?></p>
19
- <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?>">
20
- <img src="<?php echo $this->getButtonWidgetUrl(); ?>"/>
21
- </div>
22
- </div>
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
16
+ <img src="<?php echo $this->getSkinUrl('creativestyle/images/logo_a-glyph_1x.png'); ?>" alt="<?php echo $this->__('Pay with Amazon'); ?>"/><?php echo $this->__('<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.'); ?>
 
 
 
 
 
 
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout.phtml → checkout.phtml} RENAMED
@@ -29,7 +29,6 @@
29
  <?php if (!$this->isVirtual()): ?>
30
  <li id="apa-shipping_method" class="section store-widget">
31
  <div class="step-title">
32
- <img src="<?php echo $this->getSkinUrl('creativestyle/images/logo_a-glyph_1x.png'); ?>" alt="<?php echo $this->__('Pay with Amazon'); ?>"/>
33
  <h2><?php echo $this->helper('checkout')->__('Shipping Method'); ?></h2>
34
  </div>
35
  <div class="section-content"><?php echo $this->getChildHtml('shipping_method'); ?></div>
@@ -39,7 +38,6 @@
39
  <?php if ($this->showSandboxToolbox()): ?>
40
  <li class="section store-widget">
41
  <div class="step-title">
42
- <img src="<?php echo $this->getSkinUrl('creativestyle/images/logo_a-glyph_1x.png'); ?>" alt="<?php echo $this->__('Pay with Amazon'); ?>"/>
43
  <h2><?php echo $this->helper('amazonpayments')->__('Sandbox Toolbox'); ?></h2>
44
  </div>
45
  <div class="section-content"><?php echo $this->getChildHtml('sandbox_toolbox'); ?></div>
@@ -47,7 +45,6 @@
47
  <?php endif; ?>
48
  <li id="apa-review" class="section store-widget">
49
  <div class="step-title">
50
- <img src="<?php echo $this->getSkinUrl('creativestyle/images/logo_a-glyph_1x.png'); ?>" alt="<?php echo $this->__('Pay with Amazon'); ?>"/>
51
  <h2><?php echo $this->helper('checkout')->__('Order Review'); ?></h2>
52
  </div>
53
  <div id="reviewWidgetDiv" class="section-content"><?php echo $this->getChildHtml('review'); ?></div>
29
  <?php if (!$this->isVirtual()): ?>
30
  <li id="apa-shipping_method" class="section store-widget">
31
  <div class="step-title">
 
32
  <h2><?php echo $this->helper('checkout')->__('Shipping Method'); ?></h2>
33
  </div>
34
  <div class="section-content"><?php echo $this->getChildHtml('shipping_method'); ?></div>
38
  <?php if ($this->showSandboxToolbox()): ?>
39
  <li class="section store-widget">
40
  <div class="step-title">
 
41
  <h2><?php echo $this->helper('amazonpayments')->__('Sandbox Toolbox'); ?></h2>
42
  </div>
43
  <div class="section-content"><?php echo $this->getChildHtml('sandbox_toolbox'); ?></div>
45
  <?php endif; ?>
46
  <li id="apa-review" class="section store-widget">
47
  <div class="step-title">
 
48
  <h2><?php echo $this->helper('checkout')->__('Order Review'); ?></h2>
49
  </div>
50
  <div id="reviewWidgetDiv" class="section-content"><?php echo $this->getChildHtml('review'); ?></div>
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/capture_notice.phtml RENAMED
File without changes
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/js.phtml RENAMED
@@ -13,6 +13,7 @@
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
 
16
  <script type="text/javascript">//<![CDATA[
17
 
18
  var quoteBaseGrandTotal = <?php echo (float)$this->getQuoteBaseGrandTotal(); ?>;
@@ -23,10 +24,10 @@
23
  Translator.add('There was an error processing your order. Please contact us or try again later.', '<?php echo $this->__('There was an error processing your order. Please contact us or try again later.'); ?>');
24
  }
25
 
26
- APA.initialize('<?php echo $this->getMerchantId(); ?>', '<?php echo $this->getOrderReferenceId(); ?>', <?php echo ($this->isLive() ? 'true' : 'false'); ?>, <?php echo ($this->isVirtual() ? 'true' : 'false'); ?>, {
 
27
  saveShipping: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveShipping'); ?>',
28
  saveShippingMethod: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveShippingMethod'); ?>',
29
- savePayment: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/savePayment'); ?>',
30
  saveOrder: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveOrder'); ?>',
31
  success: '<?php echo $this->getUrl('checkout/onepage/success'); ?>',
32
  failure: '<?php echo $this->getUrl('checkout/cart') ?>'
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
16
+ <?php $orderReferenceId = $this->getOrderReferenceId(); ?>
17
  <script type="text/javascript">//<![CDATA[
18
 
19
  var quoteBaseGrandTotal = <?php echo (float)$this->getQuoteBaseGrandTotal(); ?>;
24
  Translator.add('There was an error processing your order. Please contact us or try again later.', '<?php echo $this->__('There was an error processing your order. Please contact us or try again later.'); ?>');
25
  }
26
 
27
+ APA.initialize('<?php echo $this->getMerchantId(); ?>', <?php echo $orderReferenceId ? '\'' . $orderReferenceId . '\'' : 'null'; ?>,
28
+ <?php echo ($this->isLive() ? 'true' : 'false'); ?>, <?php echo ($this->isVirtual() ? 'true' : 'false'); ?>, {
29
  saveShipping: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveShipping'); ?>',
30
  saveShippingMethod: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveShippingMethod'); ?>',
 
31
  saveOrder: '<?php echo $this->getUrl('amazonpayments/advanced_checkout/saveOrder'); ?>',
32
  success: '<?php echo $this->getUrl('checkout/onepage/success'); ?>',
33
  failure: '<?php echo $this->getUrl('checkout/cart') ?>'
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/review/button.phtml RENAMED
File without changes
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/sandbox_toolbox.phtml RENAMED
File without changes
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/checkout → checkout}/shipping_method.phtml RENAMED
File without changes
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/head.phtml → head.phtml} RENAMED
@@ -13,4 +13,5 @@
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
 
16
  <script type="text/javascript" src="<?php echo $this->getWidgetUrl(); ?>"></script>
13
  * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
  */
15
  ?>
16
+ <?php echo $this->getChildHtml('amazonpayments_login_head'); ?>
17
  <script type="text/javascript" src="<?php echo $this->getWidgetUrl(); ?>"></script>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/button.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?>"></div>
17
+ <?php if ($this->isCustomDesignSet()): ?>
18
+ <script type="text/javascript">//<![CDATA[
19
+ var buttonDiv = $('<?php echo $this->getWidgetHtmlId(); ?>');
20
+ <?php if ($buttonType = $this->getButtonType()): ?>
21
+ buttonDiv.buttonType = '<?php echo $buttonType; ?>';
22
+ <?php endif; ?>
23
+ <?php if ($buttonSize = $this->getButtonSize()): ?>
24
+ buttonDiv.buttonSize = '<?php echo $buttonSize; ?>';
25
+ <?php endif; ?>
26
+ <?php if ($buttonColor = $this->getButtonColor()): ?>
27
+ buttonDiv.buttonColor = '<?php echo $buttonColor; ?>';
28
+ <?php endif; ?>
29
+ //]]></script>
30
+ <?php endif; ?>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/button/account_login.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div class="account-login amazon-login">
17
+ <div class="new-users">
18
+ <div class="content">
19
+ <h2><?php echo $this->helper('amazonpayments')->__('Use your Amazon Account') ?></h2>
20
+ <p>
21
+ <?php echo $this->helper('amazonpayments')->__('With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It\'s a convenient and trusted way to pay that\'s enjoyed by millions of people.'); ?>
22
+ <?php echo $this->helper('amazonpayments')->__('By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop.'); ?>
23
+ </p>
24
+ </div>
25
+ </div>
26
+ <div class="buttons-set">
27
+ <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?>"></div>
28
+ <?php if ($this->isCustomDesignSet()): ?>
29
+ <script type="text/javascript">//<![CDATA[
30
+ var buttonDiv = $('<?php echo $this->getWidgetHtmlId(); ?>');
31
+ <?php if ($buttonType = $this->getButtonType()): ?>
32
+ buttonDiv.buttonType = '<?php echo $buttonType; ?>';
33
+ <?php endif; ?>
34
+ <?php if ($buttonSize = $this->getButtonSize()): ?>
35
+ buttonDiv.buttonSize = '<?php echo $buttonSize; ?>';
36
+ <?php endif; ?>
37
+ <?php if ($buttonColor = $this->getButtonColor()): ?>
38
+ buttonDiv.buttonColor = '<?php echo $buttonColor; ?>';
39
+ <?php endif; ?>
40
+ //]]></script>
41
+ <?php endif; ?>
42
+ </div>
43
+ </div>
44
+ <?php if ($this->getMoveBefore()): ?>
45
+ <script type="text/javascript">//<![CDATA[
46
+ if ($('<?php echo $this->getMoveBefore(); ?>')) {
47
+ $$('div.amazon-login').each(function(element) {
48
+ $('<?php echo $this->getMoveBefore(); ?>').insert({before: element.addClassName('position-before')});
49
+ });
50
+ }
51
+ //]]></script>
52
+ <?php endif; ?>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/form/account_confirm.phtml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div class="account-login">
17
+ <div class="page-title">
18
+ <h1><?php echo $this->__('Account matching') ?></h1>
19
+ </div>
20
+ <?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
21
+ <form action="<?php echo $this->getPostActionUrl(); ?>" method="post" id="confirm-form">
22
+ <?php echo $this->getBlockHtml('formkey'); ?>
23
+ <input name="action" type="hidden" value="account_confirm">
24
+ <div class="account-login">
25
+ <div class="content">
26
+ <p><?php echo $this->__('Please enter your Magento password to match it with your Amazon account.') ?></p>
27
+ <ul class="form-list">
28
+ <li>
29
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
30
+ <div class="input-box">
31
+ <input type="text" name="login[username]" disabled="disabled" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
32
+ </div>
33
+ </li>
34
+ <li>
35
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
36
+ <div class="input-box">
37
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
38
+ </div>
39
+ </li>
40
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
41
+ </ul>
42
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
43
+ </div>
44
+ <div class="buttons-set">
45
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
46
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
47
+ <button type="button" class="button cancel" onclick="cancelMatching();"><span><span><?php echo $this->__('Cancel') ?></span></span></button>
48
+ </div>
49
+ </div>
50
+ </form>
51
+ <script type="text/javascript">//<![CDATA[
52
+ function cancelMatching() {
53
+ amazon.Login.logout();
54
+ setLocation('<?php echo $this->escapeUrl($this->getBackUrl()); ?>');
55
+ }
56
+ //]]></script>
57
+ </div>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/form/account_update.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div class="account-create">
17
+ <div class="page-title">
18
+ <h1><?php echo $this->__('Create an Account') ?></h1>
19
+ </div>
20
+ <?php echo $this->getChildHtml('form_fields_before')?>
21
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
22
+ <?php echo $this->getChildHtml('customer.form.register.extra')?>
23
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
24
+ <div class="content">
25
+ <p><?php echo $this->__('Please fill in required data that cannot be retrieved from your Amazon account.') ?></p>
26
+ </div>
27
+ <div class="fieldset">
28
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
29
+ <ul class="form-list">
30
+ <li class="fields">
31
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')
32
+ ->setFieldNameFormat($this->getFieldNameFormat())->setObject($this->getFormData())
33
+ ->setForceUseCustomerAttributes(true)->toHtml(); ?>
34
+ </li>
35
+ <?php if ($this->isNewsletterEnabled()): ?>
36
+ <li class="control">
37
+ <div class="input-box">
38
+ <input type="checkbox" name="account[is_subscribed]" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
39
+ </div>
40
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
41
+ <?php /* Extensions placeholder */ ?>
42
+ <?php echo $this->getChildHtml('customer.form.register.newsletter')?>
43
+ </li>
44
+ <?php endif ?>
45
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
46
+ <?php if ($_dob->isEnabled()): ?>
47
+ <li><?php echo $_dob->setFieldNameFormat($this->getFieldNameFormat())->setDate($this->getFormData()->getDob())->toHtml() ?></li>
48
+ <?php endif ?>
49
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
50
+ <?php if ($_taxvat->isEnabled()): ?>
51
+ <li><?php echo $_taxvat->setFieldNameFormat($this->getFieldNameFormat())->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
52
+ <?php endif ?>
53
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
54
+ <?php if ($_gender->isEnabled()): ?>
55
+ <li><?php echo $_gender->setFieldNameFormat($this->getFieldNameFormat())->setGender($this->getFormData()->getGender())->toHtml() ?></li>
56
+ <?php endif ?>
57
+ </ul>
58
+ </div>
59
+ <div class="buttons-set">
60
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
61
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" onclick="cancelMatching();" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
62
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
63
+ <button type="button" class="button cancel" onclick="cancelMatching();"><span><span><?php echo $this->__('Cancel') ?></span></span></button>
64
+ </div>
65
+ </form>
66
+ <script type="text/javascript">//<![CDATA[
67
+ function cancelMatching() {
68
+ amazon.Login.logout();
69
+ setLocation('<?php echo $this->escapeUrl($this->getBackUrl()); ?>');
70
+ }
71
+
72
+ var dataForm = new VarienForm('form-validate', true);
73
+ //]]></script>
74
+ </div>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/head.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <script type="text/javascript">//<![CDATA[
17
+ window.onAmazonLoginReady = function() {
18
+ amazon.Login.setClientId('<?php echo $this->getClientId(); ?>');
19
+ }
20
+ //]]></script>
app/design/frontend/base/default/template/creativestyle/amazonpayments/login/logout.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <script type="text/javascript">//<![CDATA[
17
+ amazon.Login.logout();
18
+ //]]></script>
app/design/frontend/base/default/template/creativestyle/amazonpayments/onepage/button.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div class="pay-with-amazon-onepage-shortcut">
17
+ <h3><?php echo $this->__('Pay with Amazon'); ?></h3>
18
+ <p><?php echo $this->getChildHtml('amazonpayments_button_tooltip'); ?></p>
19
+ <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?>">
20
+ <?php if ($buttonImgUrl = $this->getButtonWidgetUrl()): ?>
21
+ <img src="<?php echo $buttonImgUrl; ?>"/>
22
+ <?php endif; ?>
23
+ </div>
24
+ <?php if ($this->isCustomDesignSet()): ?>
25
+ <script type="text/javascript">//<![CDATA[
26
+ var buttonDiv = $('<?php echo $this->getWidgetHtmlId(); ?>');
27
+ <?php if ($buttonType = $this->getButtonType()): ?>
28
+ buttonDiv.buttonType = '<?php echo $buttonType; ?>';
29
+ <?php endif; ?>
30
+ <?php if ($buttonSize = $this->getButtonSize()): ?>
31
+ buttonDiv.buttonSize = '<?php echo $buttonSize; ?>';
32
+ <?php endif; ?>
33
+ <?php if ($buttonColor = $this->getButtonColor()): ?>
34
+ buttonDiv.buttonColor = '<?php echo $buttonColor; ?>';
35
+ <?php endif; ?>
36
+ //]]></script>
37
+ <?php endif; ?>
38
+ </div>
app/design/frontend/base/default/template/creativestyle/amazonpayments/pay/button.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <div id="<?php echo $this->getWidgetHtmlId(); ?>" class="<?php echo $this->getWidgetClass(); ?> with-tooltip">
17
+ <?php if ($buttonImgUrl = $this->getButtonWidgetUrl()): ?>
18
+ <img src="<?php echo $buttonImgUrl; ?>"/>
19
+ <?php endif; ?>
20
+ </div>
21
+ <?php if ($this->getEnableOr()): ?>
22
+ <span class="amazonpayments-or"><?php echo $this->__('-OR-'); ?></span>
23
+ <?php endif; ?>
24
+ <?php if ($this->isCustomDesignSet()): ?>
25
+ <script type="text/javascript">//<![CDATA[
26
+ var buttonDiv = $('<?php echo $this->getWidgetHtmlId(); ?>');
27
+ <?php if ($buttonType = $this->getButtonType()): ?>
28
+ buttonDiv.buttonType = '<?php echo $buttonType; ?>';
29
+ <?php endif; ?>
30
+ <?php if ($buttonSize = $this->getButtonSize()): ?>
31
+ buttonDiv.buttonSize = '<?php echo $buttonSize; ?>';
32
+ <?php endif; ?>
33
+ <?php if ($buttonColor = $this->getButtonColor()): ?>
34
+ buttonDiv.buttonColor = '<?php echo $buttonColor; ?>';
35
+ <?php endif; ?>
36
+ //]]></script>
37
+ <?php endif; ?>
app/design/frontend/base/default/template/creativestyle/amazonpayments/{advanced/payment → payment}/info.phtml RENAMED
File without changes
app/design/frontend/base/default/template/creativestyle/amazonpayments/payment/pdf/info.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the official Amazon Payments Advanced extension
4
+ * for Magento (c) creativestyle GmbH <amazon@creativestyle.de>
5
+ * All rights reserved
6
+ *
7
+ * Reuse or modification of this source code is not allowed
8
+ * without written permission from creativestyle GmbH
9
+ *
10
+ * @category Creativestyle
11
+ * @package Creativestyle_AmazonPayments
12
+ * @copyright Copyright (c) 2014 creativestyle GmbH
13
+ * @author Marek Zabrowarny / creativestyle GmbH <amazon@creativestyle.de>
14
+ */
15
+ ?>
16
+ <?php echo $this->__($this->getMethod()->getTitle()); ?>
app/locale/de_DE/Creativestyle_AmazonPayments.csv CHANGED
@@ -1,43 +1,146 @@
 
 
 
1
  """Pay with Amazon"" button color","""Bezahlen mit Amazon""-Button Farbe"
2
  """Pay with Amazon"" button size","""Bezahlen mit Amazon""-Button Größe"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Erweiterungen</div>"
 
 
 
 
 
4
  "Access Key ID","Access Key ID"
 
 
 
 
5
  "Allowed IPs (comma separated)","Erlaubte IPs (Kommagetrennt)"
6
- "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","Mit <strong>Amazon Payments</strong> können Sie die in Ihrem Amazon-Account hinterlegten Zahlungs- und Versandinformationen nutzen, um schnell und sicher einzukaufen. Zudem genießen Sie den Käuferschutz, den Amazon mit der A-bis-z-Garantie bietet."
 
7
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Autorisierung über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
8
  "An authorize request for %s has been submitted to Amazon Payments.","Eine Autorisierung über %s wurde an Amazon Payments geschickt."
9
- "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Belastung (Capture) über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
10
- "A capture request for %s has been submitted to Amazon Payments.","Eine Belastung (Capture) über %s wurde an Amazon Payments geschickt."
11
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Bestellung über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
12
  "An order of %s has been sent to Amazon Payments.","Eine Bestellung über %s wurde an Amazon Payments geschickt."
13
- "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Rückerstattung (Refund) über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
14
- "A refund request for %s has been submitted to Amazon Payments.","Eine Rückerstattung (Refund) über %s wurde an Amazon Payments geschickt."
15
  "Appearance Settings","Gestaltungseinstellungen"
 
 
16
  "Authorize","Autorisieren"
17
  "Authorize & capture","Autorisieren & erfassen"
 
 
 
 
 
18
  "creativestyle Extensions","creativestyle Erweiterungen"
 
 
 
 
 
 
 
 
 
 
19
  "Enable Instant Payment Notifications","Instant Payment Notifications aktiviert"
 
 
20
  "Enable Pay with Amazon","Bezahlen mit Amazon aktiviert"
 
 
 
 
 
 
 
 
21
  "Germany","Deutschland"
 
22
  "http://www.creativestyle.net","http://www.creativestyle.de"
23
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.de/leistungen/magento.html"
 
 
 
 
 
 
24
  "Large (151 x 27 pixels)","Groß (151 x 27 Pixel)"
25
  "Leave empty for access from any location","Leer lassen für den Zugriff von jedem beliebigen Standort"
 
 
 
 
 
26
  "Marketplace","Marktplatz"
 
27
  "Medium (126 x 24 pixels)","Mittel (126 x 24 Pixel)"
28
  "Merchant ID","Händlernummer"
29
- "North America","Nordamerika"
 
 
 
30
  "Orange (recommended)","Orange (empfohlen)"
31
- "Pay with Amazon","Bezahlen mit Amazon"
 
32
  "Payment Action","Zahlungsvorgang"
 
 
 
 
 
 
 
 
 
33
  "Please note that the total amount of the order will be charged at order placement.","Bitte beachten Sie dass der komplette Betrag bei Bestellung belastet wird."
34
  "Sandbox Mode","Sandbox-Modus"
35
  "Secret Access Key","Secret Access Key"
 
 
 
36
  "Settings","Einstellungen"
 
 
 
37
  "Tan","Beige"
38
  "There was an error processing your order. Please contact us or try again later.","Bei der Verarbeitung Ihrer Bestellung ist ein Fehler aufgetreten. Kontaktieren Sie uns oder probieren Sie es bitte später erneut."
 
39
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","Diese Funktion erfordert die Installation eines gültigen SSL-Zertifikats auf Ihrem Server. Achten Sie darauf, dass das SSL-Zertifikat von einer vertrauenswürdigen Zertifizierungsstelle ausgestellt wird. Selbst signierte Zertifikate sind nicht gestattet."
 
40
  "United Kingdom","Vereinigtes Königreich"
41
  "United States","Vereinigte Staaten"
 
 
 
42
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Besuchen Sie <a href=""%s"" target=""_blank"">%s</a> um mehr Informationen zu erhalten."
 
 
 
 
 
 
 
 
43
  "X-Large (173 x 27 pixels)","Sehr groß (173 x 27 Pixel)"
1
+ """Login with Amazon"" button color","""Login mit Amazon""-Button Farbe"
2
+ """Login with Amazon"" button size","""Login mit Amazon""-Button Größe"
3
+ """Login with Amazon"" button type","""Login mit Amazon""-Button Typ"
4
  """Pay with Amazon"" button color","""Bezahlen mit Amazon""-Button Farbe"
5
  """Pay with Amazon"" button size","""Bezahlen mit Amazon""-Button Größe"
6
+ """Pay with Amazon"" button type","""Bezahlen mit Amazon""-Button Typ"
7
+ "* Required Fields","* Pflichtfelder"
8
+ "--- Select object ---","--- Objekt auswählen ---"
9
+ "--- Select reason code ---","--- Reason code auswählen ---"
10
+ "--- Select state to simulate ---","--- Simulationsstatus auswählen ---"
11
+ "-ODER-","-ODER-"
12
+ "1 day","1 Tag"
13
+ "1 hour","1 Stunde"
14
+ "2 days","2 Tage"
15
+ "2 hours","2 Stunden"
16
+ "3 days","3 Tage"
17
+ "4 hours","4 Stunden"
18
+ "5 minutes","5 Minuten"
19
+ "7 days","7 Tage"
20
+ "8 hours","8 Stunden"
21
+ "10 minutes","10 Minuten"
22
+ "12 hours","12 Stunden"
23
+ "14 days","14 Tage"
24
+ "15 days","15 Tage"
25
+ "15 minutes","15 Minuten"
26
+ "30 days","30 Tage"
27
+ "30 minutes","30 Minuten"
28
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Erweiterungen</div>"
29
+ "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","Mit <strong>Amazon Payments</strong> können Sie die in Ihrem Amazon-Account hinterlegten Zahlungs- und Versandinformationen nutzen, um schnell und sicher einzukaufen. Zudem genießen Sie den Käuferschutz, den Amazon mit der A-bis-z-Garantie bietet."
30
+ "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Belastung (Capture) über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
31
+ "A capture request for %s has been submitted to Amazon Payments.","Eine Belastung (Capture) über %s wurde an Amazon Payments geschickt."
32
+ "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Rückerstattung (Refund) über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
33
+ "A refund request for %s has been submitted to Amazon Payments.","Eine Rückerstattung (Refund) über %s wurde an Amazon Payments geschickt."
34
  "Access Key ID","Access Key ID"
35
+ "Action","Aktion"
36
+ "Add New","Add New"
37
+ "Address widget height","Höhe Addressbuchwidget"
38
+ "Address widget width","Breite Addressbuchwidget"
39
  "Allowed IPs (comma separated)","Erlaubte IPs (Kommagetrennt)"
40
+ "Amazon Cronjobs","Amazon Cronjobs"
41
+ "Amazon Payments Account","Amazon Payments Konto"
42
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Autorisierung über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
43
  "An authorize request for %s has been submitted to Amazon Payments.","Eine Autorisierung über %s wurde an Amazon Payments geschickt."
 
 
44
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","Eine Bestellung über %s wurde von Amazon Payments bearbeitet (%s). Der neue Status ist %s."
45
  "An order of %s has been sent to Amazon Payments.","Eine Bestellung über %s wurde an Amazon Payments geschickt."
 
 
46
  "Appearance Settings","Gestaltungseinstellungen"
47
+ "Appearance Settings for Login and Pay with Amazon","Gestaltungseinstellungen für Login und Bezahlen mit Amazon"
48
+ "Appearance Settings for standalone Pay with Amazon","Gestaltungseinstellungen für Bezahlen mit Amazon"
49
  "Authorize","Autorisieren"
50
  "Authorize & capture","Autorisieren & erfassen"
51
+ "Back","Zurück"
52
+ "By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop.","Wenn Sie Login und Bezahlen mit Amazon nutzen, müssen Sie im Webshop kein Kundenkonto einrichten, sondern können sich direkt mit den Daten aus Ihrem Amazon-Konto anmelden."
53
+ "Client ID","Client ID"
54
+ "Common Appearance Settings","Allgemeine Gestaltungseinstellungen"
55
+ "Congratulations! Your Amazon Payments account settings seem to be OK.","Glückwunsch! Ihre Amazon Payments Kontoinformationen sind korrekt."
56
  "creativestyle Extensions","creativestyle Erweiterungen"
57
+ "Dark gray","Dunkelgrau"
58
+ "Data polling frequency","Datenpollingfrequenz"
59
+ "Date","Datum"
60
+ "Debug data","Debug Data"
61
+ "Declined Payment Email Sender","Absender für die Email für abgelehnte Zahlungen"
62
+ "Declined Payment Email Template","Email Template für abgelehnte Zahlungen"
63
+ "Developer Options","Entwickler Optionen"
64
+ "Download as CSV","Herunterladen als CSV"
65
+ "Each logfile will be rotated when it exceeds size of 8 Megabytes","Sobald 8 Megabyte überschritten werden, wird eine neue Datei erstellt."
66
+ "Email Options","Email Optionen"
67
  "Enable Instant Payment Notifications","Instant Payment Notifications aktiviert"
68
+ "Enable logging","Logging einschalten"
69
+ "Enable Login with Amazon","Login mit Amazon aktivieren"
70
  "Enable Pay with Amazon","Bezahlen mit Amazon aktiviert"
71
+ "Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.","Geben Sie einen Wert zwischen 200 und 600 Pixel. Für ein einspaltiges Widget geben Sie bitte ein Breite von weniger als 400 ein."
72
+ "Enter a value between 228 and 400 pixels","Geben Sie einen Wert zwischen 228 und 400 Pixel"
73
+ "ERP mode","ERP Modus"
74
+ "Event Observers","Event Observers"
75
+ "Exception code","Exception Code"
76
+ "Exception message","Exception Nachricht"
77
+ "General Info","Allgemeine Infos"
78
+ "General Settings","Allgemeine Einstellungen"
79
  "Germany","Deutschland"
80
+ "Gold","Golden"
81
  "http://www.creativestyle.net","http://www.creativestyle.de"
82
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.de/leistungen/magento.html"
83
+ "In Sandbox Mode you can simulate certain states of selected payment objects.","Im Sandbox Modus können Sie verschiedene Statuswerte von bestimmten Zahlungsobjekten simulieren."
84
+ "Installed Magento extensions","Installierte Magento Erweiterungen"
85
+ "Installed PHP modules","Installierte PHP Module"
86
+ "IPN endpoint URL","IPN Endpunkt URL"
87
+ "IPN Notifications","IPN Notifications"
88
+ "Large","Groß"
89
  "Large (151 x 27 pixels)","Groß (151 x 27 Pixel)"
90
  "Leave empty for access from any location","Leer lassen für den Zugriff von jedem beliebigen Standort"
91
+ "Light gray","Hellgrau"
92
+ "Login and Pay with Amazon","Login und Bezahlen mit Amazon"
93
+ "Login with Amazon","Login mit Amazon"
94
+ "Magento Settings","Magento Settings"
95
+ "Manual authorization","Manuel authorisieren"
96
  "Marketplace","Marktplatz"
97
+ "Medium","Mittel"
98
  "Medium (126 x 24 pixels)","Mittel (126 x 24 Pixel)"
99
  "Merchant ID","Händlernummer"
100
+ "Next page","Nächste Seite"
101
+ "No, use data polling instead","Nein, data polling anstelle benutzen"
102
+ "Notification type","Notification type"
103
+ "of %s pages","von %s Seiten"
104
  "Orange (recommended)","Orange (empfohlen)"
105
+ "Order status on authorization","Status der Bestellung nach der Autorisierung"
106
+ "Page","Seite"
107
  "Payment Action","Zahlungsvorgang"
108
+ "Payment widget height","Payment widget height"
109
+ "Payment widget width","Payment widget width"
110
+ "Pay with Amazon","Bezahlen mit Amazon"
111
+ "Pay with Amazon API Calls","Pay with Amazon API Calls"
112
+ "Pay with Amazon Exceptions","Pay with Amazon Exceptions"
113
+ "per page","pro Seite"
114
+ "Please enter this URL in the <strong>Merchant URL</strong> field of the Integration Settings in your Amazon Seller Central.","Diese URL bitte in dem Feld <strong>Händler-URL</strong> in den Integrationseinstellungen in der Amazon Sellercentral einstellen."
115
+ "Preview","Vorschau"
116
+ "Response code","Response code"
117
  "Please note that the total amount of the order will be charged at order placement.","Bitte beachten Sie dass der komplette Betrag bei Bestellung belastet wird."
118
  "Sandbox Mode","Sandbox-Modus"
119
  "Secret Access Key","Secret Access Key"
120
+ "Select appropriate store view scope to display IPN endpoint URL","Bitte den richtigen Konfigurationsumfang in der Liste der Läden auswählen um die IPN endpoint URLs anzuzeigen."
121
+ "Select whether an email confirmation for newly placed orders shall be sent by the shop","Auswählen ob eine Bestätigungsemail für neue Bestellungen durch den Shop verschickt wird."
122
+ "Send order confirmation","Bestellbestätigung"
123
  "Settings","Einstellungen"
124
+ "Show Sandbox Toolbox","Sandbox Toolbox anzeigen"
125
+ "Small","Klein"
126
+ "Stores","Stores"
127
  "Tan","Beige"
128
  "There was an error processing your order. Please contact us or try again later.","Bei der Verarbeitung Ihrer Bestellung ist ein Fehler aufgetreten. Kontaktieren Sie uns oder probieren Sie es bitte später erneut."
129
+ "This extension integrates easily your Magento shop with Pay with Amazon service.","Die Erweiterun integriert den ""Login und Bezahlen mit Amazon"" Service in ihren Magento Shop."
130
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","Diese Funktion erfordert die Installation eines gültigen SSL-Zertifikats auf Ihrem Server. Achten Sie darauf, dass das SSL-Zertifikat von einer vertrauenswürdigen Zertifizierungsstelle ausgestellt wird. Selbst signierte Zertifikate sind nicht gestattet."
131
+ "Total %d records found","Total %d Einträge gefunden"
132
  "United Kingdom","Vereinigtes Königreich"
133
  "United States","Vereinigte Staaten"
134
+ "URL","URL"
135
+ "Use your Amazon Account","Melden Sie sich mit ihrem Amazon Konto an"
136
+ "View","Ansicht"
137
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Besuchen Sie <a href=""%s"" target=""_blank"">%s</a> um mehr Informationen zu erhalten."
138
+ "Wallet widget height","Höhe Zahlartenwidget"
139
+ "Wallet widget width","Breite Zahlartenwidget"
140
+ "Whether to show a toolbox in the checkout for simulating different payment scenarios.","Auswahl ob die Toolbox zum simulieren von verschiedenen Zahlungsscenarios (inklusive Ablehnungen) im Sandbox Modus angezeigt wird"
141
+ "With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people.","Mit Login und Bezahlen über Amazon können Sie im Webshop mit den Zahlungs- und Versandinformationen aus Ihrem Amazon-Kundenkonto bezahlen. Das macht Einkaufen bei uns schnell, einfach und sicher."
142
+ "Whoops! Your Access Key ID seems to be invalid.","Whoops! Ihre Access Key ID ist nicht korrekt."
143
+ "Whoops! Your Merchant ID seems to be invalid.","Whoops! Ihre Händlernummer ist nicht korrekt."
144
+ "Whoops! Your Secret Access Key seems to be invalid.","Whoops! Ihr Secret Access Key ist nicht korrekt.""With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people.","Mit Login und Bezahlen über Amazon können Sie im Webshop mit den Zahlungs- und Versandinformationen aus Ihrem Amazon-Kundenkonto bezahlen. Das macht Einkaufen bei uns schnell, einfach und sicher."
145
+ "X-Large","Sehr groß"
146
  "X-Large (173 x 27 pixels)","Sehr groß (173 x 27 Pixel)"
app/locale/en_GB/Creativestyle_AmazonPayments.csv CHANGED
@@ -1,43 +1,146 @@
 
 
 
1
  """Pay with Amazon"" button color","""Pay with Amazon"" button colour"
2
  """Pay with Amazon"" button size","""Pay with Amazon"" button size"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Extensions</div>"
 
 
 
 
 
4
  "Access Key ID","Access Key ID"
 
 
 
 
5
  "Allowed IPs (comma separated)","Allowed IPs (comma separated)"
6
- "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee."
 
7
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","An authorization of %s has been processed by Amazon Payments (%s). The new status is %s."
8
  "An authorize request for %s has been submitted to Amazon Payments.","An authorize request for %s has been submitted to Amazon Payments."
9
- "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","A capture of %s has been processed by Amazon Payments (%s). The new status is %s."
10
- "A capture request for %s has been submitted to Amazon Payments.","A capture request for %s has been submitted to Amazon Payments."
11
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","An order of %s has been processed by Amazon Payments (%s). The new status is %s."
12
  "An order of %s has been sent to Amazon Payments.","An order of %s has been sent to Amazon Payments."
13
- "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","A refund of %s has been processed by Amazon Payments (%s). The new status is %s."
14
- "A refund request for %s has been submitted to Amazon Payments.","A refund request for %s has been submitted to Amazon Payments."
15
  "Appearance Settings","Appearance Settings"
 
 
16
  "Authorize","Authorize"
17
  "Authorize & capture","Authorize & capture"
 
 
 
 
 
18
  "creativestyle Extensions","creativestyle Extensions"
 
 
 
 
 
 
 
 
 
 
19
  "Enable Instant Payment Notifications","Enable Instant Payment Notifications"
 
 
20
  "Enable Pay with Amazon","Enable Pay with Amazon"
 
 
 
 
 
 
 
 
21
  "Germany","Germany"
 
22
  "http://www.creativestyle.net","http://www.creativestyle.net"
23
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.net/services/magento.html"
 
 
 
 
 
 
24
  "Large (151 x 27 pixels)","Large (151 x 27 pixels)"
25
  "Leave empty for access from any location","Leave empty for access from any location"
 
 
 
 
 
26
  "Marketplace","Marketplace"
 
27
  "Medium (126 x 24 pixels)","Medium (126 x 24 pixels)"
28
  "Merchant ID","Merchant ID"
29
- "North America","North America"
 
 
 
30
  "Orange (recommended)","Orange (recommended)"
31
- "Pay with Amazon","Pay with Amazon"
 
32
  "Payment Action","Payment Action"
 
 
 
 
 
 
 
 
 
33
  "Please note that the total amount of the order will be charged at order placement.","Please note that the total amount of the order will be charged at order placement."
34
  "Sandbox Mode","Sandbox Mode"
35
  "Secret Access Key","Secret Access Key"
 
 
 
36
  "Settings","Settings"
 
 
 
37
  "Tan","Tan"
38
  "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later."
 
39
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted."
 
40
  "United Kingdom","United Kingdom"
41
  "United States","United States"
 
 
 
42
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Visit <a href=""%s"" target=""_blank"">%s</a> to get more information."
 
 
 
 
 
 
 
 
43
  "X-Large (173 x 27 pixels)","X-Large (173 x 27 pixels)"
1
+ """Login with Amazon"" button color","""Login with Amazon"" button colour"
2
+ """Login with Amazon"" button size","""Login with Amazon"" button size"
3
+ """Login with Amazon"" button type","""Login with Amazon"" button type"
4
  """Pay with Amazon"" button color","""Pay with Amazon"" button colour"
5
  """Pay with Amazon"" button size","""Pay with Amazon"" button size"
6
+ """Pay with Amazon"" button type","""Pay with Amazon"" button type"
7
+ "* Required Fields","* Required Fields"
8
+ "--- Select object ---","--- Select object ---"
9
+ "--- Select reason code ---","--- Select reason code ---"
10
+ "--- Select state to simulate ---","--- Select state to simulate ---"
11
+ "-OR-","-OR-"
12
+ "1 day","1 day"
13
+ "1 hour","1 hour"
14
+ "2 days","2 days"
15
+ "2 hours","2 hours"
16
+ "3 days","3 days"
17
+ "4 hours","4 hours"
18
+ "5 minutes","5 minutes"
19
+ "7 days","7 days"
20
+ "8 hours","8 hours"
21
+ "10 minutes","10 minutes"
22
+ "12 hours","12 hours"
23
+ "14 days","14 days"
24
+ "15 days","15 days"
25
+ "15 minutes","15 minutes"
26
+ "30 days","30 days"
27
+ "30 minutes","30 minutes"
28
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Extensions</div>"
29
+ "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee."
30
+ "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","A capture of %s has been processed by Amazon Payments (%s). The new status is %s."
31
+ "A capture request for %s has been submitted to Amazon Payments.","A capture request for %s has been submitted to Amazon Payments."
32
+ "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","A refund of %s has been processed by Amazon Payments (%s). The new status is %s."
33
+ "A refund request for %s has been submitted to Amazon Payments.","A refund request for %s has been submitted to Amazon Payments."
34
  "Access Key ID","Access Key ID"
35
+ "Action","Action"
36
+ "Add New","Add New"
37
+ "Address widget height","Address widget height"
38
+ "Address widget width","Address widget width"
39
  "Allowed IPs (comma separated)","Allowed IPs (comma separated)"
40
+ "Amazon Cronjobs","Amazon Cronjobs"
41
+ "Amazon Payments Account","Amazon Payments Account"
42
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","An authorization of %s has been processed by Amazon Payments (%s). The new status is %s."
43
  "An authorize request for %s has been submitted to Amazon Payments.","An authorize request for %s has been submitted to Amazon Payments."
 
 
44
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","An order of %s has been processed by Amazon Payments (%s). The new status is %s."
45
  "An order of %s has been sent to Amazon Payments.","An order of %s has been sent to Amazon Payments."
 
 
46
  "Appearance Settings","Appearance Settings"
47
+ "Appearance Settings for Login and Pay with Amazon","Appearance Settings for Login and Pay with Amazon"
48
+ "Appearance Settings for standalone Pay with Amazon","Appearance Settings for standalone Pay with Amazon"
49
  "Authorize","Authorize"
50
  "Authorize & capture","Authorize & capture"
51
+ "Back","Back"
52
+ "By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop.","By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop."
53
+ "Client ID","Client ID"
54
+ "Common Appearance Settings","Common Appearance Settings"
55
+ "Congratulations! Your Amazon Payments account settings seem to be OK.","Congratulations! Your Amazon Payments account settings seem to be OK."
56
  "creativestyle Extensions","creativestyle Extensions"
57
+ "Dark gray","Dark grey"
58
+ "Data polling frequency","Data polling frequency"
59
+ "Date","Date"
60
+ "Debug data","Debug data"
61
+ "Declined Payment Email Sender","Declined Payment Email Sender"
62
+ "Declined Payment Email Template","Declined Payment Email Template"
63
+ "Developer Options","Developer Options"
64
+ "Download as CSV","Download as CSV"
65
+ "Each logfile will be rotated when it exceeds size of 8 Megabytes","Each logfile will be rotated when it exceeds size of 8 Megabytes"
66
+ "Email Options","Email Options"
67
  "Enable Instant Payment Notifications","Enable Instant Payment Notifications"
68
+ "Enable logging","Enable logging"
69
+ "Enable Login with Amazon","Enable Login with Amazon"
70
  "Enable Pay with Amazon","Enable Pay with Amazon"
71
+ "Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.","Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400."
72
+ "Enter a value between 228 and 400 pixels","Enter a value between 228 and 400 pixels"
73
+ "ERP mode","ERP mode"
74
+ "Event Observers","Event Observers"
75
+ "Exception code","Exception code"
76
+ "Exception message","Exception message"
77
+ "General Info","General Info"
78
+ "General Settings","General Settings"
79
  "Germany","Germany"
80
+ "Gold","Gold"
81
  "http://www.creativestyle.net","http://www.creativestyle.net"
82
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.net/services/magento.html"
83
+ "In Sandbox Mode you can simulate certain states of selected payment objects.","In Sandbox Mode you can simulate certain states of selected payment objects."
84
+ "Installed Magento extensions","Installed Magento extensions"
85
+ "Installed PHP modules","Installed PHP modules"
86
+ "IPN endpoint URL","IPN endpoint URL"
87
+ "IPN Notifications","IPN Notifications"
88
+ "Large","Large"
89
  "Large (151 x 27 pixels)","Large (151 x 27 pixels)"
90
  "Leave empty for access from any location","Leave empty for access from any location"
91
+ "Light gray","Light grey"
92
+ "Login and Pay with Amazon","Login and Pay with Amazon"
93
+ "Login with Amazon","Login with Amazon"
94
+ "Magento Settings","Magento Settings"
95
+ "Manual authorization","Manual authorization"
96
  "Marketplace","Marketplace"
97
+ "Medium","Medium"
98
  "Medium (126 x 24 pixels)","Medium (126 x 24 pixels)"
99
  "Merchant ID","Merchant ID"
100
+ "Next page","Next page"
101
+ "No, use data polling instead","No, use data polling instead"
102
+ "Notification type","Notification type"
103
+ "of %s pages","of %s pages"
104
  "Orange (recommended)","Orange (recommended)"
105
+ "Order status on authorization","Order status on authorization"
106
+ "Page","Page"
107
  "Payment Action","Payment Action"
108
+ "Payment widget height","Payment widget height"
109
+ "Payment widget width","Payment widget width"
110
+ "Pay with Amazon","Pay with Amazon"
111
+ "Pay with Amazon API Calls","Pay with Amazon API Calls"
112
+ "Pay with Amazon Exceptions","Pay with Amazon Exceptions"
113
+ "per page","per page"
114
+ "Please enter this URL in the <strong>Merchant URL</strong> field of the Integration Settings in your Amazon Seller Central.","Please enter this URL in the <strong>Merchant URL</strong> field of the Integration Settings in your Amazon Seller Central."
115
+ "Preview","Preview"
116
+ "Response code","Response code"
117
  "Please note that the total amount of the order will be charged at order placement.","Please note that the total amount of the order will be charged at order placement."
118
  "Sandbox Mode","Sandbox Mode"
119
  "Secret Access Key","Secret Access Key"
120
+ "Select appropriate store view scope to display IPN endpoint URL","Select appropriate store view scope to display IPN endpoint URL"
121
+ "Select whether an email confirmation for newly placed orders shall be sent by the shop","Select whether an email confirmation for newly placed orders shall be sent by the shop"
122
+ "Send order confirmation","Send order confirmation"
123
  "Settings","Settings"
124
+ "Show Sandbox Toolbox","Show Sandbox Toolbox"
125
+ "Small","Small"
126
+ "Stores","Stores"
127
  "Tan","Tan"
128
  "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later."
129
+ "This extension integrates easily your Magento shop with Pay with Amazon service.","This extension integrates easily your Magento shop with Pay with Amazon service."
130
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted."
131
+ "Total %d records found","Total %d records found"
132
  "United Kingdom","United Kingdom"
133
  "United States","United States"
134
+ "URL","URL"
135
+ "Use your Amazon Account","Use your Amazon Account"
136
+ "View","View"
137
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Visit <a href=""%s"" target=""_blank"">%s</a> to get more information."
138
+ "Wallet widget height","Wallet widget height"
139
+ "Wallet widget width","Wallet widget width"
140
+ "Whether to show a toolbox in the checkout for simulating different payment scenarios.","Whether to show a toolbox in the checkout for simulating different payment scenarios."
141
+ "Whoops! Your Access Key ID seems to be invalid.","Whoops! Your Access Key ID seems to be invalid."
142
+ "Whoops! Your Merchant ID seems to be invalid.","Whoops! Your Merchant ID seems to be invalid."
143
+ "Whoops! Your Secret Access Key seems to be invalid.","Whoops! Your Secret Access Key seems to be invalid."
144
+ "With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people.","With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people."
145
+ "X-Large","X-Large"
146
  "X-Large (173 x 27 pixels)","X-Large (173 x 27 pixels)"
app/locale/en_US/Creativestyle_AmazonPayments.csv CHANGED
@@ -1,43 +1,146 @@
 
 
 
1
  """Pay with Amazon"" button color","""Pay with Amazon"" button color"
2
  """Pay with Amazon"" button size","""Pay with Amazon"" button size"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Extensions</div>"
 
 
 
 
 
4
  "Access Key ID","Access Key ID"
 
 
 
 
5
  "Allowed IPs (comma separated)","Allowed IPs (comma separated)"
6
- "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee."
 
7
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","An authorization of %s has been processed by Amazon Payments (%s). The new status is %s."
8
  "An authorize request for %s has been submitted to Amazon Payments.","An authorize request for %s has been submitted to Amazon Payments."
9
- "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","A capture of %s has been processed by Amazon Payments (%s). The new status is %s."
10
- "A capture request for %s has been submitted to Amazon Payments.","A capture request for %s has been submitted to Amazon Payments."
11
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","An order of %s has been processed by Amazon Payments (%s). The new status is %s."
12
  "An order of %s has been sent to Amazon Payments.","An order of %s has been sent to Amazon Payments."
13
- "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","A refund of %s has been processed by Amazon Payments (%s). The new status is %s."
14
- "A refund request for %s has been submitted to Amazon Payments.","A refund request for %s has been submitted to Amazon Payments."
15
  "Appearance Settings","Appearance Settings"
 
 
16
  "Authorize","Authorize"
17
  "Authorize & capture","Authorize & capture"
 
 
 
 
 
18
  "creativestyle Extensions","creativestyle Extensions"
 
 
 
 
 
 
 
 
 
 
19
  "Enable Instant Payment Notifications","Enable Instant Payment Notifications"
 
 
20
  "Enable Pay with Amazon","Enable Pay with Amazon"
 
 
 
 
 
 
 
 
21
  "Germany","Germany"
 
22
  "http://www.creativestyle.net","http://www.creativestyle.net"
23
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.net/services/magento.html"
 
 
 
 
 
 
24
  "Large (151 x 27 pixels)","Large (151 x 27 pixels)"
25
  "Leave empty for access from any location","Leave empty for access from any location"
 
 
 
 
 
26
  "Marketplace","Marketplace"
 
27
  "Medium (126 x 24 pixels)","Medium (126 x 24 pixels)"
28
  "Merchant ID","Merchant ID"
29
- "North America","North America"
 
 
 
30
  "Orange (recommended)","Orange (recommended)"
31
- "Pay with Amazon","Pay with Amazon"
 
32
  "Payment Action","Payment Action"
 
 
 
 
 
 
 
 
 
33
  "Please note that the total amount of the order will be charged at order placement.","Please note that the total amount of the order will be charged at order placement."
34
  "Sandbox Mode","Sandbox Mode"
35
  "Secret Access Key","Secret Access Key"
 
 
 
36
  "Settings","Settings"
 
 
 
37
  "Tan","Tan"
38
  "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later."
 
39
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted."
 
40
  "United Kingdom","United Kingdom"
41
  "United States","United States"
 
 
 
42
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Visit <a href=""%s"" target=""_blank"">%s</a> to get more information."
 
 
 
 
 
 
 
 
43
  "X-Large (173 x 27 pixels)","X-Large (173 x 27 pixels)"
1
+ """Login with Amazon"" button color","""Login with Amazon"" button color"
2
+ """Login with Amazon"" button size","""Login with Amazon"" button size"
3
+ """Login with Amazon"" button type","""Login with Amazon"" button type"
4
  """Pay with Amazon"" button color","""Pay with Amazon"" button color"
5
  """Pay with Amazon"" button size","""Pay with Amazon"" button size"
6
+ """Pay with Amazon"" button type","""Pay with Amazon"" button type"
7
+ "* Required Fields","* Required Fields"
8
+ "--- Select object ---","--- Select object ---"
9
+ "--- Select reason code ---","--- Select reason code ---"
10
+ "--- Select state to simulate ---","--- Select state to simulate ---"
11
+ "-OR-","-OR-"
12
+ "1 day","1 day"
13
+ "1 hour","1 hour"
14
+ "2 days","2 days"
15
+ "2 hours","2 hours"
16
+ "3 days","3 days"
17
+ "4 hours","4 hours"
18
+ "5 minutes","5 minutes"
19
+ "7 days","7 days"
20
+ "8 hours","8 hours"
21
+ "10 minutes","10 minutes"
22
+ "12 hours","12 hours"
23
+ "14 days","14 days"
24
+ "15 days","15 days"
25
+ "15 minutes","15 minutes"
26
+ "30 days","30 days"
27
+ "30 minutes","30 minutes"
28
  "<div id=""creative-system-config"">creativestyle Extensions</div>","<div id=""creative-system-config"">creativestyle Extensions</div>"
29
+ "<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee.","<strong>Amazon Payments</strong> helps you shop quickly, safely and securely. You can pay on our website without re-entering your payment and address details. All Amazon transactions are protected by Amazon&apos;s A-to-z Guarantee."
30
+ "A capture of %s has been processed by Amazon Payments (%s). The new status is %s.","A capture of %s has been processed by Amazon Payments (%s). The new status is %s."
31
+ "A capture request for %s has been submitted to Amazon Payments.","A capture request for %s has been submitted to Amazon Payments."
32
+ "A refund of %s has been processed by Amazon Payments (%s). The new status is %s.","A refund of %s has been processed by Amazon Payments (%s). The new status is %s."
33
+ "A refund request for %s has been submitted to Amazon Payments.","A refund request for %s has been submitted to Amazon Payments."
34
  "Access Key ID","Access Key ID"
35
+ "Action","Action"
36
+ "Add New","Add New"
37
+ "Address widget height","Address widget height"
38
+ "Address widget width","Address widget width"
39
  "Allowed IPs (comma separated)","Allowed IPs (comma separated)"
40
+ "Amazon Cronjobs","Amazon Cronjobs"
41
+ "Amazon Payments Account","Amazon Payments Account"
42
  "An authorization of %s has been processed by Amazon Payments (%s). The new status is %s.","An authorization of %s has been processed by Amazon Payments (%s). The new status is %s."
43
  "An authorize request for %s has been submitted to Amazon Payments.","An authorize request for %s has been submitted to Amazon Payments."
 
 
44
  "An order of %s has been processed by Amazon Payments (%s). The new status is %s.","An order of %s has been processed by Amazon Payments (%s). The new status is %s."
45
  "An order of %s has been sent to Amazon Payments.","An order of %s has been sent to Amazon Payments."
 
 
46
  "Appearance Settings","Appearance Settings"
47
+ "Appearance Settings for Login and Pay with Amazon","Appearance Settings for Login and Pay with Amazon"
48
+ "Appearance Settings for standalone Pay with Amazon","Appearance Settings for standalone Pay with Amazon"
49
  "Authorize","Authorize"
50
  "Authorize & capture","Authorize & capture"
51
+ "Back","Back"
52
+ "By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop.","By selecting Amazon Payments, you will be asked to sign-in securely to your Amazon account without leaving the shop."
53
+ "Client ID","Client ID"
54
+ "Common Appearance Settings","Common Appearance Settings"
55
+ "Congratulations! Your Amazon Payments account settings seem to be OK.","Congratulations! Your Amazon Payments account settings seem to be OK."
56
  "creativestyle Extensions","creativestyle Extensions"
57
+ "Dark gray","Dark gray"
58
+ "Data polling frequency","Data polling frequency"
59
+ "Date","Date"
60
+ "Debug data","Debug data"
61
+ "Declined Payment Email Sender","Declined Payment Email Sender"
62
+ "Declined Payment Email Template","Declined Payment Email Template"
63
+ "Developer Options","Developer Options"
64
+ "Download as CSV","Download as CSV"
65
+ "Each logfile will be rotated when it exceeds size of 8 Megabytes","Each logfile will be rotated when it exceeds size of 8 Megabytes"
66
+ "Email Options","Email Options"
67
  "Enable Instant Payment Notifications","Enable Instant Payment Notifications"
68
+ "Enable logging","Enable logging"
69
+ "Enable Login with Amazon","Enable Login with Amazon"
70
  "Enable Pay with Amazon","Enable Pay with Amazon"
71
+ "Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400.","Enter a value between 200 and 600 pixels. For one-column widget please enter width less than 400."
72
+ "Enter a value between 228 and 400 pixels","Enter a value between 228 and 400 pixels"
73
+ "ERP mode","ERP mode"
74
+ "Event Observers","Event Observers"
75
+ "Exception code","Exception code"
76
+ "Exception message","Exception message"
77
+ "General Info","General Info"
78
+ "General Settings","General Settings"
79
  "Germany","Germany"
80
+ "Gold","Gold"
81
  "http://www.creativestyle.net","http://www.creativestyle.net"
82
  "http://www.creativestyle.net/services/magento.html","http://www.creativestyle.net/services/magento.html"
83
+ "In Sandbox Mode you can simulate certain states of selected payment objects.","In Sandbox Mode you can simulate certain states of selected payment objects."
84
+ "Installed Magento extensions","Installed Magento extensions"
85
+ "Installed PHP modules","Installed PHP modules"
86
+ "IPN endpoint URL","IPN endpoint URL"
87
+ "IPN Notifications","IPN Notifications"
88
+ "Large","Large"
89
  "Large (151 x 27 pixels)","Large (151 x 27 pixels)"
90
  "Leave empty for access from any location","Leave empty for access from any location"
91
+ "Light gray","Light gray"
92
+ "Login and Pay with Amazon","Login and Pay with Amazon"
93
+ "Login with Amazon","Login with Amazon"
94
+ "Magento Settings","Magento Settings"
95
+ "Manual authorization","Manual authorization"
96
  "Marketplace","Marketplace"
97
+ "Medium","Medium"
98
  "Medium (126 x 24 pixels)","Medium (126 x 24 pixels)"
99
  "Merchant ID","Merchant ID"
100
+ "Next page","Next page"
101
+ "No, use data polling instead","No, use data polling instead"
102
+ "Notification type","Notification type"
103
+ "of %s pages","of %s pages"
104
  "Orange (recommended)","Orange (recommended)"
105
+ "Order status on authorization","Order status on authorization"
106
+ "Page","Page"
107
  "Payment Action","Payment Action"
108
+ "Payment widget height","Payment widget height"
109
+ "Payment widget width","Payment widget width"
110
+ "Pay with Amazon","Pay with Amazon"
111
+ "Pay with Amazon API Calls","Pay with Amazon API Calls"
112
+ "Pay with Amazon Exceptions","Pay with Amazon Exceptions"
113
+ "per page","per page"
114
+ "Please enter this URL in the <strong>Merchant URL</strong> field of the Integration Settings in your Amazon Seller Central.","Please enter this URL in the <strong>Merchant URL</strong> field of the Integration Settings in your Amazon Seller Central."
115
+ "Preview","Preview"
116
+ "Response code","Response code"
117
  "Please note that the total amount of the order will be charged at order placement.","Please note that the total amount of the order will be charged at order placement."
118
  "Sandbox Mode","Sandbox Mode"
119
  "Secret Access Key","Secret Access Key"
120
+ "Select appropriate store view scope to display IPN endpoint URL","Select appropriate store view scope to display IPN endpoint URL"
121
+ "Select whether an email confirmation for newly placed orders shall be sent by the shop","Select whether an email confirmation for newly placed orders shall be sent by the shop"
122
+ "Send order confirmation","Send order confirmation"
123
  "Settings","Settings"
124
+ "Show Sandbox Toolbox","Show Sandbox Toolbox"
125
+ "Small","Small"
126
+ "Stores","Stores"
127
  "Tan","Tan"
128
  "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later."
129
+ "This extension integrates easily your Magento shop with Pay with Amazon service.","This extension integrates easily your Magento shop with Pay with Amazon service."
130
  "This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted.","This feature requires valid SSL certificate to be installed on this server. Pay attention that the SSL certificate must be issued by a trusted Certificate Authority, self-signed certificates are not permitted."
131
+ "Total %d records found","Total %d records found"
132
  "United Kingdom","United Kingdom"
133
  "United States","United States"
134
+ "URL","URL"
135
+ "Use your Amazon Account","Use your Amazon Account"
136
+ "View","View"
137
  "Visit <a href=""%s"" target=""_blank"">%s</a> to get more information.","Visit <a href=""%s"" target=""_blank"">%s</a> to get more information."
138
+ "Wallet widget height","Wallet widget height"
139
+ "Wallet widget width","Wallet widget width"
140
+ "Whether to show a toolbox in the checkout for simulating different payment scenarios.","Whether to show a toolbox in the checkout for simulating different payment scenarios."
141
+ "Whoops! Your Access Key ID seems to be invalid.","Whoops! Your Access Key ID seems to be invalid."
142
+ "Whoops! Your Merchant ID seems to be invalid.","Whoops! Your Merchant ID seems to be invalid."
143
+ "Whoops! Your Secret Access Key seems to be invalid.","Whoops! Your Secret Access Key seems to be invalid."
144
+ "With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people.","With Amazon Payments, you can use the shipping and payment information stored in your Amazon account to place an order on this website. It's a convenient and trusted way to pay that's enjoyed by millions of people."
145
+ "X-Large","X-Large"
146
  "X-Large (173 x 27 pixels)","X-Large (173 x 27 pixels)"
js/creativestyle/apa_checkout.min.js CHANGED
@@ -1 +1 @@
1
- if(!window.Review){var Review=function(){}}var APA={live:true,virtual:true,submitAllowed:false,Widgets:{ShippingMethod:Class.create({initialize:function(a){this.layer=$(APA.layers.shippingMethod);Object.extend(this,a);Event.stopObserving(this.layer,"widget:update").observe("widget:update",this.onUpdate.bindAsEventListener(this))},update:function(b){try{Element.update(this.layer,b);if(!this.layer.down("input[type=radio]:checked")){var a=this.layer.down("input[type=radio]");if(a){a.checked=true}}Event.stopObserving(this.layer,"change").observe("change",this.onShippingMethodSelect.bindAsEventListener(this));Event.stopObserving(this.layer,"widget:checked").observe("widget:checked",this.onShippingMethodSelect.bindAsEventListener(this));Event.fire(this.layer,"widget:update")}catch(c){this.onError(c)}}}),Review:Class.create({initialize:function(a){this.layer=$(APA.layers.review);Object.extend(this,a)},update:function(a){try{Element.update(this.layer,a)}catch(b){this.onError(b)}}})},setLoadWaiting:function(){for(var b=0;b<arguments.length;b++){if($(arguments[b])){var a=$(arguments[b]).up("li");a.addClassName("loading")}}return this},unsetLoadWaiting:function(){for(var b=0;b<arguments.length;b++){if($(arguments[b])){var a=$(arguments[b]).up("li");a.removeClassName("loading")}}return this},setOrderSaveWaiting:function(){if($(APA.layers.review)){var a=$(APA.layers.review).down(".please-wait");if(a){Element.show(a)}}if($("checkoutSteps")){$("checkoutSteps").insert({top:new Element("div",{"class":"amazon-widget-overlay"})})}this.disableSubmit()},unsetOrderSaveWaiting:function(){if($(APA.layers.review)){var a=$(APA.layers.review).down(".please-wait");if(a){Element.hide(a)}}if($("checkoutSteps")&&$("checkoutSteps").down(".amazon-widget-overlay")){$("checkoutSteps").down(".amazon-widget-overlay").remove()}this.enableSubmit()},initCheckout:function(){this.disableSubmit().scaffoldPaymentWidget();if(this.virtual){return this.setLoadWaiting(APA.layers.wallet).renderWalletWidget()}return this.setLoadWaiting(APA.layers.shippingMethod,APA.layers.wallet,APA.layers.review).renderAddressBookWidget().renderWalletWidget()},scaffoldPaymentWidget:function(){if(typeof APA.design.wallet.size!="undefined"){if(APA.design.wallet.size.width){$(APA.layers.wallet).up().setStyle({width:APA.design.wallet.size.width})}if(APA.design.wallet.size.height){$(APA.layers.wallet).up().setStyle({height:APA.design.wallet.size.height})}}return this},renderButtonWidget:function(c){$$(APA.layers.buttons).each(function(d){new OffAmazonPayments.Widgets.Button({sellerId:APA.sellerId,useAmazonAddressBook:!APA.virtual,onSignIn:APA.signInCallback,onError:APA.amazonErrorCallback}).bind(d.identify())});if(c&&typeof Tooltip!="undefined"){var b=$$(APA.layers.buttons).findAll(function(d){return d.hasClassName("with-tooltip")});if(b.length){var a=document.createElement("div");a.setAttribute("id","pay-with-amazon-tooltip");a.addClassName("pay-with-amazon-tooltip");a.setStyle({display:"none",zIndex:10});a.update(c);document.body.appendChild(a);b.each(function(d){var e=d.down("img");if(e){new Tooltip(e,a)}})}}},signInCallback:function(a){var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("name","orderReferenceId");c.setAttribute("value",a.getAmazonOrderReferenceId());var b=document.createElement("form");b.setAttribute("method","post");b.setAttribute("action",APA.urls.checkout);b.appendChild(c);document.body.appendChild(b);b.submit();return},renderAddressBookWidget:function(){APA.setLoadWaiting(APA.layers.shippingMethod,APA.layers.review);new OffAmazonPayments.Widgets.AddressBook({sellerId:APA.sellerId,amazonOrderReferenceId:APA.orderReferenceId,design:APA.design.addressBook,onAddressSelect:APA.addressSelectCallback,onError:APA.amazonErrorCallback}).bind(APA.layers.addressBook);return this},addressSelectCallback:function(){APA.setLoadWaiting(APA.layers.shippingMethod,APA.layers.review);new Ajax.Request(APA.urls.saveShipping,{method:"post",evalScripts:true,onSuccess:APA.successCallback,onFailure:APA.ajaxFailureCallback})},renderShippingMethodWidget:function(a){APA.setLoadWaiting(APA.layers.review);new APA.Widgets.ShippingMethod({onShippingMethodSelect:APA.shippingMethodSelectCallback,onUpdate:APA.shippingMethodUpdateCallback,onError:APA.magentoErrorCallback}).update(a);return this},shippingMethodSelectCallback:function(a){APA.setLoadWaiting(APA.layers.review);new Ajax.Request(APA.urls.saveShippingMethod,{method:"post",parameters:Form.serialize($("co-shipping-method-form")),evalScripts:true,onSuccess:APA.successCallback,onFailure:APA.ajaxFailureCallback})},shippingMethodUpdateCallback:function(b){var a=Event.element(b);Event.fire(a,"widget:checked")},renderWalletWidget:function(){new OffAmazonPayments.Widgets.Wallet({sellerId:APA.sellerId,amazonOrderReferenceId:APA.orderReferenceId,design:APA.design.wallet,onPaymentSelect:APA.paymentSelectCallback,onError:APA.amazonErrorCallback}).bind(APA.layers.wallet);return this},paymentSelectCallback:function(){new Ajax.Request(APA.urls.savePayment,{method:"post",evalScripts:true,onSuccess:APA.successCallback,onFailure:APA.ajaxFailureCallback})},renderReviewWidget:function(a){new APA.Widgets.Review({onError:APA.magentoErrorCallback}).update(a);this.submitAllowed?this.enableSubmit():this.disableSubmit();return this},successCallback:function(transport){response=eval("("+transport.responseText+")");if(response.error){APA.magentoErrorCallback(response.error_messages)}if(response.render_widget){$H(response.render_widget).each(function(pair){APA["render"+pair.key.capitalize().camelize()+"Widget"](pair.value);if(pair.value){APA.unsetLoadWaiting(APA.layers[pair.key.camelize()])}})}if(response.allow_submit){APA.allowSubmit(true)}else{APA.allowSubmit(false)}},saveOrderCallback:function(transport){response=eval("("+transport.responseText+")");if(response.success){window.location=APA.urls.success}if(response.redirect){window.location=response.redirect}if(response.error){APA.unsetOrderSaveWaiting();APA.magentoErrorCallback(response.error_messages)}},ajaxFailureCallback:function(){window.location.href=APA.urls.failure},amazonErrorCallback:function(a){if(!APA.live){console.trace();alert(a.getErrorMessage())}var b=["BuyerNotAssociated","BuyerSessionExpired","StaleOrderReference"];if(b.any(function(c){return c==a.getErrorCode()})){window.location.href=APA.urls.failure}},magentoErrorCallback:function(a){if(!APA.live){console.trace()}if(typeof(a)=="object"){a=a.join("\n")}if(a){alert(a)}},allowSubmit:function(a){this.submitAllowed=a;if(a){return this.enableSubmit()}else{return this.disableSubmit()}},disableSubmit:function(){var a=$(this.layers.review).down("div.buttons-set");if(a){a.addClassName("disabled");var b=a.down("button[type=submit].button");if(b){b.disabled=true}}return this},enableSubmit:function(){if(this.submitAllowed){var a=$(this.layers.review).down("div.buttons-set");if(a){a.removeClassName("disabled");var b=a.down("button[type=submit].button");if(b){b.disabled=false}}}return this},saveOrder:function(){APA.setOrderSaveWaiting();new Ajax.Request(APA.urls.saveOrder,{method:"post",parameters:APA.getSaveOrderParams(),onSuccess:APA.saveOrderCallback,onFailure:APA.ajaxFailureCallback})},getSaveOrderParams:function(){var a="";if(APA.virtual){if($("checkout-agreements")){a+=Form.serialize($("checkout-agreements"))}}else{a=Form.serialize($("co-shipping-method-form"));if($("checkout-agreements")){a+="&"+Form.serialize($("checkout-agreements"))}}a.save=true;return a},initialize:function(c,a,d,g,f,e,b){return Object.extend(APA,{sellerId:c,orderReferenceId:a,live:d,virtual:g,urls:Object.extend({checkout:null,saveShipping:null,saveShippingMethod:null,savePayment:null,saveOrder:null,success:null,failure:null},f),layers:Object.extend({buttons:".buttonWidget",addressBook:"addressBookWidgetDiv",wallet:"walletWidgetDiv",shippingMethod:"shippingMethodWidgetDiv",review:"reviewWidgetDiv"},e),design:Object.extend({addressBook:{size:{width:"440px",height:"260px"}},wallet:{size:{width:"440px",height:"260px"}}},b)})}};
1
+ if(!window.Review){var Review=function(){}}var APA={live:true,virtual:false,submitAllowed:false,Widgets:{ShippingMethod:Class.create({initialize:function(a){this.layer=$(APA.layers.shippingMethod);Object.extend(this,a);Event.stopObserving(this.layer,"widget:update").observe("widget:update",this.onUpdate.bindAsEventListener(this))},update:function(b){try{Element.update(this.layer,b);if(!this.layer.down("input[type=radio]:checked")){var a=this.layer.down("input[type=radio]");if(a){a.checked=true}}Event.stopObserving(this.layer,"change").observe("change",this.onShippingMethodSelect.bindAsEventListener(this));Event.stopObserving(this.layer,"widget:checked").observe("widget:checked",this.onShippingMethodSelect.bindAsEventListener(this));Event.fire(this.layer,"widget:update")}catch(c){this.onError(c)}}}),Review:Class.create({initialize:function(a){this.layer=$(APA.layers.review);Object.extend(this,a)},update:function(a){try{Element.update(this.layer,a)}catch(b){this.onError(b)}}})},setLoadWaiting:function(){for(var b=0;b<arguments.length;b++){if($(arguments[b])){var a=$(arguments[b]).up("li");a.addClassName("loading")}}return this},unsetLoadWaiting:function(){for(var b=0;b<arguments.length;b++){if($(arguments[b])){var a=$(arguments[b]).up("li");a.removeClassName("loading")}}return this},setOrderSaveWaiting:function(){if($(APA.layers.review)){var a=$(APA.layers.review).down(".please-wait");if(a){Element.show(a)}}if($("checkoutSteps")){$("checkoutSteps").insert({top:new Element("div",{"class":"amazon-widget-overlay"})})}this.disableSubmit()},unsetOrderSaveWaiting:function(){if($(APA.layers.review)){var a=$(APA.layers.review).down(".please-wait");if(a){Element.hide(a)}}if($("checkoutSteps")&&$("checkoutSteps").down(".amazon-widget-overlay")){$("checkoutSteps").down(".amazon-widget-overlay").remove()}this.enableSubmit()},initCheckout:function(){this.disableSubmit().scaffoldPaymentWidget();if(this.virtual){return this.setLoadWaiting(APA.layers.wallet).renderWalletWidget()}if(!this.orderReferenceId){return this.setLoadWaiting(APA.layers.shippingMethod,APA.layers.wallet,APA.layers.review).renderAddressBookWidget()}return this.setLoadWaiting(APA.layers.shippingMethod,APA.layers.wallet,APA.layers.review).renderAddressBookWidget().renderWalletWidget()},scaffoldPaymentWidget:function(){if(typeof APA.design.wallet.size!="undefined"){if(APA.design.wallet.size.width){$(APA.layers.wallet).up().setStyle({width:APA.design.wallet.size.width})}if(APA.design.wallet.size.height){$(APA.layers.wallet).up().setStyle({height:APA.design.wallet.size.height})}}return this},renderButtonWidget:function(c){if(APA.urls.login!=null){$$(APA.layers.payButtons).each(function(d){new OffAmazonPayments.Button(d.identify(),APA.sellerId,{type:d.buttonType||APA.design.payButton.type||"PwA",size:d.buttonSize||APA.design.payButton.size,color:d.buttonColor||APA.design.payButton.color,authorization:function(){amazon.Login.authorize({scope:"profile payments:widget payments:shipping_address",popup:true},APA.urls.pay)},onError:APA.amazonErrorCallback})});$$(APA.layers.loginButtons).each(function(d){new OffAmazonPayments.Button(d.identify(),APA.sellerId,{type:d.buttonType||APA.design.loginButton.type||"LwA",size:d.buttonSize||APA.design.loginButton.size,color:d.buttonColor||APA.design.loginButton.color,authorization:function(){amazon.Login.authorize({scope:"profile payments:widget payments:shipping_address",popup:true},APA.urls.login)},onError:APA.amazonErrorCallback})})}else{$$(APA.layers.payButtons).each(function(d){new OffAmazonPayments.Widgets.Button({sellerId:APA.sellerId,useAmazonAddressBook:!APA.virtual,onSignIn:APA.signInCallback,onError:APA.amazonErrorCallback}).bind(d.identify())})}if(c&&typeof Tooltip!="undefined"){var b=$$(APA.layers.payButtons+","+APA.layers.loginButtons).findAll(function(d){return d.hasClassName("with-tooltip")});if(b.length){var a=document.createElement("div");a.setAttribute("id","pay-with-amazon-tooltip");a.addClassName("pay-with-amazon-tooltip");a.setStyle({display:"none",zIndex:10});a.update(c);document.body.appendChild(a);b.each(function(d){var e=d.down("img");if(e){new Tooltip(e,a)}})}}},signInCallback:function(a){var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("name","orderReferenceId");c.setAttribute("value",a.getAmazonOrderReferenceId());var b=document.createElement("form");b.setAttribute("method","post");b.setAttribute("action",APA.urls.checkout);b.appendChild(c);document.body.appendChild(b);b.submit();return},renderAddressBookWidget:function(){APA.setLoadWaiting(APA.layers.shippingMethod,APA.layers.review);new OffAmazonPayments.Widgets.AddressBook({sellerId:APA.sellerId,onOrderReferenceCreate:APA.orderReferenceCreateCallback,amazonOrderReferenceId:APA.orderReferenceId,design:APA.design.addressBook,onAddressSelect:APA.addressSelectCallback,onError:APA.amazonErrorCallback}).bind(APA.layers.addressBook);return this},orderReferenceCreateCallback:function(a){if(!APA.orderReferenceId){APA.orderReferenceId=a.getAmazonOrderReferenceId();if(!APA.virtual){APA.renderWalletWidget()}}},addressSelectCallback:function(){APA.setLoadWaiting(APA.layers.shippingMethod,APA.layers.review);new Ajax.Request(APA.urls.saveShipping,{method:"post",parameters:{orderReferenceId:APA.orderReferenceId},evalScripts:true,onSuccess:APA.successCallback,onFailure:APA.ajaxFailureCallback})},renderShippingMethodWidget:function(a){APA.setLoadWaiting(APA.layers.review);new APA.Widgets.ShippingMethod({onShippingMethodSelect:APA.shippingMethodSelectCallback,onUpdate:APA.shippingMethodUpdateCallback,onError:APA.magentoErrorCallback}).update(a);return this},shippingMethodSelectCallback:function(a){APA.setLoadWaiting(APA.layers.review);new Ajax.Request(APA.urls.saveShippingMethod,{method:"post",parameters:Form.serialize($("co-shipping-method-form")),evalScripts:true,onSuccess:APA.successCallback,onFailure:APA.ajaxFailureCallback})},shippingMethodUpdateCallback:function(b){var a=Event.element(b);Event.fire(a,"widget:checked")},renderWalletWidget:function(){new OffAmazonPayments.Widgets.Wallet({sellerId:APA.sellerId,onOrderReferenceCreate:APA.orderReferenceCreateCallback,amazonOrderReferenceId:APA.orderReferenceId,design:APA.design.wallet,onError:APA.amazonErrorCallback}).bind(APA.layers.wallet);return this},renderReviewWidget:function(a){new APA.Widgets.Review({onError:APA.magentoErrorCallback}).update(a);this.submitAllowed?this.enableSubmit():this.disableSubmit();return this},successCallback:function(transport){response=eval("("+transport.responseText+")");if(response.error){APA.magentoErrorCallback(response.error_messages)}if(response.render_widget){$H(response.render_widget).each(function(pair){APA["render"+pair.key.capitalize().camelize()+"Widget"](pair.value);if(pair.value){APA.unsetLoadWaiting(APA.layers[pair.key.camelize()])}})}if(response.allow_submit){APA.allowSubmit(true)}else{APA.allowSubmit(false)}},saveOrderCallback:function(transport){response=eval("("+transport.responseText+")");if(response.success){window.location=APA.urls.success}if(response.redirect){window.location=response.redirect}if(response.error){APA.unsetOrderSaveWaiting();APA.magentoErrorCallback(response.error_messages)}},ajaxFailureCallback:function(){window.location.href=APA.urls.failure},amazonErrorCallback:function(a){if(!APA.live){console.trace();alert(a.getErrorMessage())}var b=["BuyerNotAssociated","BuyerSessionExpired","StaleOrderReference"];if(b.any(function(c){return c==a.getErrorCode()})){window.location.href=APA.urls.failure}},magentoErrorCallback:function(a){if(!APA.live){console.trace()}if(typeof(a)=="object"){a=a.join("\n")}if(a){alert(a)}},allowSubmit:function(a){this.submitAllowed=a;if(a){return this.enableSubmit()}else{return this.disableSubmit()}},disableSubmit:function(){var a=$(this.layers.review).select("div.buttons-set");if(a){a.each(function(b){b.addClassName("disabled");var c=b.down("button[type=submit].button");if(c){c.disabled=true}})}return this},enableSubmit:function(){if(this.submitAllowed){var a=$(this.layers.review).select("div.buttons-set");if(a){a.each(function(b){b.removeClassName("disabled");var c=b.down("button[type=submit].button");if(c){c.disabled=false}})}}return this},saveOrder:function(){APA.setOrderSaveWaiting();new Ajax.Request(APA.urls.saveOrder,{method:"post",parameters:APA.getSaveOrderParams(),onSuccess:APA.saveOrderCallback,onFailure:APA.ajaxFailureCallback})},getSaveOrderParams:function(){var a="";if(APA.virtual){if($("checkout-agreements")){a+=Form.serialize($("checkout-agreements"))}}else{a=Form.serialize($("co-shipping-method-form"));if($("checkout-agreements")){a+="&"+Form.serialize($("checkout-agreements"))}}a.save=true;return a},initialize:function(c,a,d,g,f,e,b){return Object.extend(APA,{sellerId:c,orderReferenceId:a,live:d,virtual:g,urls:Object.extend({login:null,pay:null,checkout:null,saveShipping:null,saveShippingMethod:null,saveOrder:null,success:null,failure:null},f),layers:Object.extend({payButtons:".payButtonWidget",loginButtons:".loginButtonWidget",addressBook:"addressBookWidgetDiv",wallet:"walletWidgetDiv",shippingMethod:"shippingMethodWidgetDiv",review:"reviewWidgetDiv"},e),design:Object.extend({addressBook:{size:{width:"440px",height:"260px"}},wallet:{size:{width:"440px",height:"260px"}},payButton:{type:"PwA"},loginButton:{type:"LwA"}},b)})}};
lib/OffAmazonPaymentsNotifications/Client.php CHANGED
@@ -48,6 +48,18 @@ require_once 'OffAmazonPaymentsNotifications/Model/SellerBillingAgreementAttribu
48
  require_once 'OffAmazonPaymentsNotifications/Model/SellerOrderAttributes.php';
49
  require_once 'OffAmazonPaymentsNotifications/Model/SnsNotificationMetadata.php';
50
  require_once 'OffAmazonPaymentsNotifications/Model/Status.php';
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  /**
53
  * Implementation of the OffAmazonPaymentsNotifications
@@ -92,14 +104,14 @@ class OffAmazonPaymentsNotifications_Client
92
  // Is this json, is this
93
  // an sns message, do we have the fields we require
94
  $snsMessage = SnsMessageParser::parseNotification($headers, $body);
95
-
96
  // security validation - check that this message is
97
  // from amazon and that it has been signed correctly
98
  $this->_snsMessageValidator->validateMessage($snsMessage);
99
 
100
  // Convert to object - convert from basic class to object
101
  $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage);
 
102
  return XmlNotificationParser::parseIpnMessage($ipnMessage);
103
  }
104
  }
105
- ?>
48
  require_once 'OffAmazonPaymentsNotifications/Model/SellerOrderAttributes.php';
49
  require_once 'OffAmazonPaymentsNotifications/Model/SnsNotificationMetadata.php';
50
  require_once 'OffAmazonPaymentsNotifications/Model/Status.php';
51
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditNotification.php';
52
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditDetails.php';
53
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditSummary.php';
54
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditSummaryList.php';
55
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummary.php';
56
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummaryList.php';
57
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditReversalNotification.php';
58
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditReversalDetails.php';
59
+ require_once 'OffAmazonPaymentsNotifications/Model/SolutionProviderMerchantNotification.php';
60
+ require_once 'OffAmazonPaymentsNotifications/Model/MerchantRegistrationDetails.php';
61
+ require_once 'OffAmazonPaymentsNotifications/Model/SolutionProviderOptions.php';
62
+ require_once 'OffAmazonPaymentsNotifications/Model/SolutionProviderOption.php';
63
 
64
  /**
65
  * Implementation of the OffAmazonPaymentsNotifications
104
  // Is this json, is this
105
  // an sns message, do we have the fields we require
106
  $snsMessage = SnsMessageParser::parseNotification($headers, $body);
 
107
  // security validation - check that this message is
108
  // from amazon and that it has been signed correctly
109
  $this->_snsMessageValidator->validateMessage($snsMessage);
110
 
111
  // Convert to object - convert from basic class to object
112
  $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage);
113
+
114
  return XmlNotificationParser::parseIpnMessage($ipnMessage);
115
  }
116
  }
117
+ ?>
lib/OffAmazonPaymentsNotifications/Impl/Certificate.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ require_once 'OffAmazonPaymentsNotifications/InvalidCertificateException.php';
19
+
20
+ /**
21
+ * Class to wrap a Certificate
22
+ *
23
+ */
24
+ class Certificate
25
+ {
26
+ /**
27
+ * Certificate as string (read from file/URL)
28
+ *
29
+ * @var string
30
+ */
31
+ private $_certificate;
32
+
33
+ /**
34
+ * Create a new instance of the certificate and
35
+ * wraps the contents in a class
36
+ *
37
+ * Throws an exception if the message is not valid
38
+ * as defined by the implementation of this class
39
+ *
40
+ * @param string $certificate a string pasred from file/URL
41
+ *
42
+ * @return new instance of concreate class
43
+ */
44
+ public function __construct($certificate)
45
+ {
46
+ $this->_certificate = $certificate;
47
+ }
48
+
49
+ /**
50
+ * Return the certificate string
51
+ *
52
+ * @return string of contents
53
+ */
54
+ public function getCertificate()
55
+ {
56
+ return $this->_certificate;
57
+ }
58
+
59
+ /**
60
+ * Extract the subject field from the certificate and return the contents
61
+ *
62
+ * @throws OffAmazonPaymentsNotifications_InvalidCertificateException if not found
63
+ *
64
+ * @return array of contents of the subject if found
65
+ */
66
+ public function getSubject()
67
+ {
68
+ $certInfo = openssl_x509_parse($this->_certificate, true);
69
+ $certSubject = $certInfo["subject"];
70
+
71
+ if (is_null($certSubject)) {
72
+ throw new OffAmazonPaymentsNotifications_InvalidCertificateException(
73
+ "Error with certificate - subject cannot be found"
74
+ );
75
+ }
76
+ return $certSubject;
77
+ }
78
+ }
79
+ ?>
lib/OffAmazonPaymentsNotifications/Impl/OpenSslVerifySignature.php CHANGED
@@ -17,6 +17,7 @@
17
 
18
  require_once 'OffAmazonPaymentsNotifications/Impl/VerifySignature.php';
19
  require_once 'OffAmazonPaymentsNotifications/InvalidMessageException.php';
 
20
 
21
  /**
22
  * OpenSSL Implemntation of the verify signature algorithm
@@ -34,7 +35,7 @@ class OpenSslVerifySignature implements VerifySignature
34
  {
35
 
36
  }
37
-
38
  /**
39
  * Verify that the signature is correct for the given data and
40
  * public key
@@ -52,14 +53,45 @@ class OpenSslVerifySignature implements VerifySignature
52
  public function verifySignatureIsCorrect($data, $signature, $certificatePath)
53
  {
54
  $cert = $this->_getCertificateFromCertifcatePath($certificatePath);
 
55
 
56
- $certKey = openssl_get_publickey($cert);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  if ($certKey === False) {
59
  throw new OffAmazonPaymentsNotifications_InvalidMessageException(
60
  "Unable to extract public key from cert " . $cert);
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
63
  $result = -1;
64
  try {
65
  $result = openssl_verify($data, $signature, $certKey, OPENSSL_ALGO_SHA1);
@@ -72,6 +104,28 @@ class OpenSslVerifySignature implements VerifySignature
72
 
73
  return ($result > 0);
74
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  /**
77
  * Request the signing certificate from the given path, in order to
17
 
18
  require_once 'OffAmazonPaymentsNotifications/Impl/VerifySignature.php';
19
  require_once 'OffAmazonPaymentsNotifications/InvalidMessageException.php';
20
+ require_once 'OffAmazonPaymentsNotifications/Impl/Certificate.php';
21
 
22
  /**
23
  * OpenSSL Implemntation of the verify signature algorithm
35
  {
36
 
37
  }
38
+
39
  /**
40
  * Verify that the signature is correct for the given data and
41
  * public key
53
  public function verifySignatureIsCorrect($data, $signature, $certificatePath)
54
  {
55
  $cert = $this->_getCertificateFromCertifcatePath($certificatePath);
56
+ $certificate = new Certificate($cert);
57
 
58
+ return $this->verifySignatureIsCorrectFromCertificate($data, $signature, $certificate);
59
+ }
60
+
61
+ /**
62
+ * Verify that the signature is correct for the given data and
63
+ * public key
64
+ *
65
+ * @param string $data data to validate
66
+ * @param string $signature decoded signature to compare against
67
+ * @param string $certificate certificate object defined in Certificate.php
68
+ *
69
+ * @throws OffAmazonPaymentsNotifications_InvalidMessageException if there
70
+ * is an error
71
+ * with the call
72
+ *
73
+ * @return bool true if valid
74
+ */
75
+ public function verifySignatureIsCorrectFromCertificate($data, $signature, $certificate)
76
+ {
77
+ $certKey = openssl_get_publickey($certificate->getCertificate());
78
 
79
  if ($certKey === False) {
80
  throw new OffAmazonPaymentsNotifications_InvalidMessageException(
81
  "Unable to extract public key from cert " . $cert);
82
  }
83
 
84
+ try {
85
+ $certSubject = $certificate->getSubject();
86
+ } catch (Exception $ex) {
87
+ throw new OffAmazonPaymentsNotifications_InvalidMessageException(
88
+ "Unable to verify certificate - error with the certificate subject",
89
+ null, $ex
90
+ );
91
+ }
92
+
93
+ $this->_verifyCertificateSubject($certSubject);
94
+
95
  $result = -1;
96
  try {
97
  $result = openssl_verify($data, $signature, $certKey, OPENSSL_ALGO_SHA1);
104
 
105
  return ($result > 0);
106
  }
107
+
108
+ /**
109
+ * Verify that certificate is issued by Amazon
110
+ *
111
+ * @param array $certificateSubject certificate subject array
112
+ *
113
+ * @throws OffAmazonPaymentsNotifications_InvalidMessageException
114
+ *
115
+ * @return void
116
+ */
117
+ private function _verifyCertificateSubject($certificateSubject)
118
+ {
119
+ if ( (strcmp($certificateSubject["CN"], "sns.amazonaws.com") !== 0) ||
120
+ ((strcmp($certificateSubject["O"], "Amazon.com Inc.") !== 0) && (strcmp($certificateSubject["O"], "Amazon.com, Inc.") !== 0)) ||
121
+ (strcmp($certificateSubject["L"], "Seattle") !== 0) ||
122
+ (strcmp($certificateSubject["ST"], "Washington") !== 0) ||
123
+ (strcmp($certificateSubject["C"], "US") !== 0) ) {
124
+ throw new OffAmazonPaymentsNotifications_InvalidMessageException(
125
+ "Unable to verify certificate issued by Amazon - error with certificate subject"
126
+ );
127
+ }
128
+ }
129
 
130
  /**
131
  * Request the signing certificate from the given path, in order to
lib/OffAmazonPaymentsNotifications/Impl/XmlNotificationParser.php CHANGED
@@ -21,6 +21,10 @@ require_once 'OffAmazonPaymentsNotifications/Model/BillingAgreementNotification.
21
  require_once 'OffAmazonPaymentsNotifications/Model/RefundNotification.php';
22
  require_once 'OffAmazonPaymentsNotifications/Model/CaptureNotification.php';
23
  require_once 'OffAmazonPaymentsNotifications/Model/OrderReferenceNotification.php';
 
 
 
 
24
 
25
  /**
26
  * Wrapper around a decoded IPN notification message to create
@@ -41,7 +45,6 @@ class XmlNotificationParser
41
  public static function parseIpnMessage(Message $ipnMsg)
42
  {
43
  $xmlDocumentElement = self::_getXmlFromIpnMessage($ipnMsg);
44
-
45
  return self::_createNotificationForNotificationType(
46
  $ipnMsg,
47
  $xmlDocumentElement
@@ -129,6 +132,28 @@ class XmlNotificationParser
129
  $xmlDocumentElement
130
  );
131
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  default:
133
  throw new OffAmazonPaymentsNotifications_InvalidMessageException(
134
  "Error with IPN notification - unknown notification " .
@@ -139,4 +164,4 @@ class XmlNotificationParser
139
  return $notification;
140
  }
141
  }
142
- ?>
21
  require_once 'OffAmazonPaymentsNotifications/Model/RefundNotification.php';
22
  require_once 'OffAmazonPaymentsNotifications/Model/CaptureNotification.php';
23
  require_once 'OffAmazonPaymentsNotifications/Model/OrderReferenceNotification.php';
24
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditNotification.php';
25
+ require_once 'OffAmazonPaymentsNotifications/Model/ProviderCreditReversalNotification.php';
26
+ require_once 'OffAmazonPaymentsNotifications/Model/SolutionProviderMerchantNotification.php';
27
+
28
 
29
  /**
30
  * Wrapper around a decoded IPN notification message to create
45
  public static function parseIpnMessage(Message $ipnMsg)
46
  {
47
  $xmlDocumentElement = self::_getXmlFromIpnMessage($ipnMsg);
 
48
  return self::_createNotificationForNotificationType(
49
  $ipnMsg,
50
  $xmlDocumentElement
132
  $xmlDocumentElement
133
  );
134
  break;
135
+ case "ProviderCredit":
136
+ $notification
137
+ = new OffAmazonPaymentsNotifications_Model_ProviderCreditNotification(
138
+ $ipnMsg->getNotificationMetadata(),
139
+ $xmlDocumentElement
140
+ );
141
+ break;
142
+ case "ProviderCreditReversal":
143
+ $notification
144
+ = new OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification(
145
+ $ipnMsg->getNotificationMetadata(),
146
+ $xmlDocumentElement
147
+ );
148
+ break;
149
+ case "SolutionProviderEvent":
150
+ $notification
151
+ = new OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification(
152
+ $ipnMsg->getNotificationMetadata(),
153
+ $xmlDocumentElement
154
+ );
155
+ break;
156
+
157
  default:
158
  throw new OffAmazonPaymentsNotifications_InvalidMessageException(
159
  "Error with IPN notification - unknown notification " .
164
  return $notification;
165
  }
166
  }
167
+ ?>
lib/OffAmazonPaymentsNotifications/InvalidCertificateException.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ /**
19
+ * Exception thrown when an error occurred in parsing the certificate
20
+ * received by the client library
21
+ *
22
+ */
23
+ class OffAmazonPaymentsNotifications_InvalidCertificateException
24
+ extends Exception
25
+ {
26
+ }
27
+ ?>
lib/OffAmazonPaymentsNotifications/Model/AuthorizationDetails.php CHANGED
@@ -30,6 +30,7 @@ require_once 'OffAmazonPayments/Model.php';
30
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
31
  * <li>CreationTimestamp: string</li>
32
  * <li>ExpirationTimestamp: string</li>
 
33
  * <li>AuthorizationStatus: OffAmazonPaymentsNotifications_Model_Status</li>
34
  * <li>OrderItemCategories:
35
  * OffAmazonPaymentsNotifications_Model_OrderItemCategories</li>
@@ -57,6 +58,7 @@ class OffAmazonPaymentsNotifications_Model_AuthorizationDetails extends OffAmazo
57
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
58
  * <li>CreationTimestamp: string</li>
59
  * <li>ExpirationTimestamp: string</li>
 
60
  * <li>AuthorizationStatus: OffAmazonPaymentsNotifications_Model_Status</li>
61
  * <li>OrderItemCategories:
62
  * OffAmazonPaymentsNotifications_Model_OrderItemCategories</li>
@@ -100,6 +102,10 @@ class OffAmazonPaymentsNotifications_Model_AuthorizationDetails extends OffAmazo
100
  'FieldValue' => null,
101
  'FieldType' => 'string'
102
  ),
 
 
 
 
103
  'AuthorizationStatus' => array(
104
  'FieldValue' => null,
105
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
@@ -501,6 +507,51 @@ class OffAmazonPaymentsNotifications_Model_AuthorizationDetails extends OffAmazo
501
  return !is_null($this->fields['ExpirationTimestamp']['FieldValue']);
502
  }
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  /**
505
  * Gets the value of the AuthorizationStatus.
506
  *
30
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
31
  * <li>CreationTimestamp: string</li>
32
  * <li>ExpirationTimestamp: string</li>
33
+ * <li>AddressVerificationCode: string</li>
34
  * <li>AuthorizationStatus: OffAmazonPaymentsNotifications_Model_Status</li>
35
  * <li>OrderItemCategories:
36
  * OffAmazonPaymentsNotifications_Model_OrderItemCategories</li>
58
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
59
  * <li>CreationTimestamp: string</li>
60
  * <li>ExpirationTimestamp: string</li>
61
+ * <li>AddressVerificationCode: string</li>
62
  * <li>AuthorizationStatus: OffAmazonPaymentsNotifications_Model_Status</li>
63
  * <li>OrderItemCategories:
64
  * OffAmazonPaymentsNotifications_Model_OrderItemCategories</li>
102
  'FieldValue' => null,
103
  'FieldType' => 'string'
104
  ),
105
+ 'AddressVerificationCode' => array(
106
+ 'FieldValue' => null,
107
+ 'FieldType' => 'string'
108
+ ),
109
  'AuthorizationStatus' => array(
110
  'FieldValue' => null,
111
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
507
  return !is_null($this->fields['ExpirationTimestamp']['FieldValue']);
508
  }
509
 
510
+ /**
511
+ * Gets the value of the AddrerificationCode property.
512
+ *
513
+ * @param string AddressVerificationCode
514
+ * @return this instance
515
+ */
516
+ public function getAddressVerificationCode()
517
+ {
518
+ return $this->fields['AddressVerificationCode']['FieldValue'];
519
+ }
520
+
521
+ /**
522
+ * Sets the value of the AddressVerificationCode property.
523
+ *
524
+ * @param string AddressVerificationCode
525
+ * @return this instance
526
+ */
527
+ public function setAddressVerificationCode($value)
528
+ {
529
+ $this->fields['AddressVerificationCode']['FieldValue'] = $value;
530
+ return $this;
531
+ }
532
+
533
+ /**
534
+ * Sets the value of the AddressVerificationCode and return this instance
535
+ *
536
+ * @param string $value AddressVerificationCode
537
+ * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance
538
+ */
539
+ public function withAddressVerificationCode($value)
540
+ {
541
+ $this->setAddressVerificationCode($value);
542
+ return $this;
543
+ }
544
+
545
+ /**
546
+ * Checks if AddressVerificationCode is set
547
+ *
548
+ * @return bool true if AddressVerificationCode is set
549
+ */
550
+ public function isSetAddressVerificationCode()
551
+ {
552
+ return !is_null($this->fields['AddressVerificationCode']['FieldValue']);
553
+ }
554
+
555
  /**
556
  * Gets the value of the AuthorizationStatus.
557
  *
lib/OffAmazonPaymentsNotifications/Model/CaptureDetails.php CHANGED
@@ -32,6 +32,7 @@ require_once 'OffAmazonPayments/Model.php';
32
  * <li>CreationTimestamp: string</li>
33
  * <li>CaptureStatus: OffAmazonPaymentsNotifications_Model_Status</li>
34
  * <li>SoftDescriptor: string</li>
 
35
  *
36
  * </ul>
37
  */
@@ -55,7 +56,8 @@ class OffAmazonPaymentsNotifications_Model_CaptureDetails
55
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
56
  * <li>CreationTimestamp: string</li>
57
  * <li>CaptureStatus: OffAmazonPaymentsNotifications_Model_Status</li>
58
- * <li>SoftDescriptor: string</li>
 
59
  *
60
  * </ul>
61
  */
@@ -94,6 +96,10 @@ class OffAmazonPaymentsNotifications_Model_CaptureDetails
94
  'FieldValue' => null,
95
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
96
  ),
 
 
 
 
97
  'SoftDescriptor' => array(
98
  'FieldValue' => null,
99
  'FieldType' => 'string'
@@ -529,5 +535,51 @@ class OffAmazonPaymentsNotifications_Model_CaptureDetails
529
  {
530
  return !is_null($this->fields['SoftDescriptor']['FieldValue']);
531
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  }
533
  ?>
32
  * <li>CreationTimestamp: string</li>
33
  * <li>CaptureStatus: OffAmazonPaymentsNotifications_Model_Status</li>
34
  * <li>SoftDescriptor: string</li>
35
+ * <li>ProviderCreditSummaryList: OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList</li>
36
  *
37
  * </ul>
38
  */
56
  * <li>IdList: OffAmazonPaymentsNotifications_Model_IdList</li>
57
  * <li>CreationTimestamp: string</li>
58
  * <li>CaptureStatus: OffAmazonPaymentsNotifications_Model_Status</li>
59
+ * <li>ProviderCreditSummaryList: OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList</li>
60
+ * <li>SoftDescriptor: string</li>
61
  *
62
  * </ul>
63
  */
96
  'FieldValue' => null,
97
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
98
  ),
99
+ 'ProviderCreditSummaryList' => array(
100
+ 'FieldValue' => null,
101
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList'
102
+ ),
103
  'SoftDescriptor' => array(
104
  'FieldValue' => null,
105
  'FieldType' => 'string'
535
  {
536
  return !is_null($this->fields['SoftDescriptor']['FieldValue']);
537
  }
538
+
539
+ /**
540
+ * Gets the value of the ProviderCreditSummaryList.
541
+ *
542
+ * @return ProviderCreditSummaryList ProviderCreditSummaryList
543
+ */
544
+ public function getProviderCreditSummaryList()
545
+ {
546
+ return $this->fields['ProviderCreditSummaryList']['FieldValue'];
547
+ }
548
+
549
+ /**
550
+ * Sets the value of the ProviderCreditSummaryList.
551
+ *
552
+ * @param ProviderCreditSummaryList ProviderCreditSummaryList
553
+ * @return void
554
+ */
555
+ public function setProviderCreditSummaryList($value)
556
+ {
557
+ $this->fields['ProviderCreditSummaryList']['FieldValue'] = $value;
558
+ return;
559
+ }
560
+
561
+ /**
562
+ * Sets the value of the ProviderCreditSummaryList and returns this instance
563
+ *
564
+ * @param ProviderCreditSummaryList $value ProviderCreditSummaryList
565
+ * @return OffAmazonPaymentsService_Model_CaptureDetails instance
566
+ */
567
+ public function withProviderCreditSummaryList($value)
568
+ {
569
+ $this->setProviderCreditSummaryList($value);
570
+ return $this;
571
+ }
572
+
573
+
574
+ /**
575
+ * Checks if ProviderCreditSummaryList is set
576
+ *
577
+ * @return bool true if ProviderCreditSummaryList property is set
578
+ */
579
+ public function isSetProviderCreditSummaryList()
580
+ {
581
+ return !is_null($this->fields['ProviderCreditSummaryList']['FieldValue']);
582
+
583
+ }
584
  }
585
  ?>
lib/OffAmazonPaymentsNotifications/Model/CaptureNotification.php CHANGED
@@ -56,6 +56,7 @@ class OffAmazonPaymentsNotifications_Model_CaptureNotification
56
  'OffAmazonPaymentsNotifications_Model_CaptureDetails'
57
  )
58
  );
 
59
  parent::__construct(
60
  $notificationMetadata,
61
  "CaptureNotification",
@@ -156,4 +157,4 @@ class OffAmazonPaymentsNotifications_Model_CaptureNotification
156
  return $xml;
157
  }
158
  }
159
- ?>
56
  'OffAmazonPaymentsNotifications_Model_CaptureDetails'
57
  )
58
  );
59
+
60
  parent::__construct(
61
  $notificationMetadata,
62
  "CaptureNotification",
157
  return $xml;
158
  }
159
  }
160
+ ?>
lib/OffAmazonPaymentsNotifications/Model/MerchantRegistrationDetails.php ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+ /**
25
+ * OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails
26
+ *
27
+ * Properties:
28
+ * <ul>
29
+ *
30
+ * <li>SellerId: string</li>
31
+ * <li>Type: string</li>
32
+ * <li>Options: OffAmazonPaymentsNotifications_Model_SolutionProviderOptions</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails extends OffAmazonPayments_Model {
37
+
38
+ /**
39
+ * Construct new OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails
40
+ *
41
+ * @param mixed $data
42
+ * DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>SellerId: string</li>
48
+ * <li>Type: string</li>
49
+ * <li>Options: OffAmazonPaymentsNotifications_Model_SolutionProviderOptions</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null) {
54
+ $this->fields = array (
55
+ 'SellerId' => array (
56
+ 'FieldValue' => null,
57
+ 'FieldType' => 'string'
58
+ ),
59
+ 'Type' => array (
60
+ 'FieldValue' => null,
61
+ 'FieldType' => 'string'
62
+ ),
63
+ 'Options' => array (
64
+ 'FieldValue' => null,
65
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_SolutionProviderOptions'
66
+ )
67
+ );
68
+ parent::__construct ( $data );
69
+ }
70
+
71
+ /**
72
+ * Gets the value of the SellerId property.
73
+ *
74
+ * @return string SellerId
75
+ */
76
+ public function getSellerId() {
77
+ return $this->fields ['SellerId'] ['FieldValue'];
78
+ }
79
+
80
+ /**
81
+ * Sets the value of the SellerId property.
82
+ *
83
+ * @param
84
+ * string SellerId
85
+ * @return this instance
86
+ */
87
+ public function setSellerId($value) {
88
+ $this->fields ['SellerId'] ['FieldValue'] = $value;
89
+ return $this;
90
+ }
91
+
92
+ /**
93
+ * Sets the value of the SellerId and returns this instance
94
+ *
95
+ * @param string $value
96
+ * SellerId
97
+ * @return OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails instance
98
+ */
99
+ public function withSellerId($value) {
100
+ $this->setSellerId ( $value );
101
+ return $this;
102
+ }
103
+
104
+ /**
105
+ * Checks if SellerId is set
106
+ *
107
+ * @return bool true if SellerId is set
108
+ */
109
+ public function isSetSellerId() {
110
+ return ! is_null ( $this->fields ['SellerId'] ['FieldValue'] );
111
+ }
112
+
113
+ /**
114
+ * Gets the value of the Type property.
115
+ *
116
+ * @return string Type
117
+ */
118
+ public function getType() {
119
+ return $this->fields ['Type'] ['FieldValue'];
120
+ }
121
+
122
+ /**
123
+ * Sets the value of the Type property.
124
+ *
125
+ * @param
126
+ * string Type
127
+ * @return this instance
128
+ */
129
+ public function setType($value) {
130
+ $this->fields ['Type'] ['FieldValue'] = $value;
131
+ return $this;
132
+ }
133
+
134
+ /**
135
+ * Sets the value of the Type and returns this instance
136
+ *
137
+ * @param string $value
138
+ * Type
139
+ * @return OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails instance
140
+ */
141
+ public function withType($value) {
142
+ $this->setType ( $value );
143
+ return $this;
144
+ }
145
+
146
+ /**
147
+ * Checks if Type is set
148
+ *
149
+ * @return bool true if Type is set
150
+ */
151
+ public function isSetType() {
152
+ return ! is_null ( $this->fields ['Type'] ['FieldValue'] );
153
+ }
154
+
155
+ /**
156
+ * Gets the value of the Options.
157
+ *
158
+ * @return IdList Options
159
+ */
160
+ public function getOptions() {
161
+ return $this->fields ['Options'] ['FieldValue'];
162
+ }
163
+
164
+ /**
165
+ * Sets the value of the Options.
166
+ *
167
+ * @param
168
+ * IdList Options
169
+ * @return void
170
+ */
171
+ public function setOptions($value) {
172
+ $this->fields ['Options'] ['FieldValue'] = $value;
173
+ return;
174
+ }
175
+
176
+ /**
177
+ * Sets the value of the Options and returns this instance
178
+ *
179
+ * @param IdList $value
180
+ * Options
181
+ * @return OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails instance
182
+ */
183
+ public function withOptions($value) {
184
+ $this->setOptions ( $value );
185
+ return $this;
186
+ }
187
+
188
+ /**
189
+ * Checks if SolutionProviderOptions is set
190
+ *
191
+ * @return bool true if SolutionProviderOptions property is set
192
+ */
193
+ public function isSetOptions() {
194
+ return ! is_null ( $this->fields ['Options'] ['FieldValue'] );
195
+ }
196
+
197
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditDetails.php ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+ /**
25
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditDetails
26
+ *
27
+ * Properties:
28
+ * <ul>
29
+ *
30
+ * <li>AmazonProviderCreditId: string</li>
31
+ * <li>SellerId: string</li>
32
+ * <li>ProviderSellerId: string</li>
33
+ * <li>CreditAmount: OffAmazonPaymentsNotifications_Model_Price</li>
34
+ * <li>CreditReversalAmount: OffAmazonPaymentsNotifications_Model_Price</li>
35
+ * <li>CreditReversalIdList: OffAmazonPaymentsNotifications_Model_IdList</li>
36
+ * <li>CreationTimestamp: string</li>
37
+ * <li>CreditStatus: OffAmazonPaymentsNotifications_Model_Status</li>
38
+ *
39
+ * </ul>
40
+ */
41
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditDetails extends OffAmazonPayments_Model {
42
+
43
+ /**
44
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditDetails
45
+ *
46
+ * @param mixed $data
47
+ * DOMElement or Associative Array to construct from.
48
+ *
49
+ * Valid properties:
50
+ * <ul>
51
+ *
52
+ * <li>AmazonProviderCreditId: string</li>
53
+ * <li>SellerId: string</li>
54
+ * <li>ProviderSellerId: string</li>
55
+ * <li>CreditAmount: OffAmazonPaymentsNotifications_Model_Price</li>
56
+ * <li>CreditReversalAmount: OffAmazonPaymentsNotifications_Model_Price</li>
57
+ * <li>CreditReversalIdList: OffAmazonPaymentsNotifications_Model_IdList</li>
58
+ * <li>CreationTimestamp: string</li>
59
+ * <li>CreditStatus: OffAmazonPaymentsNotifications_Model_Status</li>
60
+ *
61
+ * </ul>
62
+ */
63
+ public function __construct($data = null) {
64
+ $this->fields = array (
65
+ 'AmazonProviderCreditId' => array (
66
+ 'FieldValue' => null,
67
+ 'FieldType' => 'string'
68
+ ),
69
+ 'SellerId' => array (
70
+ 'FieldValue' => null,
71
+ 'FieldType' => 'string'
72
+ ),
73
+ 'ProviderSellerId' => array (
74
+ 'FieldValue' => null,
75
+ 'FieldType' => 'string'
76
+ ),
77
+
78
+ 'CreditAmount' => array (
79
+ 'FieldValue' => null,
80
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price'
81
+ ),
82
+
83
+ 'CreditReversalAmount' => array (
84
+ 'FieldValue' => null,
85
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price'
86
+ ),
87
+
88
+ 'CreditReversalIdList' => array (
89
+ 'FieldValue' => null,
90
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_IdList'
91
+ ),
92
+
93
+ 'CreationTimestamp' => array (
94
+ 'FieldValue' => null,
95
+ 'FieldType' => 'string'
96
+ ),
97
+
98
+ 'CreditStatus' => array (
99
+ 'FieldValue' => null,
100
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
101
+ )
102
+ );
103
+ parent::__construct ( $data );
104
+ }
105
+
106
+ /**
107
+ * Gets the value of the AmazonProviderCreditId property.
108
+ *
109
+ * @return string AmazonProviderCreditId
110
+ */
111
+ public function getAmazonProviderCreditId() {
112
+ return $this->fields ['AmazonProviderCreditId'] ['FieldValue'];
113
+ }
114
+
115
+ /**
116
+ * Sets the value of the AmazonProviderCreditId property.
117
+ *
118
+ * @param
119
+ * string AmazonProviderCreditId
120
+ * @return this instance
121
+ */
122
+ public function setAmazonProviderCreditId($value) {
123
+ $this->fields ['AmazonProviderCreditId'] ['FieldValue'] = $value;
124
+ return $this;
125
+ }
126
+
127
+ /**
128
+ * Sets the value of the AmazonProviderCreditId and returns this instance
129
+ *
130
+ * @param string $value
131
+ * AmazonProviderCreditId
132
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
133
+ */
134
+ public function withAmazonProviderCreditId($value) {
135
+ $this->setAmazonProviderCreditId ( $value );
136
+ return $this;
137
+ }
138
+
139
+ /**
140
+ * Checks if AmazonProviderCreditId is set
141
+ *
142
+ * @return bool true if AmazonProviderCreditId is set
143
+ */
144
+ public function isSetAmazonProviderCreditId() {
145
+ return ! is_null ( $this->fields ['AmazonProviderCreditId'] ['FieldValue'] );
146
+ }
147
+
148
+ /**
149
+ * Gets the value of the SellerId property.
150
+ *
151
+ * @return string SellerId
152
+ */
153
+ public function getSellerId() {
154
+ return $this->fields ['SellerId'] ['FieldValue'];
155
+ }
156
+
157
+ /**
158
+ * Sets the value of the SellerId property.
159
+ *
160
+ * @param
161
+ * string SellerId
162
+ * @return this instance
163
+ */
164
+ public function setSellerId($value) {
165
+ $this->fields ['SellerId'] ['FieldValue'] = $value;
166
+ return $this;
167
+ }
168
+
169
+ /**
170
+ * Sets the value of the SellerId and returns this instance
171
+ *
172
+ * @param string $value
173
+ * SellerId
174
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
175
+ */
176
+ public function withSellerId($value) {
177
+ $this->setSellerId ( $value );
178
+ return $this;
179
+ }
180
+
181
+ /**
182
+ * Checks if SellerId is set
183
+ *
184
+ * @return bool true if SellerId is set
185
+ */
186
+ public function isSetSellerId() {
187
+ return ! is_null ( $this->fields ['SellerId'] ['FieldValue'] );
188
+ }
189
+
190
+ /**
191
+ * Gets the value of the ProviderSellerId property.
192
+ *
193
+ * @return string ProviderSellerId
194
+ */
195
+ public function getProviderSellerId() {
196
+ return $this->fields ['ProviderSellerId'] ['FieldValue'];
197
+ }
198
+
199
+ /**
200
+ * Sets the value of the ProviderSellerId property.
201
+ *
202
+ * @param
203
+ * string ProviderSellerId
204
+ * @return this instance
205
+ */
206
+ public function setProviderSellerId($value) {
207
+ $this->fields ['ProviderSellerId'] ['FieldValue'] = $value;
208
+ return $this;
209
+ }
210
+
211
+ /**
212
+ * Sets the value of the ProviderSellerId and returns this instance
213
+ *
214
+ * @param string $value
215
+ * ProviderSellerId
216
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
217
+ */
218
+ public function withProviderSellerId($value) {
219
+ $this->setProviderSellerId ( $value );
220
+ return $this;
221
+ }
222
+
223
+ /**
224
+ * Checks if ProviderSellerId is set
225
+ *
226
+ * @return bool true if ProviderSellerId is set
227
+ */
228
+ public function isSetProviderSellerId() {
229
+ return ! is_null ( $this->fields ['ProviderSellerId'] ['FieldValue'] );
230
+ }
231
+
232
+ /**
233
+ * Gets the value of the CreditAmount.
234
+ *
235
+ * @return Price CreditAmount
236
+ */
237
+ public function getCreditAmount() {
238
+ return $this->fields ['CreditAmount'] ['FieldValue'];
239
+ }
240
+
241
+ /**
242
+ * Sets the value of the CreditAmount.
243
+ *
244
+ * @param
245
+ * Price CreditAmount
246
+ * @return void
247
+ */
248
+ public function setCreditAmount($value) {
249
+ $this->fields ['CreditAmount'] ['FieldValue'] = $value;
250
+ return;
251
+ }
252
+
253
+ /**
254
+ * Sets the value of the CreditAmount and returns this instance
255
+ *
256
+ * @param Price $value
257
+ * CreditAmount
258
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
259
+ */
260
+ public function withCreditAmount($value) {
261
+ $this->setCreditAmount ( $value );
262
+ return $this;
263
+ }
264
+
265
+ /**
266
+ * Checks if CreditAmount is set
267
+ *
268
+ * @return bool true if CreditAmount property is set
269
+ */
270
+ public function isSetCreditAmount() {
271
+ return ! is_null ( $this->fields ['CreditAmount'] ['FieldValue'] );
272
+ }
273
+
274
+ /**
275
+ * Gets the value of the CreditReversalAmount.
276
+ *
277
+ * @return Price CreditReversalAmount
278
+ */
279
+ public function getCreditReversalAmount() {
280
+ return $this->fields ['CreditReversalAmount'] ['FieldValue'];
281
+ }
282
+
283
+ /**
284
+ * Sets the value of the CreditReversalAmount.
285
+ *
286
+ * @param
287
+ * Price CreditReversalAmount
288
+ * @return void
289
+ */
290
+ public function setCreditReversalAmount($value) {
291
+ $this->fields ['CreditReversalAmount'] ['FieldValue'] = $value;
292
+ return;
293
+ }
294
+
295
+ /**
296
+ * Sets the value of the CreditReversalAmount and returns this instance
297
+ *
298
+ * @param Price $value
299
+ * CreditReversalAmount
300
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
301
+ */
302
+ public function withCreditReversalAmount($value) {
303
+ $this->setCreditReversalAmount ( $value );
304
+ return $this;
305
+ }
306
+
307
+ /**
308
+ * Checks if CreditReversalAmount is set
309
+ *
310
+ * @return bool true if CreditReversalAmount property is set
311
+ */
312
+ public function isSetCreditReversalAmount() {
313
+ return ! is_null ( $this->fields ['CreditReversalAmount'] ['FieldValue'] );
314
+ }
315
+
316
+ /**
317
+ * Gets the value of the CreditReversalIdList.
318
+ *
319
+ * @return IdList CreditReversalIdList
320
+ */
321
+ public function getCreditReversalIdList() {
322
+ return $this->fields ['CreditReversalIdList'] ['FieldValue'];
323
+ }
324
+
325
+ /**
326
+ * Sets the value of the CreditReversalIdList.
327
+ *
328
+ * @param
329
+ * IdList CreditReversalIdList
330
+ * @return void
331
+ */
332
+ public function setCreditReversalIdList($value) {
333
+ $this->fields ['CreditReversalIdList'] ['FieldValue'] = $value;
334
+ return;
335
+ }
336
+
337
+ /**
338
+ * Sets the value of the CreditReversalIdList and returns this instance
339
+ *
340
+ * @param IdList $value
341
+ * CreditReversalIdList
342
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
343
+ */
344
+ public function withCreditReversalIdList($value) {
345
+ $this->setCreditReversalIdList ( $value );
346
+ return $this;
347
+ }
348
+
349
+ /**
350
+ * Checks if CreditReversalIdList is set
351
+ *
352
+ * @return bool true if CreditReversalIdList property is set
353
+ */
354
+ public function isSetCreditReversalIdList() {
355
+ return ! is_null ( $this->fields ['CreditReversalIdList'] ['FieldValue'] );
356
+ }
357
+
358
+ /**
359
+ * Gets the value of the CreationTimestamp property.
360
+ *
361
+ * @return string CreationTimestamp
362
+ */
363
+ public function getCreationTimestamp() {
364
+ return $this->fields ['CreationTimestamp'] ['FieldValue'];
365
+ }
366
+
367
+ /**
368
+ * Sets the value of the CreationTimestamp property.
369
+ *
370
+ * @param
371
+ * string CreationTimestamp
372
+ * @return this instance
373
+ */
374
+ public function setCreationTimestamp($value) {
375
+ $this->fields ['CreationTimestamp'] ['FieldValue'] = $value;
376
+ return $this;
377
+ }
378
+
379
+ /**
380
+ * Sets the value of the CreationTimestamp and returns this instance
381
+ *
382
+ * @param string $value
383
+ * CreationTimestamp
384
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
385
+ */
386
+ public function withCreationTimestamp($value) {
387
+ $this->setCreationTimestamp ( $value );
388
+ return $this;
389
+ }
390
+
391
+ /**
392
+ * Checks if CreationTimestamp is set
393
+ *
394
+ * @return bool true if CreationTimestamp is set
395
+ */
396
+ public function isSetCreationTimestamp() {
397
+ return ! is_null ( $this->fields ['CreationTimestamp'] ['FieldValue'] );
398
+ }
399
+
400
+ /**
401
+ * Gets the value of the CreditStatus.
402
+ *
403
+ * @return Status CreditStatus
404
+ */
405
+ public function getCreditStatus() {
406
+ return $this->fields ['CreditStatus'] ['FieldValue'];
407
+ }
408
+
409
+ /**
410
+ * Sets the value of the CreditStatus.
411
+ *
412
+ * @param
413
+ * Status CreditStatus
414
+ * @return void
415
+ */
416
+ public function setCreditStatus($value) {
417
+ $this->fields ['CreditStatus'] ['FieldValue'] = $value;
418
+ return;
419
+ }
420
+
421
+ /**
422
+ * Sets the value of the CreditStatus and returns this instance
423
+ *
424
+ * @param Status $value
425
+ * CreditStatus
426
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditDetails instance
427
+ */
428
+ public function withCreditStatus($value) {
429
+ $this->setCreditStatus ( $value );
430
+ return $this;
431
+ }
432
+
433
+ /**
434
+ * Checks if CreditStatus is set
435
+ *
436
+ * @return bool true if CreditStatus property is set
437
+ */
438
+ public function isSetCreditStatus() {
439
+ return ! is_null ( $this->fields ['CreditStatus'] ['FieldValue'] );
440
+ }
441
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditNotification.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ require_once 'OffAmazonPaymentsNotifications/Model/NotificationImpl.php';
19
+ require_once 'OffAmazonPaymentsNotifications/NotificationMetadata.php';
20
+
21
+ /**
22
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditNotification
23
+ *
24
+ * Properties:
25
+ * <ul>
26
+ *
27
+ * <li>ProviderCreditDetails: OffAmazonPaymentsNotifications_Model_ProviderCreditDetails</li>
28
+ *
29
+ * </ul>
30
+ */
31
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditNotification
32
+ extends OffAmazonPaymentsNotifications_NotificationImpl
33
+ {
34
+ /**
35
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditNotification
36
+ *
37
+ * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request
38
+ * @param mixed $data DOMElement or Associative Array
39
+ * to construct from.
40
+ *
41
+ * Valid properties:
42
+ * <ul>
43
+ *
44
+ * <li>ProviderCreditDetails: OffAmazonPaymentsNotifications_Model_ProviderCreditDetails</li>
45
+ *
46
+ * </ul>
47
+ */
48
+ public function __construct(
49
+ OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata,
50
+ $data = null
51
+ ) {
52
+ $this->fields = array (
53
+ 'ProviderCreditDetails' => array(
54
+ 'FieldValue' => null,
55
+ 'FieldType' =>
56
+ 'OffAmazonPaymentsNotifications_Model_ProviderCreditDetails'
57
+ )
58
+ );
59
+ parent::__construct(
60
+ $notificationMetadata,
61
+ "ProviderCreditNotification",
62
+ $data
63
+ );
64
+ }
65
+
66
+ /**
67
+ * Construct OffAmazonPaymentsNotifications_Model_ProviderCreditNotification
68
+ * from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ *
72
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditNotification
73
+ */
74
+ public static function fromXML($xml)
75
+ {
76
+ $dom = new DOMDocument();
77
+ $dom->loadXML($xml);
78
+ $xpath = new DOMXPath($dom);
79
+ $xpath->registerNamespace('a', self::getNamespace());
80
+ $response = $xpath->query('//a:ProviderCreditNotification');
81
+ if ($response->length == 1) {
82
+ return
83
+ new OffAmazonPaymentsNotifications_Model_ProviderCreditNotification(
84
+ $response->item(0)
85
+ );
86
+ } else {
87
+ throw new Exception(
88
+ "Unable to construct " .
89
+ "OffAmazonPaymentsNotifications_Model_ProviderCreditNotification" .
90
+ "from provided XML. Make sure that ProviderCreditNotification" .
91
+ "is a root element"
92
+ );
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Gets the value of the ProviderCreditNotification.
98
+ *
99
+ * @return OrderReference property value
100
+ */
101
+ public function getProviderCreditDetails()
102
+ {
103
+ return $this->fields['ProviderCreditDetails']['FieldValue'];
104
+ }
105
+
106
+ /**
107
+ * Sets the value of the ProviderCreditDetails.
108
+ *
109
+ * @param OrderReference $value new value
110
+ *
111
+ * @return void
112
+ */
113
+ public function setProviderCreditDetails($value)
114
+ {
115
+ $this->fields['ProviderCreditDetails']['FieldValue'] = $value;
116
+ return;
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the ProviderCreditDetails
121
+ * and returns this instance
122
+ *
123
+ * @param ProviderCreditDetails $value ProviderCreditDetails
124
+ *
125
+ * @return OffAmazonPaymentsServices_Model_ProviderCreditDetails instance
126
+ */
127
+ public function withProviderCreditDetails($value)
128
+ {
129
+ $this->setProviderCreditDetails($value);
130
+ return $this;
131
+ }
132
+
133
+ /**
134
+ * Checks if ProviderCreditDetails is set
135
+ *
136
+ * @return bool true if ProviderCreditDetails property is set
137
+ */
138
+ public function isSetProviderCreditDetails()
139
+ {
140
+ return !is_null($this->fields['ProviderCreditDetails']['FieldValue']);
141
+ }
142
+
143
+ /**
144
+ * XML Representation for this object
145
+ *
146
+ * @return string XML for this object
147
+ */
148
+ public function toXML()
149
+ {
150
+ $xml = "";
151
+ $xml .= "<ProviderCreditNotification xmlns=\"";
152
+ $xml .= self::getNamespace();
153
+ $xml .= "\">";
154
+ $xml .= $this->_toXMLFragment();
155
+ $xml .= "</ProviderCreditNotification>";
156
+ return $xml;
157
+ }
158
+ }
159
+ ?>
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalDetails.php ADDED
@@ -0,0 +1,439 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ /**
19
+ *
20
+ * @see OffAmazonPaymentsNotification_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+ /**
25
+ * OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails
26
+ *
27
+ * Properties:
28
+ * <ul>
29
+ *
30
+ * <li>AmazonProviderCreditReversalId: string</li>
31
+ * <li>SellerId: string</li>
32
+ * <li>ProviderSellerId: string</li>
33
+ * <li>CreditReversalReferenceId: string</li>
34
+ * <li>CreditReversalAmount: OffAmazonPaymentsNotification_Model_Price</li>
35
+ * <li>CreationTimestamp: string</li>
36
+ * <li>CreditReversalStatus: OffAmazonPaymentsNotification_Model_Status</li>
37
+ * <li>CreditReversalNote: string</li>
38
+ *
39
+ * </ul>
40
+ */
41
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditReversalDetails extends OffAmazonPayments_Model {
42
+
43
+ /**
44
+ * Construct new OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails
45
+ *
46
+ * @param mixed $data
47
+ * DOMElement or Associative Array to construct from.
48
+ *
49
+ * Valid properties:
50
+ * <ul>
51
+ *
52
+ * <li>AmazonProviderCreditReversalId: string</li>
53
+ * <li>SellerId: string</li>
54
+ * <li>ProviderSellerId: string</li>
55
+ * <li>CreditReversalReferenceId: string</li>
56
+ * <li>CreditReversalAmount: OffAmazonPaymentsNotifications_Model_Price</li>
57
+ * <li>CreationTimestamp: string</li>
58
+ * <li>CreditReversalStatus: OffAmazonPaymentsNotifications_Model_Status</li>
59
+ * <li>CreditReversalNote: string</li>
60
+ * </ul>
61
+ */
62
+ public function __construct($data = null) {
63
+ $this->fields = array (
64
+ 'AmazonProviderCreditReversalId' => array (
65
+ 'FieldValue' => null,
66
+ 'FieldType' => 'string'
67
+ ),
68
+ 'SellerId' => array (
69
+ 'FieldValue' => null,
70
+ 'FieldType' => 'string'
71
+ ),
72
+ 'ProviderSellerId' => array (
73
+ 'FieldValue' => null,
74
+ 'FieldType' => 'string'
75
+ ),
76
+ 'CreditReversalReferenceId' => array (
77
+ 'FieldValue' => null,
78
+ 'FieldType' => 'string'
79
+ ),
80
+
81
+ 'CreditReversalAmount' => array (
82
+ 'FieldValue' => null,
83
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price'
84
+ ),
85
+
86
+ 'CreationTimestamp' => array (
87
+ 'FieldValue' => null,
88
+ 'FieldType' => 'string'
89
+ ),
90
+
91
+ 'CreditReversalStatus' => array (
92
+ 'FieldValue' => null,
93
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
94
+ ),
95
+
96
+ 'CreditReversalNote' => array (
97
+ 'FieldValue' => null,
98
+ 'FieldType' => 'string'
99
+ )
100
+ );
101
+ parent::__construct ( $data );
102
+ }
103
+
104
+ /**
105
+ * Gets the value of the AmazonProviderCreditReversalId property.
106
+ *
107
+ * @return string AmazonProviderCreditReversalId
108
+ */
109
+ public function getAmazonProviderCreditReversalId() {
110
+ return $this->fields ['AmazonProviderCreditReversalId'] ['FieldValue'];
111
+ }
112
+
113
+ /**
114
+ * Sets the value of the AmazonProviderCreditReversalId property.
115
+ *
116
+ * @param
117
+ * string AmazonProviderCreditReversalId
118
+ * @return this instance
119
+ */
120
+ public function setAmazonProviderCreditReversalId($value) {
121
+ $this->fields ['AmazonProviderCreditReversalId'] ['FieldValue'] = $value;
122
+ return $this;
123
+ }
124
+
125
+ /**
126
+ * Sets the value of the AmazonProviderCreditReversalId and returns this instance
127
+ *
128
+ * @param string $value
129
+ * AmazonProviderCreditReversalId
130
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
131
+ */
132
+ public function withAmazonProviderCreditReversalId($value) {
133
+ $this->setAmazonProviderCreditReversalId ( $value );
134
+ return $this;
135
+ }
136
+
137
+ /**
138
+ * Checks if AmazonProviderCreditReversalId is set
139
+ *
140
+ * @return bool true if AmazonProviderCreditReversalId is set
141
+ */
142
+ public function isSetAmazonProviderCreditReversalId() {
143
+ return ! is_null ( $this->fields ['AmazonProviderCreditReversalId'] ['FieldValue'] );
144
+ }
145
+
146
+ /**
147
+ * Gets the value of the SellerId property.
148
+ *
149
+ * @return string SellerId
150
+ */
151
+ public function getSellerId() {
152
+ return $this->fields ['SellerId'] ['FieldValue'];
153
+ }
154
+
155
+ /**
156
+ * Sets the value of the SellerId property.
157
+ *
158
+ * @param
159
+ * string SellerId
160
+ * @return this instance
161
+ */
162
+ public function setSellerId($value) {
163
+ $this->fields ['SellerId'] ['FieldValue'] = $value;
164
+ return $this;
165
+ }
166
+
167
+ /**
168
+ * Sets the value of the SellerId and returns this instance
169
+ *
170
+ * @param string $value
171
+ * SellerId
172
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
173
+ */
174
+ public function withSellerId($value) {
175
+ $this->setSellerId ( $value );
176
+ return $this;
177
+ }
178
+
179
+ /**
180
+ * Checks if SellerId is set
181
+ *
182
+ * @return bool true if SellerId is set
183
+ */
184
+ public function isSetSellerId() {
185
+ return ! is_null ( $this->fields ['SellerId'] ['FieldValue'] );
186
+ }
187
+
188
+ /**
189
+ * Gets the value of the ProviderSellerId property.
190
+ *
191
+ * @return string ProviderSellerId
192
+ */
193
+ public function getProviderSellerId() {
194
+ return $this->fields ['ProviderSellerId'] ['FieldValue'];
195
+ }
196
+
197
+ /**
198
+ * Sets the value of the ProviderSellerId property.
199
+ *
200
+ * @param
201
+ * string ProviderSellerId
202
+ * @return this instance
203
+ */
204
+ public function setProviderSellerId($value) {
205
+ $this->fields ['ProviderSellerId'] ['FieldValue'] = $value;
206
+ return $this;
207
+ }
208
+
209
+ /**
210
+ * Sets the value of the ProviderSellerId and returns this instance
211
+ *
212
+ * @param string $value
213
+ * ProviderSellerId
214
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
215
+ */
216
+ public function withProviderSellerId($value) {
217
+ $this->setProviderSellerId ( $value );
218
+ return $this;
219
+ }
220
+
221
+ /**
222
+ * Checks if ProviderSellerId is set
223
+ *
224
+ * @return bool true if ProviderSellerId is set
225
+ */
226
+ public function isSetProviderSellerId() {
227
+ return ! is_null ( $this->fields ['ProviderSellerId'] ['FieldValue'] );
228
+ }
229
+
230
+ /**
231
+ * Gets the value of the CreditReversalReferenceId property.
232
+ *
233
+ * @return string CreditReversalReferenceId
234
+ */
235
+ public function getCreditReversalReferenceId() {
236
+ return $this->fields ['CreditReversalReferenceId'] ['FieldValue'];
237
+ }
238
+
239
+ /**
240
+ * Sets the value of the CreditReversalReferenceId property.
241
+ *
242
+ * @param
243
+ * string CreditReversalReferenceId
244
+ * @return this instance
245
+ */
246
+ public function setCreditReversalReferenceId($value) {
247
+ $this->fields ['CreditReversalReferenceId'] ['FieldValue'] = $value;
248
+ return $this;
249
+ }
250
+
251
+ /**
252
+ * Sets the value of the CreditReversalReferenceId and returns this instance
253
+ *
254
+ * @param string $value
255
+ * CreditReversalReferenceId
256
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
257
+ */
258
+ public function withCreditReversalReferenceId($value) {
259
+ $this->setCreditReversalReferenceId ( $value );
260
+ return $this;
261
+ }
262
+
263
+ /**
264
+ * Checks if CreditReversalReferenceId is set
265
+ *
266
+ * @return bool true if CreditReversalReferenceId is set
267
+ */
268
+ public function isSetCreditReversalReferenceId() {
269
+ return ! is_null ( $this->fields ['CreditReversalReferenceId'] ['FieldValue'] );
270
+ }
271
+
272
+ /**
273
+ * Gets the value of the CreditReversalAmount.
274
+ *
275
+ * @return Price CreditReversalAmount
276
+ */
277
+ public function getCreditReversalAmount() {
278
+ return $this->fields ['CreditReversalAmount'] ['FieldValue'];
279
+ }
280
+
281
+ /**
282
+ * Sets the value of the CreditReversalAmount.
283
+ *
284
+ * @param
285
+ * Price CreditReversalAmount
286
+ * @return void
287
+ */
288
+ public function setCreditReversalAmount($value) {
289
+ $this->fields ['CreditReversalAmount'] ['FieldValue'] = $value;
290
+ return;
291
+ }
292
+
293
+ /**
294
+ * Sets the value of the CreditReversalAmount and returns this instance
295
+ *
296
+ * @param Price $value
297
+ * CreditReversalAmount
298
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
299
+ */
300
+ public function withCreditReversalAmount($value) {
301
+ $this->setCreditReversalAmount ( $value );
302
+ return $this;
303
+ }
304
+
305
+ /**
306
+ * Checks if CreditReversalAmount is set
307
+ *
308
+ * @return bool true if CreditReversalAmount property is set
309
+ */
310
+ public function isSetCreditReversalAmount() {
311
+ return ! is_null ( $this->fields ['CreditReversalAmount'] ['FieldValue'] );
312
+ }
313
+
314
+ /**
315
+ * Gets the value of the CreationTimestamp property.
316
+ *
317
+ * @return string CreationTimestamp
318
+ */
319
+ public function getCreationTimestamp() {
320
+ return $this->fields ['CreationTimestamp'] ['FieldValue'];
321
+ }
322
+
323
+ /**
324
+ * Sets the value of the CreationTimestamp property.
325
+ *
326
+ * @param
327
+ * string CreationTimestamp
328
+ * @return this instance
329
+ */
330
+ public function setCreationTimestamp($value) {
331
+ $this->fields ['CreationTimestamp'] ['FieldValue'] = $value;
332
+ return $this;
333
+ }
334
+
335
+ /**
336
+ * Sets the value of the CreationTimestamp and returns this instance
337
+ *
338
+ * @param string $value
339
+ * CreationTimestamp
340
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
341
+ */
342
+ public function withCreationTimestamp($value) {
343
+ $this->setCreationTimestamp ( $value );
344
+ return $this;
345
+ }
346
+
347
+ /**
348
+ * Checks if CreationTimestamp is set
349
+ *
350
+ * @return bool true if CreationTimestamp is set
351
+ */
352
+ public function isSetCreationTimestamp() {
353
+ return ! is_null ( $this->fields ['CreationTimestamp'] ['FieldValue'] );
354
+ }
355
+
356
+ /**
357
+ * Gets the value of the CreditReversalStatus.
358
+ *
359
+ * @return Status CreditReversalStatus
360
+ */
361
+ public function getCreditReversalStatus() {
362
+ return $this->fields ['CreditReversalStatus'] ['FieldValue'];
363
+ }
364
+
365
+ /**
366
+ * Sets the value of the CreditReversalStatus.
367
+ *
368
+ * @param
369
+ * Status CreditReversalStatus
370
+ * @return void
371
+ */
372
+ public function setCreditReversalStatus($value) {
373
+ $this->fields ['CreditReversalStatus'] ['FieldValue'] = $value;
374
+ return;
375
+ }
376
+
377
+ /**
378
+ * Sets the value of the CreditReversalStatus and returns this instance
379
+ *
380
+ * @param Status $value
381
+ * CreditReversalStatus
382
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
383
+ */
384
+ public function withCreditReversalStatus($value) {
385
+ $this->setCreditReversalStatus ( $value );
386
+ return $this;
387
+ }
388
+
389
+ /**
390
+ * Checks if CreditReversalStatus is set
391
+ *
392
+ * @return bool true if CreditReversalStatus property is set
393
+ */
394
+ public function isSetCreditReversalStatus() {
395
+ return ! is_null ( $this->fields ['CreditReversalStatus'] ['FieldValue'] );
396
+ }
397
+
398
+ /**
399
+ * Gets the value of the CreditReversalNote property.
400
+ *
401
+ * @return string CreditReversalNote
402
+ */
403
+ public function getCreditReversalNote() {
404
+ return $this->fields ['CreditReversalNote'] ['FieldValue'];
405
+ }
406
+
407
+ /**
408
+ * Sets the value of the CreditReversalNote property.
409
+ *
410
+ * @param
411
+ * string CreditReversalNote
412
+ * @return this instance
413
+ */
414
+ public function setCreditReversalNote($value) {
415
+ $this->fields ['CreditReversalNote'] ['FieldValue'] = $value;
416
+ return $this;
417
+ }
418
+
419
+ /**
420
+ * Sets the value of the CreditReversalNote and returns this instance
421
+ *
422
+ * @param string $value
423
+ * CreditReversalNote
424
+ * @return OffAmazonPaymentsNotification_Model_ProviderCreditReversalDetails instance
425
+ */
426
+ public function withCreditReversalNote($value) {
427
+ $this->setCreditReversalNote ( $value );
428
+ return $this;
429
+ }
430
+
431
+ /**
432
+ * Checks if CreditReversalNote is set
433
+ *
434
+ * @return bool true if CreditReversalNote is set
435
+ */
436
+ public function isSetCreditReversalNote() {
437
+ return ! is_null ( $this->fields ['CreditReversalNote'] ['FieldValue'] );
438
+ }
439
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalNotification.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ require_once 'OffAmazonPaymentsNotifications/Model/NotificationImpl.php';
19
+ require_once 'OffAmazonPaymentsNotifications/NotificationMetadata.php';
20
+
21
+ /**
22
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification
23
+ *
24
+ * Properties:
25
+ * <ul>
26
+ *
27
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalDetails</li>
28
+ *
29
+ * </ul>
30
+ */
31
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification
32
+ extends OffAmazonPaymentsNotifications_NotificationImpl
33
+ {
34
+ /**
35
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification
36
+ *
37
+ * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request
38
+ * @param mixed $data DOMElement or Associative Array
39
+ * to construct from.
40
+ *
41
+ * Valid properties:
42
+ * <ul>
43
+ *
44
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalDetails</li>
45
+ *
46
+ * </ul>
47
+ */
48
+ public function __construct(
49
+ OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata,
50
+ $data = null
51
+ ) {
52
+ $this->fields = array (
53
+ 'ProviderCreditReversalDetails' => array(
54
+ 'FieldValue' => null,
55
+ 'FieldType' =>
56
+ 'OffAmazonPaymentsNotifications_Model_ProviderCreditReversalDetails'
57
+ )
58
+ );
59
+ parent::__construct(
60
+ $notificationMetadata,
61
+ "ProviderCreditReversalNotification",
62
+ $data
63
+ );
64
+ }
65
+
66
+ /**
67
+ * Construct OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification
68
+ * from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ *
72
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification
73
+ */
74
+ public static function fromXML($xml)
75
+ {
76
+ $dom = new DOMDocument();
77
+ $dom->loadXML($xml);
78
+ $xpath = new DOMXPath($dom);
79
+ $xpath->registerNamespace('a', self::getNamespace());
80
+ $response = $xpath->query('//a:ProviderCreditReversalNotification');
81
+ if ($response->length == 1) {
82
+ return
83
+ new OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification(
84
+ $response->item(0)
85
+ );
86
+ } else {
87
+ throw new Exception(
88
+ "Unable to construct " .
89
+ "OffAmazonPaymentsNotifications_Model_ProviderCreditReversalNotification" .
90
+ "from provided XML. Make sure that ProviderCreditReversalNotification" .
91
+ "is a root element"
92
+ );
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Gets the value of the ProviderCreditReversalNotification.
98
+ *
99
+ * @return OrderReference property value
100
+ */
101
+ public function getProviderCreditReversalDetails()
102
+ {
103
+ return $this->fields['ProviderCreditReversalDetails']['FieldValue'];
104
+ }
105
+
106
+ /**
107
+ * Sets the value of the ProviderCreditReversalDetails.
108
+ *
109
+ * @param OrderReference $value new value
110
+ *
111
+ * @return void
112
+ */
113
+ public function setProviderCreditReversalDetails($value)
114
+ {
115
+ $this->fields['ProviderCreditReversalDetails']['FieldValue'] = $value;
116
+ return;
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the ProviderCreditReversalDetails
121
+ * and returns this instance
122
+ *
123
+ * @param ProviderCreditReversalDetails $value ProviderCreditReversalDetails
124
+ *
125
+ * @return OffAmazonPaymentsServices_Model_ProviderCreditReversalDetails instance
126
+ */
127
+ public function withProviderCreditReversalDetails($value)
128
+ {
129
+ $this->setProviderCreditReversalDetails($value);
130
+ return $this;
131
+ }
132
+
133
+ /**
134
+ * Checks if ProviderCreditReversalDetails is set
135
+ *
136
+ * @return bool true if ProviderCreditReversalDetails property is set
137
+ */
138
+ public function isSetProviderCreditReversalDetails()
139
+ {
140
+ return !is_null($this->fields['ProviderCreditReversalDetails']['FieldValue']);
141
+ }
142
+
143
+ /**
144
+ * XML Representation for this object
145
+ *
146
+ * @return string XML for this object
147
+ */
148
+ public function toXML()
149
+ {
150
+ $xml = "";
151
+ $xml .= "<ProviderCreditReversalNotification xmlns=\"";
152
+ $xml .= self::getNamespace();
153
+ $xml .= "\">";
154
+ $xml .= $this->_toXMLFragment();
155
+ $xml .= "</ProviderCreditReversalNotification>";
156
+ return $xml;
157
+ }
158
+ }
159
+ ?>
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummary.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderSellerId: string</li>
33
+ * <li>ProviderCreditReversalId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary extends OffAmazonPayments_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderSellerId: string</li>
49
+ * <li>ProviderCreditReversalId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->fields = array (
56
+ 'ProviderSellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'ProviderCreditReversalId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the ProviderSellerId property.
64
+ *
65
+ * @return string ProviderSellerId
66
+ */
67
+ public function getProviderSellerId()
68
+ {
69
+ return $this->fields['ProviderSellerId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the ProviderSellerId property.
74
+ *
75
+ * @param string ProviderSellerId
76
+ * @return this instance
77
+ */
78
+ public function setProviderSellerId($value)
79
+ {
80
+ $this->fields['ProviderSellerId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the ProviderSellerId and returns this instance
86
+ *
87
+ * @param string $value ProviderSellerId
88
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary instance
89
+ */
90
+ public function withProviderSellerId($value)
91
+ {
92
+ $this->setProviderSellerId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if ProviderSellerId is set
99
+ *
100
+ * @return bool true if ProviderSellerId is set
101
+ */
102
+ public function isSetProviderSellerId()
103
+ {
104
+ return !is_null($this->fields['ProviderSellerId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the ProviderCreditReversalId property.
109
+ *
110
+ * @return string ProviderCreditReversalId
111
+ */
112
+ public function getProviderCreditReversalId()
113
+ {
114
+ return $this->fields['ProviderCreditReversalId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the ProviderCreditReversalId property.
119
+ *
120
+ * @param string ProviderCreditReversalId
121
+ * @return this instance
122
+ */
123
+ public function setProviderCreditReversalId($value)
124
+ {
125
+ $this->fields['ProviderCreditReversalId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the ProviderCreditReversalId and returns this instance
131
+ *
132
+ * @param string $value ProviderCreditReversalId
133
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary instance
134
+ */
135
+ public function withProviderCreditReversalId($value)
136
+ {
137
+ $this->setProviderCreditReversalId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if ProviderCreditReversalId is set
144
+ *
145
+ * @return bool true if ProviderCreditReversalId is set
146
+ */
147
+ public function isSetProviderCreditReversalId()
148
+ {
149
+ return !is_null($this->fields['ProviderCreditReversalId']['FieldValue']);
150
+ }
151
+
152
+
153
+
154
+
155
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditReversalSummaryList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderCreditReversalSummary: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList extends OffAmazonPayments_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>ProviderCreditReversalSummary: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->fields = array (
54
+ 'ProviderCreditReversalSummary' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummary')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the ProviderCreditReversalSummary.
61
+ *
62
+ * @return array of ProviderCreditReversalSummary ProviderCreditReversalSummary
63
+ */
64
+ public function getProviderCreditReversalSummary()
65
+ {
66
+ return $this->fields['ProviderCreditReversalSummary']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the ProviderCreditReversalSummary.
71
+ *
72
+ * @param mixed ProviderCreditReversalSummary or an array of ProviderCreditReversalSummary ProviderCreditReversalSummary
73
+ * @return this instance
74
+ */
75
+ public function setProviderCreditReversalSummary($ProviderCreditReversalSummary)
76
+ {
77
+ if (!$this->_isNumericArray($ProviderCreditReversalSummary)) {
78
+ $ProviderCreditReversalSummary = array ($ProviderCreditReversalSummary);
79
+ }
80
+ $this->fields['ProviderCreditReversalSummary']['FieldValue'] = $ProviderCreditReversalSummary;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of ProviderCreditReversalSummary list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withProviderCreditReversalSummary($ProviderCreditReversalSummary1, $ProviderCreditReversalSummary2)</code>
89
+ *
90
+ * @param ProviderCreditReversalSummary $providerCreditReversalSummaryArgs one or more ProviderCreditReversalSummary
91
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList instance
92
+ */
93
+ public function withProviderCreditReversalSummary($providerCreditReversalSummaryArgs)
94
+ {
95
+ foreach (func_get_args() as $ProviderCreditReversalSummary) {
96
+ $this->fields['ProviderCreditReversalSummary']['FieldValue'][] = $ProviderCreditReversalSummary;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if ProviderCreditReversalSummary list is non-empty
105
+ *
106
+ * @return bool true if ProviderCreditReversalSummary list is non-empty
107
+ */
108
+ public function isSetProviderCreditReversalSummary()
109
+ {
110
+ return count ($this->fields['ProviderCreditReversalSummary']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditSummary.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditSummary
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderSellerId: string</li>
33
+ * <li>ProviderCreditId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditSummary extends OffAmazonPayments_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditSummary
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderSellerId: string</li>
49
+ * <li>ProviderCreditId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->fields = array (
56
+ 'ProviderSellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'ProviderCreditId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the ProviderSellerId property.
64
+ *
65
+ * @return string ProviderSellerId
66
+ */
67
+ public function getProviderSellerId()
68
+ {
69
+ return $this->fields['ProviderSellerId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the ProviderSellerId property.
74
+ *
75
+ * @param string ProviderSellerId
76
+ * @return this instance
77
+ */
78
+ public function setProviderSellerId($value)
79
+ {
80
+ $this->fields['ProviderSellerId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the ProviderSellerId and returns this instance
86
+ *
87
+ * @param string $value ProviderSellerId
88
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditSummary instance
89
+ */
90
+ public function withProviderSellerId($value)
91
+ {
92
+ $this->setProviderSellerId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if ProviderSellerId is set
99
+ *
100
+ * @return bool true if ProviderSellerId is set
101
+ */
102
+ public function isSetProviderSellerId()
103
+ {
104
+ return !is_null($this->fields['ProviderSellerId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the ProviderCreditId property.
109
+ *
110
+ * @return string ProviderCreditId
111
+ */
112
+ public function getProviderCreditId()
113
+ {
114
+ return $this->fields['ProviderCreditId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the ProviderCreditId property.
119
+ *
120
+ * @param string ProviderCreditId
121
+ * @return this instance
122
+ */
123
+ public function setProviderCreditId($value)
124
+ {
125
+ $this->fields['ProviderCreditId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the ProviderCreditId and returns this instance
131
+ *
132
+ * @param string $value ProviderCreditId
133
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditSummary instance
134
+ */
135
+ public function withProviderCreditId($value)
136
+ {
137
+ $this->setProviderCreditId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if ProviderCreditId is set
144
+ *
145
+ * @return bool true if ProviderCreditId is set
146
+ */
147
+ public function isSetProviderCreditId()
148
+ {
149
+ return !is_null($this->fields['ProviderCreditId']['FieldValue']);
150
+ }
151
+
152
+ }
lib/OffAmazonPaymentsNotifications/Model/ProviderCreditSummaryList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderCreditSummary: OffAmazonPaymentsNotifications_Model_ProviderCreditSummary</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList extends OffAmazonPayments_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>ProviderCreditSummary: OffAmazonPaymentsNotifications_Model_ProviderCreditSummary</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->fields = array (
54
+ 'ProviderCreditSummary' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsNotifications_Model_ProviderCreditSummary')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the ProviderCreditSummary.
61
+ *
62
+ * @return array of ProviderCreditSummary ProviderCreditSummary
63
+ */
64
+ public function getProviderCreditSummary()
65
+ {
66
+ return $this->fields['ProviderCreditSummary']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the ProviderCreditSummary.
71
+ *
72
+ * @param mixed ProviderCreditSummary or an array of ProviderCreditSummary ProviderCreditSummary
73
+ * @return this instance
74
+ */
75
+ public function setProviderCreditSummary($ProviderCreditSummary)
76
+ {
77
+ if (!$this->_isNumericArray($ProviderCreditSummary)) {
78
+ $ProviderCreditSummary = array ($ProviderCreditSummary);
79
+ }
80
+ $this->fields['ProviderCreditSummary']['FieldValue'] = $ProviderCreditSummary;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of ProviderCreditSummary list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withProviderCreditSummary($ProviderCreditSummary1, $ProviderCreditSummary2)</code>
89
+ *
90
+ * @param ProviderCreditSummary $providerCreditSummaryArgs one or more ProviderCreditSummary
91
+ * @return OffAmazonPaymentsNotifications_Model_ProviderCreditSummaryList instance
92
+ */
93
+ public function withProviderCreditSummary($providerCreditSummaryArgs)
94
+ {
95
+ foreach (func_get_args() as $ProviderCreditSummary) {
96
+ $this->fields['ProviderCreditSummary']['FieldValue'][] = $ProviderCreditSummary;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if ProviderCreditSummary list is non-empty
105
+ *
106
+ * @return bool true if ProviderCreditSummary list is non-empty
107
+ */
108
+ public function isSetProviderCreditSummary()
109
+ {
110
+ return count ($this->fields['ProviderCreditSummary']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsNotifications/Model/RefundDetails.php CHANGED
@@ -30,6 +30,7 @@ require_once 'OffAmazonPayments/Model.php';
30
  * <li>FeeRefunded: OffAmazonPaymentsNotifications_Model_Price</li>
31
  * <li>CreationTimestamp: string</li>
32
  * <li>RefundStatus: OffAmazonPaymentsNotifications_Model_Status</li>
 
33
  * <li>SoftDescriptor: string</li>
34
  *
35
  * </ul>
@@ -52,6 +53,7 @@ class OffAmazonPaymentsNotifications_Model_RefundDetails extends OffAmazonPaymen
52
  * <li>FeeRefunded: OffAmazonPaymentsNotifications_Model_Price</li>
53
  * <li>CreationTimestamp: string</li>
54
  * <li>RefundStatus: OffAmazonPaymentsNotifications_Model_Status</li>
 
55
  * <li>SoftDescriptor: string</li>
56
  *
57
  * </ul>
@@ -87,6 +89,10 @@ class OffAmazonPaymentsNotifications_Model_RefundDetails extends OffAmazonPaymen
87
  'FieldValue' => null,
88
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
89
  ),
 
 
 
 
90
  'SoftDescriptor' => array(
91
  'FieldValue' => null,
92
  'FieldType' => 'string'
@@ -473,5 +479,51 @@ class OffAmazonPaymentsNotifications_Model_RefundDetails extends OffAmazonPaymen
473
  {
474
  return !is_null($this->fields['SoftDescriptor']['FieldValue']);
475
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  }
477
  ?>
30
  * <li>FeeRefunded: OffAmazonPaymentsNotifications_Model_Price</li>
31
  * <li>CreationTimestamp: string</li>
32
  * <li>RefundStatus: OffAmazonPaymentsNotifications_Model_Status</li>
33
+ * <li>ProviderCreditReversalSummaryList: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList</li>
34
  * <li>SoftDescriptor: string</li>
35
  *
36
  * </ul>
53
  * <li>FeeRefunded: OffAmazonPaymentsNotifications_Model_Price</li>
54
  * <li>CreationTimestamp: string</li>
55
  * <li>RefundStatus: OffAmazonPaymentsNotifications_Model_Status</li>
56
+ * <li>ProviderCreditReversalSummaryList: OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList</li>
57
  * <li>SoftDescriptor: string</li>
58
  *
59
  * </ul>
89
  'FieldValue' => null,
90
  'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status'
91
  ),
92
+ 'ProviderCreditReversalSummaryList' => array(
93
+ 'FieldValue' => null,
94
+ 'FieldType' => 'OffAmazonPaymentsNotifications_Model_ProviderCreditReversalSummaryList'
95
+ ),
96
  'SoftDescriptor' => array(
97
  'FieldValue' => null,
98
  'FieldType' => 'string'
479
  {
480
  return !is_null($this->fields['SoftDescriptor']['FieldValue']);
481
  }
482
+
483
+ /**
484
+ * Gets the value of the ProviderCreditReversalSummaryList.
485
+ *
486
+ * @return ProviderCreditReversalSummaryList ProviderCreditReversalSummaryList
487
+ */
488
+ public function getProviderCreditReversalSummaryList()
489
+ {
490
+ return $this->fields['ProviderCreditReversalSummaryList']['FieldValue'];
491
+ }
492
+
493
+ /**
494
+ * Sets the value of the ProviderCreditReversalSummaryList.
495
+ *
496
+ * @param ProviderCreditReversalSummaryList ProviderCreditReversalSummaryList
497
+ * @return void
498
+ */
499
+ public function setProviderCreditReversalSummaryList($value)
500
+ {
501
+ $this->fields['ProviderCreditReversalSummaryList']['FieldValue'] = $value;
502
+ return;
503
+ }
504
+
505
+ /**
506
+ * Sets the value of the ProviderCreditReversalSummaryList and returns this instance
507
+ *
508
+ * @param ProviderCreditReversalSummaryList $value ProviderCreditReversalSummaryList
509
+ * @return OffAmazonPaymentsService_Model_RefundDetails instance
510
+ */
511
+ public function withProviderCreditReversalSummaryList($value)
512
+ {
513
+ $this->setProviderCreditReversalSummaryList($value);
514
+ return $this;
515
+ }
516
+
517
+
518
+ /**
519
+ * Checks if ProviderCreditReversalSummaryList is set
520
+ *
521
+ * @return bool true if ProviderCreditReversalSummaryList property is set
522
+ */
523
+ public function isSetProviderCreditReversalSummaryList()
524
+ {
525
+ return !is_null($this->fields['ProviderCreditReversalSummaryList']['FieldValue']);
526
+
527
+ }
528
  }
529
  ?>
lib/OffAmazonPaymentsNotifications/Model/SolutionProviderMerchantNotification.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ require_once 'OffAmazonPaymentsNotifications/Model/NotificationImpl.php';
19
+ require_once 'OffAmazonPaymentsNotifications/NotificationMetadata.php';
20
+
21
+ /**
22
+ * OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification
23
+ *
24
+ * Properties:
25
+ * <ul>
26
+ *
27
+ * <li>MerchantRegistrationDetails: OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails</li>
28
+ *
29
+ * </ul>
30
+ */
31
+ class OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification
32
+ extends OffAmazonPaymentsNotifications_NotificationImpl
33
+ {
34
+ /**
35
+ * Construct new OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification
36
+ *
37
+ * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request
38
+ * @param mixed $data DOMElement or Associative Array
39
+ * to construct from.
40
+ *
41
+ * Valid properties:
42
+ * <ul>
43
+ *
44
+ * <li>MerchantRegistrationDetails: OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails</li>
45
+ *
46
+ * </ul>
47
+ */
48
+ public function __construct(
49
+ OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata,
50
+ $data = null
51
+ ) {
52
+ $this->fields = array (
53
+ 'MerchantRegistrationDetails' => array(
54
+ 'FieldValue' => null,
55
+ 'FieldType' =>
56
+ 'OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails'
57
+ )
58
+ );
59
+ parent::__construct(
60
+ $notificationMetadata,
61
+ "SolutionProviderMerchantNotification",
62
+ $data
63
+ );
64
+ }
65
+
66
+ /**
67
+ * Construct OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification
68
+ * from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ *
72
+ * @return OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification
73
+ */
74
+ public static function fromXML($xml)
75
+ {
76
+ $dom = new DOMDocument();
77
+ $dom->loadXML($xml);
78
+ $xpath = new DOMXPath($dom);
79
+ $xpath->registerNamespace('a', self::getNamespace());
80
+ $response = $xpath->query('//a:SolutionProviderMerchantNotification');
81
+ if ($response->length == 1) {
82
+ return
83
+ new OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification(
84
+ $response->item(0)
85
+ );
86
+ } else {
87
+ throw new Exception(
88
+ "Unable to construct " .
89
+ "OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification" .
90
+ "from provided XML. Make sure that SolutionProviderMerchantNotification" .
91
+ "is a root element"
92
+ );
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Gets the value of the SolutionProviderMerchantNotification.
98
+ *
99
+ * @return OrderReference property value
100
+ */
101
+ public function getMerchantRegistrationDetails()
102
+ {
103
+ return $this->fields['MerchantRegistrationDetails']['FieldValue'];
104
+ }
105
+
106
+ /**
107
+ * Sets the value of the MerchantRegistrationDetails.
108
+ *
109
+ * @param OrderReference $value new value
110
+ *
111
+ * @return void
112
+ */
113
+ public function setMerchantRegistrationDetails($value)
114
+ {
115
+ $this->fields['MerchantRegistrationDetails']['FieldValue'] = $value;
116
+ return;
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the MerchantRegistrationDetails
121
+ * and returns this instance
122
+ *
123
+ * @param MerchantRegistrationDetails $value MerchantRegistrationDetails
124
+ *
125
+ * @return OffAmazonPaymentsServices_Model_MerchantRegistrationDetails instance
126
+ */
127
+ public function withMerchantRegistrationDetails($value)
128
+ {
129
+ $this->setMerchantRegistrationDetails($value);
130
+ return $this;
131
+ }
132
+
133
+ /**
134
+ * Checks if MerchantRegistrationDetails is set
135
+ *
136
+ * @return bool true if MerchantRegistrationDetails property is set
137
+ */
138
+ public function isSetMerchantRegistrationDetails()
139
+ {
140
+ return !is_null($this->fields['MerchantRegistrationDetails']['FieldValue']);
141
+ }
142
+
143
+ /**
144
+ * XML Representation for this object
145
+ *
146
+ * @return string XML for this object
147
+ */
148
+ public function toXML()
149
+ {
150
+ $xml = "";
151
+ $xml .= "<SolutionProviderMerchantNotification xmlns=\"";
152
+ $xml .= self::getNamespace();
153
+ $xml .= "\">";
154
+ $xml .= $this->_toXMLFragment();
155
+ $xml .= "</SolutionProviderMerchantNotification>";
156
+ return $xml;
157
+ }
158
+ }
159
+ ?>
lib/OffAmazonPaymentsNotifications/Model/SolutionProviderOption.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_SolutionProviderOption
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>name: string</li>
33
+ * <li>value: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsNotifications_Model_SolutionProviderOption extends OffAmazonPayments_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsNotifications_Model_SolutionProviderOption
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>name: string</li>
49
+ * <li>value: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->fields = array (
56
+ 'name' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'value' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the name property.
64
+ *
65
+ * @return string name
66
+ */
67
+ public function getname()
68
+ {
69
+ return $this->fields['name']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the name property.
74
+ *
75
+ * @param string name
76
+ * @return this instance
77
+ */
78
+ public function setname($value)
79
+ {
80
+ $this->fields['name']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the name and returns this instance
86
+ *
87
+ * @param string $value name
88
+ * @return OffAmazonPaymentsNotifications_Model_SolutionProviderOption instance
89
+ */
90
+ public function withname($value)
91
+ {
92
+ $this->setname($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if name is set
99
+ *
100
+ * @return bool true if name is set
101
+ */
102
+ public function isSetname()
103
+ {
104
+ return !is_null($this->fields['name']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the value property.
109
+ *
110
+ * @return string value
111
+ */
112
+ public function getvalue()
113
+ {
114
+ return $this->fields['value']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the value property.
119
+ *
120
+ * @param string value
121
+ * @return this instance
122
+ */
123
+ public function setvalue($value)
124
+ {
125
+ $this->fields['value']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the value and returns this instance
131
+ *
132
+ * @param string $value value
133
+ * @return OffAmazonPaymentsNotifications_Model_SolutionProviderOption instance
134
+ */
135
+ public function withvalue($value)
136
+ {
137
+ $this->setvalue($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if value is set
144
+ *
145
+ * @return bool true if value is set
146
+ */
147
+ public function isSetvalue()
148
+ {
149
+ return !is_null($this->fields['value']['FieldValue']);
150
+ }
151
+
152
+ }
lib/OffAmazonPaymentsNotifications/Model/SolutionProviderOptions.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsNotifications_Model
21
+ */
22
+ require_once 'OffAmazonPayments/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsNotifications_Model_SolutionProviderOption
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>SolutionProviderOption: OffAmazonPaymentsNotifications_Model_SolutionProviderOption</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsNotifications_Model_SolutionProviderOptions extends OffAmazonPayments_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsNotifications_Model_SolutionProviderOption
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>SolutionProviderOption: OffAmazonPaymentsNotifications_Model_SolutionProviderOption</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->fields = array (
54
+ 'SolutionProviderOption' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsNotifications_Model_SolutionProviderOption')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the SolutionProviderOption.
61
+ *
62
+ * @return array of SolutionProviderOption
63
+ */
64
+ public function getSolutionProviderOption()
65
+ {
66
+ return $this->fields['SolutionProviderOption']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the SolutionProviderOption.
71
+ *
72
+ * @param mixed SolutionProviderOption or an array of SolutionProviderOption SolutionProviderOption
73
+ * @return this instance
74
+ */
75
+ public function setSolutionProviderOption($solutionProviderOptionList)
76
+ {
77
+ if (!$this->_isNumericArray($solutionProviderOptionList)) {
78
+ $solutionProviderOptionList = array ($solutionProviderOptionList);
79
+ }
80
+ $this->fields['SolutionProviderOption']['FieldValue'] = $solutionProviderOptionList;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of SolutionProviderOption list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withSolutionProviderOption($SolutionProviderOption1, $SolutionProviderOption2)</code>
89
+ *
90
+ * @param SolutionProviderOption $providerCreditSummaryArgs one or more SolutionProviderOption
91
+ * @return OffAmazonPaymentsNotifications_Model_SolutionProviderOption instance
92
+ */
93
+ public function withSolutionProviderOption($solutionProviderOptionList)
94
+ {
95
+ foreach (func_get_args() as $solutionProviderOptionList) {
96
+ $this->fields['SolutionProviderOption']['FieldValue'][] = $solutionProviderOptionList;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if SolutionProviderOption list is non-empty
105
+ *
106
+ * @return bool true if SolutionProviderOption list is non-empty
107
+ */
108
+ public function isSetSolutionProviderOption()
109
+ {
110
+ return count ($this->fields['SolutionProviderOption']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsService/Client.php CHANGED
@@ -59,6 +59,12 @@ require_once 'OffAmazonPaymentsService/Model/SetBillingAgreementDetailsRequest.p
59
  require_once 'OffAmazonPaymentsService/Model/SetBillingAgreementDetailsResponse.php';
60
  require_once 'OffAmazonPaymentsService/Model/ValidateBillingAgreementRequest.php';
61
  require_once 'OffAmazonPaymentsService/Model/ValidateBillingAgreementResponse.php';
 
 
 
 
 
 
62
 
63
  /**
64
  * Implementation of the OffAmazonPaymentsService interface
@@ -72,7 +78,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
72
 
73
  const SERVICE_VERSION = '2013-01-01';
74
  const MWS_CLIENT_VERSION = '2013-01-01';
75
- const APPLICATION_LIBRARY_VERSION = '1.0.6';
76
 
77
  private $_merchantValues = null;
78
 
@@ -285,7 +291,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
285
 
286
  /**
287
  * Capture
288
-
289
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CaptureRequest request
290
  * or OffAmazonPaymentsService_Model_CaptureRequest object itself
291
  * @see OffAmazonPaymentsService_Model_Capture
@@ -308,7 +314,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
308
 
309
  /**
310
  * Refund
311
-
312
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request
313
  * or OffAmazonPaymentsService_Model_RefundRequest object itself
314
  * @see OffAmazonPaymentsService_Model_Refund
@@ -332,7 +338,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
332
 
333
  /**
334
  * Close Authorization
335
-
336
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request
337
  * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself
338
  * @see OffAmazonPaymentsService_Model_CloseAuthorization
@@ -355,7 +361,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
355
 
356
  /**
357
  * Get Refund Details
358
-
359
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request
360
  * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself
361
  * @see OffAmazonPaymentsService_Model_GetRefundDetails
@@ -378,7 +384,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
378
 
379
  /**
380
  * Get Capture Details
381
-
382
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request
383
  * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself
384
  * @see OffAmazonPaymentsService_Model_GetCaptureDetails
@@ -401,7 +407,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
401
 
402
  /**
403
  * Close Order Reference
404
-
405
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request
406
  * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself
407
  * @see OffAmazonPaymentsService_Model_CloseOrderReference
@@ -424,7 +430,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
424
 
425
  /**
426
  * Confirm Order Reference
427
-
428
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request
429
  * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself
430
  * @see OffAmazonPaymentsService_Model_ConfirmOrderReference
@@ -447,7 +453,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
447
 
448
  /**
449
  * Get Order Reference Details
450
-
451
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request
452
  * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself
453
  * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetails
@@ -470,7 +476,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
470
 
471
  /**
472
  * Authorize
473
-
474
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request
475
  * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself
476
  * @see OffAmazonPaymentsService_Model_Authorize
@@ -493,7 +499,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
493
 
494
  /**
495
  * Set Order Reference Details
496
-
497
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request
498
  * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself
499
  * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetails
@@ -516,7 +522,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
516
 
517
  /**
518
  * Get Authorization Details
519
-
520
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest request
521
  * or OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest object itself
522
  * @see OffAmazonPaymentsService_Model_GetAuthorizationDetails
@@ -539,7 +545,7 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
539
 
540
  /**
541
  * Cancel Order Reference
542
-
543
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CancelOrderReferenceRequest request
544
  * or OffAmazonPaymentsService_Model_CancelOrderReferenceRequest object itself
545
  * @see OffAmazonPaymentsService_Model_CancelOrderReference
@@ -719,6 +725,75 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
719
  return $response;
720
  }
721
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
722
 
723
  // Private API ------------------------------------------------------------//
724
 
@@ -895,21 +970,21 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
895
 
896
  $response = '';
897
  if (!$response = curl_exec($ch)) {
898
- $error_msg = "Unable to post request, underlying exception of " . curl_error($ch);
899
- curl_close($ch);
900
- Mage::dispatchEvent('amazonpayments_advanced_api_post_call', array(
901
- 'call_data' => array(
902
- 'call_url' => $scheme . $url['host'] . $uri,
903
- 'call_action' => $parameters['Action'],
904
- 'query' => $query,
905
- 'response_code' => null,
906
- 'response_error' => $error_msg,
907
- 'response_headers' => null,
908
- 'response_body' => null
909
- )
910
- ));
911
- require_once 'OffAmazonPaymentsService/Exception.php';
912
- throw new OffAmazonPaymentsService_Exception(array('Message' => $error_msg));
913
  }
914
 
915
  curl_close($ch);
@@ -1143,7 +1218,25 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
1143
  if ($request->isSetSoftDescriptor()) {
1144
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1145
  }
1146
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1147
  return $parameters;
1148
  }
1149
 
@@ -1179,6 +1272,24 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
1179
  if ($request->isSetSoftDescriptor()) {
1180
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1181
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1182
 
1183
  return $parameters;
1184
  }
@@ -1344,6 +1455,23 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
1344
  if ($request->isSetSoftDescriptor()) {
1345
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1346
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1347
 
1348
  return $parameters;
1349
  }
@@ -1692,7 +1820,72 @@ class OffAmazonPaymentsService_Client implements OffAmazonPaymentsService_Interf
1692
 
1693
  return $parameters;
1694
  }
1695
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1696
 
1697
  }
1698
  ?>
59
  require_once 'OffAmazonPaymentsService/Model/SetBillingAgreementDetailsResponse.php';
60
  require_once 'OffAmazonPaymentsService/Model/ValidateBillingAgreementRequest.php';
61
  require_once 'OffAmazonPaymentsService/Model/ValidateBillingAgreementResponse.php';
62
+ require_once 'OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsRequest.php';
63
+ require_once 'OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsResponse.php';
64
+ require_once 'OffAmazonPaymentsService/Model/GetProviderCreditDetailsRequest.php';
65
+ require_once 'OffAmazonPaymentsService/Model/GetProviderCreditDetailsResponse.php';
66
+ require_once 'OffAmazonPaymentsService/Model/ReverseProviderCreditRequest.php';
67
+ require_once 'OffAmazonPaymentsService/Model/ReverseProviderCreditResponse.php';
68
 
69
  /**
70
  * Implementation of the OffAmazonPaymentsService interface
78
 
79
  const SERVICE_VERSION = '2013-01-01';
80
  const MWS_CLIENT_VERSION = '2013-01-01';
81
+ const APPLICATION_LIBRARY_VERSION = '1.0.11';
82
 
83
  private $_merchantValues = null;
84
 
291
 
292
  /**
293
  * Capture
294
+ *
295
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CaptureRequest request
296
  * or OffAmazonPaymentsService_Model_CaptureRequest object itself
297
  * @see OffAmazonPaymentsService_Model_Capture
314
 
315
  /**
316
  * Refund
317
+ *
318
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request
319
  * or OffAmazonPaymentsService_Model_RefundRequest object itself
320
  * @see OffAmazonPaymentsService_Model_Refund
338
 
339
  /**
340
  * Close Authorization
341
+ *
342
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request
343
  * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself
344
  * @see OffAmazonPaymentsService_Model_CloseAuthorization
361
 
362
  /**
363
  * Get Refund Details
364
+ *
365
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request
366
  * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself
367
  * @see OffAmazonPaymentsService_Model_GetRefundDetails
384
 
385
  /**
386
  * Get Capture Details
387
+ *
388
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request
389
  * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself
390
  * @see OffAmazonPaymentsService_Model_GetCaptureDetails
407
 
408
  /**
409
  * Close Order Reference
410
+ *
411
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request
412
  * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself
413
  * @see OffAmazonPaymentsService_Model_CloseOrderReference
430
 
431
  /**
432
  * Confirm Order Reference
433
+ *
434
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request
435
  * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself
436
  * @see OffAmazonPaymentsService_Model_ConfirmOrderReference
453
 
454
  /**
455
  * Get Order Reference Details
456
+ *
457
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request
458
  * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself
459
  * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetails
476
 
477
  /**
478
  * Authorize
479
+ *
480
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request
481
  * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself
482
  * @see OffAmazonPaymentsService_Model_Authorize
499
 
500
  /**
501
  * Set Order Reference Details
502
+ *
503
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request
504
  * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself
505
  * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetails
522
 
523
  /**
524
  * Get Authorization Details
525
+ *
526
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest request
527
  * or OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest object itself
528
  * @see OffAmazonPaymentsService_Model_GetAuthorizationDetails
545
 
546
  /**
547
  * Cancel Order Reference
548
+ *
549
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CancelOrderReferenceRequest request
550
  * or OffAmazonPaymentsService_Model_CancelOrderReferenceRequest object itself
551
  * @see OffAmazonPaymentsService_Model_CancelOrderReference
725
  return $response;
726
  }
727
 
728
+ /**
729
+ * Get Provider Credit Details
730
+ * A query API for ProviderCredits. Both Provider and Seller sellerIds are authorized to call this API.
731
+ *
732
+ * @see http://docs.amazonwebservices.com/${docPath}GetProviderCreditDetails.html
733
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest request
734
+ * or OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest object itself
735
+ * @see OffAmazonPaymentsService_Model_GetProviderCreditDetails
736
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse
737
+ *
738
+ * @throws OffAmazonPaymentsService_Exception
739
+ */
740
+ public function getProviderCreditDetails($request)
741
+ {
742
+ if (!$request instanceof OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest) {
743
+ $request = new OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest($request);
744
+ }
745
+ $httpResponse = $this->_invoke($this->_convertGetProviderCreditDetails($request));
746
+ $response = OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse::fromXML($httpResponse['ResponseBody']);
747
+ $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
748
+ return $response;
749
+ }
750
+
751
+ /**
752
+ * Get Provider Credit Reversal Details
753
+ * Activity to query the funds reversed against a given Provider Credit reversal.
754
+ *
755
+ * @see http://docs.amazonwebservices.com/${docPath}GetProviderCreditReversalDetails.html
756
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest request
757
+ * or OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest object itself
758
+ * @see OffAmazonPaymentsService_Model_GetProviderCreditReversalDetails
759
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse
760
+ *
761
+ * @throws OffAmazonPaymentsService_Exception
762
+ */
763
+ public function getProviderCreditReversalDetails($request)
764
+ {
765
+ if (!$request instanceof OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest) {
766
+ $request = new OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest($request);
767
+ }
768
+ $httpResponse = $this->_invoke($this->_convertGetProviderCreditReversalDetails($request));
769
+ $response = OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse::fromXML($httpResponse['ResponseBody']);
770
+ $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
771
+ return $response;
772
+ }
773
+
774
+ /**
775
+ * Reverse Provider Credit
776
+ * Activity to enable the Caller/Provider to reverse the funds credited to Provider.
777
+ *
778
+ * @see http://docs.amazonwebservices.com/${docPath}ReverseProviderCredit.html
779
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ReverseProviderCreditRequest request
780
+ * or OffAmazonPaymentsService_Model_ReverseProviderCreditRequest object itself
781
+ * @see OffAmazonPaymentsService_Model_ReverseProviderCredit
782
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResponse OffAmazonPaymentsService_Model_ReverseProviderCreditResponse
783
+ *
784
+ * @throws OffAmazonPaymentsService_Exception
785
+ */
786
+ public function reverseProviderCredit($request)
787
+ {
788
+ if (!$request instanceof OffAmazonPaymentsService_Model_ReverseProviderCreditRequest) {
789
+ $request = new OffAmazonPaymentsService_Model_ReverseProviderCreditRequest($request);
790
+ }
791
+ $httpResponse = $this->_invoke($this->_convertReverseProviderCredit($request));
792
+ $response = OffAmazonPaymentsService_Model_ReverseProviderCreditResponse::fromXML($httpResponse['ResponseBody']);
793
+ $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
794
+ return $response;
795
+ }
796
+
797
 
798
  // Private API ------------------------------------------------------------//
799
 
970
 
971
  $response = '';
972
  if (!$response = curl_exec($ch)) {
973
+ $error_msg = "Unable to post request, underlying exception of " . curl_error($ch);
974
+ curl_close($ch);
975
+ Mage::dispatchEvent('amazonpayments_advanced_api_post_call', array(
976
+ 'call_data' => array(
977
+ 'call_url' => $scheme . $url['host'] . $uri,
978
+ 'call_action' => $parameters['Action'],
979
+ 'query' => $query,
980
+ 'response_code' => null,
981
+ 'response_error' => $error_msg,
982
+ 'response_headers' => null,
983
+ 'response_body' => null
984
+ )
985
+ ));
986
+ require_once 'OffAmazonPaymentsService/Exception.php';
987
+ throw new OffAmazonPaymentsService_Exception(array('Message' => $error_msg));
988
  }
989
 
990
  curl_close($ch);
1218
  if ($request->isSetSoftDescriptor()) {
1219
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1220
  }
1221
+ if ($request->isSetProviderCreditList()) {
1222
+ $providerCreditListcaptureRequest = $request->getProviderCreditList();
1223
+ foreach ($providerCreditListcaptureRequest->getmember() as $memberproviderCreditListIndex => $memberproviderCreditList) {
1224
+ if ($memberproviderCreditList->isSetProviderId()) {
1225
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'ProviderId'] = $memberproviderCreditList->getProviderId();
1226
+ }
1227
+ if ($memberproviderCreditList->isSetCreditAmount()) {
1228
+ $creditAmountmember = $memberproviderCreditList->getCreditAmount();
1229
+ if ($creditAmountmember->isSetAmount()) {
1230
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'CreditAmount' . '.' . 'Amount'] = $creditAmountmember->getAmount();
1231
+ }
1232
+ if ($creditAmountmember->isSetCurrencyCode()) {
1233
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'CreditAmount' . '.' . 'CurrencyCode'] = $creditAmountmember->getCurrencyCode();
1234
+ }
1235
+ }
1236
+
1237
+ }
1238
+ }
1239
+
1240
  return $parameters;
1241
  }
1242
 
1272
  if ($request->isSetSoftDescriptor()) {
1273
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1274
  }
1275
+ if ($request->isSetProviderCreditReversalList()) {
1276
+ $providerCreditReversalListrefundRequest = $request->getProviderCreditReversalList();
1277
+ foreach ($providerCreditReversalListrefundRequest->getmember() as $memberproviderCreditReversalListIndex => $memberproviderCreditReversalList) {
1278
+ if ($memberproviderCreditReversalList->isSetProviderId()) {
1279
+ $parameters['ProviderCreditReversalList' . '.' . 'member' . '.' . ($memberproviderCreditReversalListIndex + 1) . '.' . 'ProviderId'] = $memberproviderCreditReversalList->getProviderId();
1280
+ }
1281
+ if ($memberproviderCreditReversalList->isSetCreditReversalAmount()) {
1282
+ $creditReversalAmountmember = $memberproviderCreditReversalList->getCreditReversalAmount();
1283
+ if ($creditReversalAmountmember->isSetAmount()) {
1284
+ $parameters['ProviderCreditReversalList' . '.' . 'member' . '.' . ($memberproviderCreditReversalListIndex + 1) . '.' . 'CreditReversalAmount' . '.' . 'Amount'] = $creditReversalAmountmember->getAmount();
1285
+ }
1286
+ if ($creditReversalAmountmember->isSetCurrencyCode()) {
1287
+ $parameters['ProviderCreditReversalList' . '.' . 'member' . '.' . ($memberproviderCreditReversalListIndex + 1) . '.' . 'CreditReversalAmount' . '.' . 'CurrencyCode'] = $creditReversalAmountmember->getCurrencyCode();
1288
+ }
1289
+ }
1290
+
1291
+ }
1292
+ }
1293
 
1294
  return $parameters;
1295
  }
1455
  if ($request->isSetSoftDescriptor()) {
1456
  $parameters['SoftDescriptor'] = $request->getSoftDescriptor();
1457
  }
1458
+ if ($request->isSetProviderCreditList()) {
1459
+ $providerCreditListauthorizeRequest = $request->getProviderCreditList();
1460
+ foreach ($providerCreditListauthorizeRequest->getProviderCredit() as $memberproviderCreditListIndex => $memberproviderCreditList) {
1461
+ if ($memberproviderCreditList->isSetProviderId()) {
1462
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'ProviderId'] = $memberproviderCreditList->getProviderId();
1463
+ }
1464
+ if ($memberproviderCreditList->isSetCreditAmount()) {
1465
+ $creditAmountmember = $memberproviderCreditList->getCreditAmount();
1466
+ if ($creditAmountmember->isSetAmount()) {
1467
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'CreditAmount' . '.' . 'Amount'] = $creditAmountmember->getAmount();
1468
+ }
1469
+ if ($creditAmountmember->isSetCurrencyCode()) {
1470
+ $parameters['ProviderCreditList' . '.' . 'member' . '.' . ($memberproviderCreditListIndex + 1) . '.' . 'CreditAmount' . '.' . 'CurrencyCode'] = $creditAmountmember->getCurrencyCode();
1471
+ }
1472
+ }
1473
+ }
1474
+ }
1475
 
1476
  return $parameters;
1477
  }
1820
 
1821
  return $parameters;
1822
  }
1823
+
1824
+ /**
1825
+ * Convert GetProviderCreditDetailsRequest to name value pairs
1826
+ */
1827
+ private function _convertGetProviderCreditDetails($request) {
1828
+
1829
+ $parameters = array();
1830
+ $parameters['Action'] = 'GetProviderCreditDetails';
1831
+ if ($request->isSetSellerId()) {
1832
+ $parameters['SellerId'] = $request->getSellerId();
1833
+ }
1834
+ if ($request->isSetAmazonProviderCreditId()) {
1835
+ $parameters['AmazonProviderCreditId'] = $request->getAmazonProviderCreditId();
1836
+ }
1837
+
1838
+ return $parameters;
1839
+ }
1840
+
1841
+ /**
1842
+ * Convert GetProviderCreditReversalDetailsRequest to name value pairs
1843
+ */
1844
+ private function _convertGetProviderCreditReversalDetails($request) {
1845
+
1846
+ $parameters = array();
1847
+ $parameters['Action'] = 'GetProviderCreditReversalDetails';
1848
+ if ($request->isSetSellerId()) {
1849
+ $parameters['SellerId'] = $request->getSellerId();
1850
+ }
1851
+ if ($request->isSetAmazonProviderCreditReversalId()) {
1852
+ $parameters['AmazonProviderCreditReversalId'] = $request->getAmazonProviderCreditReversalId();
1853
+ }
1854
+
1855
+ return $parameters;
1856
+ }
1857
+
1858
+ /**
1859
+ * Convert ReverseProviderCreditRequest to name value pairs
1860
+ */
1861
+ private function _convertReverseProviderCredit($request) {
1862
+
1863
+ $parameters = array();
1864
+ $parameters['Action'] = 'ReverseProviderCredit';
1865
+ if ($request->isSetSellerId()) {
1866
+ $parameters['SellerId'] = $request->getSellerId();
1867
+ }
1868
+ if ($request->isSetAmazonProviderCreditId()) {
1869
+ $parameters['AmazonProviderCreditId'] = $request->getAmazonProviderCreditId();
1870
+ }
1871
+ if ($request->isSetCreditReversalReferenceId()) {
1872
+ $parameters['CreditReversalReferenceId'] = $request->getCreditReversalReferenceId();
1873
+ }
1874
+ if ($request->isSetCreditReversalAmount()) {
1875
+ $creditReversalAmountreverseProviderCreditRequest = $request->getCreditReversalAmount();
1876
+ if ($creditReversalAmountreverseProviderCreditRequest->isSetAmount()) {
1877
+ $parameters['CreditReversalAmount' . '.' . 'Amount'] = $creditReversalAmountreverseProviderCreditRequest->getAmount();
1878
+ }
1879
+ if ($creditReversalAmountreverseProviderCreditRequest->isSetCurrencyCode()) {
1880
+ $parameters['CreditReversalAmount' . '.' . 'CurrencyCode'] = $creditReversalAmountreverseProviderCreditRequest->getCurrencyCode();
1881
+ }
1882
+ }
1883
+ if ($request->isSetCreditReversalNote()) {
1884
+ $parameters['CreditReversalNote'] = $request->getCreditReversalNote();
1885
+ }
1886
+
1887
+ return $parameters;
1888
+ }
1889
 
1890
  }
1891
  ?>
lib/OffAmazonPaymentsService/Interface.php CHANGED
@@ -291,6 +291,48 @@ interface OffAmazonPaymentsService_Interface
291
  * @throws OffAmazonPaymentsService_Exception
292
  */
293
  public function closeBillingAgreement($request);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
 
295
  }
296
- ?>
291
  * @throws OffAmazonPaymentsService_Exception
292
  */
293
  public function closeBillingAgreement($request);
294
+
295
+ /**
296
+ * Get Provider Credit Details
297
+ * A query API for ProviderCredits. Both Provider and Seller sellerIds are authorized to call this API.
298
+ *
299
+ * @see http://docs.amazonwebservices.com/${docPath}GetProviderCreditDetails.html
300
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest request
301
+ * or OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest object itself
302
+ * @see OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest
303
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse
304
+ *
305
+ * @throws OffAmazonPaymentsService_Exception
306
+ */
307
+ public function getProviderCreditDetails($request);
308
+
309
+ /**
310
+ * Get Provider Credit Reversal Details
311
+ * Activity to query the funds reversed against a given Provider Credit reversal.
312
+ *
313
+ * @see http://docs.amazonwebservices.com/${docPath}GetProviderCreditReversalDetails.html
314
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest request
315
+ * or OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest object itself
316
+ * @see OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest
317
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse
318
+ *
319
+ * @throws OffAmazonPaymentsService_Exception
320
+ */
321
+ public function getProviderCreditReversalDetails($request);
322
+
323
+ /**
324
+ * Reverse Provider Credit
325
+ * Activity to enable the Caller/Provider to reverse the funds credited to Provider.
326
+ *
327
+ * @see http://docs.amazonwebservices.com/${docPath}ReverseProviderCredit.html
328
+ * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ReverseProviderCreditRequest request
329
+ * or OffAmazonPaymentsService_Model_ReverseProviderCreditRequest object itself
330
+ * @see OffAmazonPaymentsService_Model_ReverseProviderCreditRequest
331
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResponse OffAmazonPaymentsService_Model_ReverseProviderCreditResponse
332
+ *
333
+ * @throws OffAmazonPaymentsService_Exception
334
+ */
335
+ public function reverseProviderCredit($request);
336
 
337
  }
338
+ ?>
lib/OffAmazonPaymentsService/Model/AuthorizationDetails.php CHANGED
@@ -43,6 +43,7 @@ require_once 'OffAmazonPaymentsService/Model.php';
43
  * <li>OrderItemCategories: OffAmazonPaymentsService_Model_OrderItemCategories</li>
44
  * <li>CaptureNow: bool</li>
45
  * <li>SoftDescriptor: string</li>
 
46
  *
47
  * </ul>
48
  */
@@ -71,7 +72,8 @@ class OffAmazonPaymentsService_Model_AuthorizationDetails extends OffAmazonPayme
71
  * <li>OrderItemCategories: OffAmazonPaymentsService_Model_OrderItemCategories</li>
72
  * <li>CaptureNow: bool</li>
73
  * <li>SoftDescriptor: string</li>
74
- *
 
75
  * </ul>
76
  */
77
  public function __construct($data = null)
@@ -103,6 +105,7 @@ class OffAmazonPaymentsService_Model_AuthorizationDetails extends OffAmazonPayme
103
 
104
  'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'),
105
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
106
  );
107
  parent::__construct($data);
108
  }
@@ -742,5 +745,51 @@ class OffAmazonPaymentsService_Model_AuthorizationDetails extends OffAmazonPayme
742
  {
743
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
744
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
745
  }
746
  ?>
43
  * <li>OrderItemCategories: OffAmazonPaymentsService_Model_OrderItemCategories</li>
44
  * <li>CaptureNow: bool</li>
45
  * <li>SoftDescriptor: string</li>
46
+ * <li>AddressVerificationCode: string</li>
47
  *
48
  * </ul>
49
  */
72
  * <li>OrderItemCategories: OffAmazonPaymentsService_Model_OrderItemCategories</li>
73
  * <li>CaptureNow: bool</li>
74
  * <li>SoftDescriptor: string</li>
75
+ * <li>AddressVerificationCode: string</li>
76
+ *
77
  * </ul>
78
  */
79
  public function __construct($data = null)
105
 
106
  'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'),
107
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
108
+ 'AddressVerificationCode' => array('FieldValue' => null, 'FieldType' => 'string'),
109
  );
110
  parent::__construct($data);
111
  }
745
  {
746
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
747
  }
748
+
749
+ /**
750
+ * Gets the value of the AddrerificationCode property.
751
+ *
752
+ * @param string AddressVerificationCode
753
+ * @return this instance
754
+ */
755
+ public function getAddressVerificationCode()
756
+ {
757
+ return $this->_fields['AddressVerificationCode']['FieldValue'];
758
+ }
759
+
760
+ /**
761
+ * Sets the value of the AddressVerificationCode property.
762
+ *
763
+ * @param string AddressVerificationCode
764
+ * @return this instance
765
+ */
766
+ public function setAddressVerificationCode($value)
767
+ {
768
+ $this->_fields['AddressVerificationCode']['FieldValue'] = $value;
769
+ return $this;
770
+ }
771
+
772
+ /**
773
+ * Sets the value of the AddressVerificationCode and return this instance
774
+ *
775
+ * @param string $value AddressVerificationCode
776
+ * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance
777
+ */
778
+ public function withAddressVerificationCode($value)
779
+ {
780
+ $this->setAddressVerificationCode($value);
781
+ return $this;
782
+ }
783
+
784
+ /**
785
+ * Checks if AddressVerificationCode is set
786
+ *
787
+ * @return bool true if AddressVerificationCode is set
788
+ */
789
+ public function isSetAddressVerificationCode()
790
+ {
791
+ return !is_null($this->_fields['AddressVerificationCode']['FieldValue']);
792
+ }
793
+
794
  }
795
  ?>
lib/OffAmazonPaymentsService/Model/AuthorizeRequest.php CHANGED
@@ -80,6 +80,7 @@ class OffAmazonPaymentsService_Model_AuthorizeRequest extends OffAmazonPaymentsS
80
  'TransactionTimeout' => array('FieldValue' => null, 'FieldType' => 'int'),
81
  'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'),
82
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
83
  );
84
  parent::__construct($data);
85
  }
@@ -490,5 +491,51 @@ class OffAmazonPaymentsService_Model_AuthorizeRequest extends OffAmazonPaymentsS
490
  {
491
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
492
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
493
  }
494
  ?>
80
  'TransactionTimeout' => array('FieldValue' => null, 'FieldType' => 'int'),
81
  'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'),
82
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
83
+ 'ProviderCreditList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditList'),
84
  );
85
  parent::__construct($data);
86
  }
491
  {
492
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
493
  }
494
+
495
+ /**
496
+ * Gets the value of the ProviderCreditList.
497
+ *
498
+ * @return ProviderCreditList ProviderCreditList
499
+ */
500
+ public function getProviderCreditList()
501
+ {
502
+ return $this->_fields['ProviderCreditList']['FieldValue'];
503
+ }
504
+
505
+ /**
506
+ * Sets the value of the ProviderCreditList.
507
+ *
508
+ * @param ProviderCreditList ProviderCreditList
509
+ * @return void
510
+ */
511
+ public function setProviderCreditList($value)
512
+ {
513
+ $this->_fields['ProviderCreditList']['FieldValue'] = $value;
514
+ return;
515
+ }
516
+
517
+ /**
518
+ * Sets the value of the ProviderCreditList and returns this instance
519
+ *
520
+ * @param ProviderCreditList $value ProviderCreditList
521
+ * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance
522
+ */
523
+ public function withProviderCreditList($value)
524
+ {
525
+ $this->setProviderCreditList($value);
526
+ return $this;
527
+ }
528
+
529
+
530
+ /**
531
+ * Checks if ProviderCreditList is set
532
+ *
533
+ * @return bool true if ProviderCreditList property is set
534
+ */
535
+ public function isSetProviderCreditList()
536
+ {
537
+ return !is_null($this->_fields['ProviderCreditList']['FieldValue']);
538
+
539
+ }
540
  }
541
  ?>
lib/OffAmazonPaymentsService/Model/BillingAddress.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_BillingAddress
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>AddressType: string</li>
33
+ * <li>PhysicalAddress: OffAmazonPaymentsService_Model_Address</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_BillingAddress extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_BillingAddress
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>AddressType: string</li>
49
+ * <li>PhysicalAddress: OffAmazonPaymentsService_Model_Address</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'AddressType' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+
58
+ 'PhysicalAddress' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Address'),
59
+
60
+ );
61
+ parent::__construct($data);
62
+ }
63
+
64
+ /**
65
+ * Gets the value of the AddressType property.
66
+ *
67
+ * @return string AddressType
68
+ */
69
+ public function getAddressType()
70
+ {
71
+ return $this->_fields['AddressType']['FieldValue'];
72
+ }
73
+
74
+ /**
75
+ * Sets the value of the AddressType property.
76
+ *
77
+ * @param string AddressType
78
+ * @return this instance
79
+ */
80
+ public function setAddressType($value)
81
+ {
82
+ $this->_fields['AddressType']['FieldValue'] = $value;
83
+ return $this;
84
+ }
85
+
86
+ /**
87
+ * Sets the value of the AddressType and returns this instance
88
+ *
89
+ * @param string $value AddressType
90
+ * @return OffAmazonPaymentsService_Model_BillingAddress instance
91
+ */
92
+ public function withAddressType($value)
93
+ {
94
+ $this->setAddressType($value);
95
+ return $this;
96
+ }
97
+
98
+
99
+ /**
100
+ * Checks if AddressType is set
101
+ *
102
+ * @return bool true if AddressType is set
103
+ */
104
+ public function isSetAddressType()
105
+ {
106
+ return !is_null($this->_fields['AddressType']['FieldValue']);
107
+ }
108
+
109
+ /**
110
+ * Gets the value of the PhysicalAddress.
111
+ *
112
+ * @return Address PhysicalAddress
113
+ */
114
+ public function getPhysicalAddress()
115
+ {
116
+ return $this->_fields['PhysicalAddress']['FieldValue'];
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the PhysicalAddress.
121
+ *
122
+ * @param Address PhysicalAddress
123
+ * @return void
124
+ */
125
+ public function setPhysicalAddress($value)
126
+ {
127
+ $this->_fields['PhysicalAddress']['FieldValue'] = $value;
128
+ return;
129
+ }
130
+
131
+ /**
132
+ * Sets the value of the PhysicalAddress and returns this instance
133
+ *
134
+ * @param Address $value PhysicalAddress
135
+ * @return OffAmazonPaymentsService_Model_BillingAddress instance
136
+ */
137
+ public function withPhysicalAddress($value)
138
+ {
139
+ $this->setPhysicalAddress($value);
140
+ return $this;
141
+ }
142
+
143
+
144
+ /**
145
+ * Checks if PhysicalAddress is set
146
+ *
147
+ * @return bool true if PhysicalAddress property is set
148
+ */
149
+ public function isSetPhysicalAddress()
150
+ {
151
+ return !is_null($this->_fields['PhysicalAddress']['FieldValue']);
152
+
153
+ }
154
+ }
155
+ ?>
lib/OffAmazonPaymentsService/Model/BillingAgreementDetails.php CHANGED
@@ -28,6 +28,7 @@ require_once 'OffAmazonPaymentsService/Model.php';
28
  * <li>SellerNote: string</li>
29
  * <li>PlatformId: string</li>
30
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
 
31
  * <li>ReleaseEnvironment: string</li>
32
  * <li>SellerBillingAgreementAttributes: OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes</li>
33
  * <li>BillingAgreementStatus: OffAmazonPaymentsService_Model_BillingAgreementStatus</li>
@@ -55,6 +56,7 @@ class OffAmazonPaymentsService_Model_BillingAgreementDetails extends OffAmazonPa
55
  * <li>SellerNote: string</li>
56
  * <li>PlatformId: string</li>
57
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
 
58
  * <li>ReleaseEnvironment: string</li>
59
  * <li>SellerBillingAgreementAttributes: OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes</li>
60
  * <li>BillingAgreementStatus: OffAmazonPaymentsService_Model_BillingAgreementStatus</li>
@@ -96,7 +98,12 @@ class OffAmazonPaymentsService_Model_BillingAgreementDetails extends OffAmazonPa
96
  'FieldValue' => null,
97
  'FieldType' => 'OffAmazonPaymentsService_Model_Destination'
98
  ),
99
-
 
 
 
 
 
100
  'ReleaseEnvironment' => array(
101
  'FieldValue' => null,
102
  'FieldType' => 'string'
@@ -397,6 +404,50 @@ class OffAmazonPaymentsService_Model_BillingAgreementDetails extends OffAmazonPa
397
  return ! is_null($this->_fields['Destination']['FieldValue']);
398
  }
399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  /**
401
  * Gets the value of the ReleaseEnvironment property.
402
  *
@@ -705,4 +756,4 @@ class OffAmazonPaymentsService_Model_BillingAgreementDetails extends OffAmazonPa
705
  return ! is_null($this->_fields['BillingAgreementConsent']['FieldValue']);
706
  }
707
  }
708
- ?>
28
  * <li>SellerNote: string</li>
29
  * <li>PlatformId: string</li>
30
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
31
+ * <li>BillingAddress: OffAmazonPaymentsService_Model_BillingAddress</li>
32
  * <li>ReleaseEnvironment: string</li>
33
  * <li>SellerBillingAgreementAttributes: OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes</li>
34
  * <li>BillingAgreementStatus: OffAmazonPaymentsService_Model_BillingAgreementStatus</li>
56
  * <li>SellerNote: string</li>
57
  * <li>PlatformId: string</li>
58
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
59
+ * <li>BillingAddress: OffAmazonPaymentsService_Model_BillingAddress</li>
60
  * <li>ReleaseEnvironment: string</li>
61
  * <li>SellerBillingAgreementAttributes: OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes</li>
62
  * <li>BillingAgreementStatus: OffAmazonPaymentsService_Model_BillingAgreementStatus</li>
98
  'FieldValue' => null,
99
  'FieldType' => 'OffAmazonPaymentsService_Model_Destination'
100
  ),
101
+
102
+ 'BillingAddress' => array(
103
+ 'FieldValue' => null,
104
+ 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAddress'
105
+ ),
106
+
107
  'ReleaseEnvironment' => array(
108
  'FieldValue' => null,
109
  'FieldType' => 'string'
404
  return ! is_null($this->_fields['Destination']['FieldValue']);
405
  }
406
 
407
+ /**
408
+ * Gets the value of the BillingAddress.
409
+ *
410
+ * @return BillingAddress BillingAddress
411
+ */
412
+ public function getBillingAddress ()
413
+ {
414
+ return $this->_fields['BillingAddress']['FieldValue'];
415
+ }
416
+
417
+ /**
418
+ * Sets the value of the BillingAddress.
419
+ *
420
+ * @param BillingAddress BillingAddress
421
+ * @return void
422
+ */
423
+ public function setBillingAddress ($value)
424
+ {
425
+ $this->_fields['BillingAddress']['FieldValue'] = $value;
426
+ return;
427
+ }
428
+
429
+ /**
430
+ * Sets the value of the BillingAddress and returns this instance
431
+ *
432
+ * @param BillingAddress $value BillingAddress
433
+ * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance
434
+ */
435
+ public function withBillingAddress ($value)
436
+ {
437
+ $this->setBillingAddress($value);
438
+ return $this;
439
+ }
440
+
441
+ /**
442
+ * Checks if BillingAddress is set
443
+ *
444
+ * @return bool true if BillingAddress property is set
445
+ */
446
+ public function isSetBillingAddress ()
447
+ {
448
+ return ! is_null($this->_fields['BillingAddress']['FieldValue']);
449
+ }
450
+
451
  /**
452
  * Gets the value of the ReleaseEnvironment property.
453
  *
756
  return ! is_null($this->_fields['BillingAgreementConsent']['FieldValue']);
757
  }
758
  }
759
+ ?>
lib/OffAmazonPaymentsService/Model/CancelOrderReferenceRequest.php CHANGED
@@ -197,4 +197,4 @@ class OffAmazonPaymentsService_Model_CancelOrderReferenceRequest extends OffAmaz
197
  return !is_null($this->_fields['CancelationReason']['FieldValue']);
198
  }
199
  }
200
- ?>
197
  return !is_null($this->_fields['CancelationReason']['FieldValue']);
198
  }
199
  }
200
+ ?>
lib/OffAmazonPaymentsService/Model/CaptureDetails.php CHANGED
@@ -89,6 +89,9 @@ class OffAmazonPaymentsService_Model_CaptureDetails extends OffAmazonPaymentsSer
89
  'CaptureStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
90
 
91
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
 
 
92
  );
93
  parent::__construct($data);
94
  }
@@ -547,6 +550,52 @@ class OffAmazonPaymentsService_Model_CaptureDetails extends OffAmazonPaymentsSer
547
  {
548
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
549
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
 
551
  }
552
  ?>
89
  'CaptureStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
90
 
91
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
92
+
93
+ 'ProviderCreditSummaryList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditSummaryList'),
94
+
95
  );
96
  parent::__construct($data);
97
  }
550
  {
551
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
552
  }
553
+
554
+ /**
555
+ * Gets the value of the ProviderCreditSummaryList.
556
+ *
557
+ * @return ProviderCreditSummaryList ProviderCreditSummaryList
558
+ */
559
+ public function getProviderCreditSummaryList()
560
+ {
561
+ return $this->_fields['ProviderCreditSummaryList']['FieldValue'];
562
+ }
563
+
564
+ /**
565
+ * Sets the value of the ProviderCreditSummaryList.
566
+ *
567
+ * @param ProviderCreditSummaryList ProviderCreditSummaryList
568
+ * @return void
569
+ */
570
+ public function setProviderCreditSummaryList($value)
571
+ {
572
+ $this->_fields['ProviderCreditSummaryList']['FieldValue'] = $value;
573
+ return;
574
+ }
575
+
576
+ /**
577
+ * Sets the value of the ProviderCreditSummaryList and returns this instance
578
+ *
579
+ * @param ProviderCreditSummaryList $value ProviderCreditSummaryList
580
+ * @return OffAmazonPaymentsService_Model_CaptureDetails instance
581
+ */
582
+ public function withProviderCreditSummaryList($value)
583
+ {
584
+ $this->setProviderCreditSummaryList($value);
585
+ return $this;
586
+ }
587
+
588
+
589
+ /**
590
+ * Checks if ProviderCreditSummaryList is set
591
+ *
592
+ * @return bool true if ProviderCreditSummaryList property is set
593
+ */
594
+ public function isSetProviderCreditSummaryList()
595
+ {
596
+ return !is_null($this->_fields['ProviderCreditSummaryList']['FieldValue']);
597
+
598
+ }
599
 
600
  }
601
  ?>
lib/OffAmazonPaymentsService/Model/CaptureRequest.php CHANGED
@@ -69,6 +69,7 @@ class OffAmazonPaymentsService_Model_CaptureRequest extends OffAmazonPaymentsSer
69
 
70
  'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'),
71
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
72
  );
73
  parent::__construct($data);
74
  }
@@ -343,5 +344,51 @@ class OffAmazonPaymentsService_Model_CaptureRequest extends OffAmazonPaymentsSer
343
  {
344
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
345
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
347
  ?>
69
 
70
  'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'),
71
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
72
+ 'ProviderCreditList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditList'),
73
  );
74
  parent::__construct($data);
75
  }
344
  {
345
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
346
  }
347
+
348
+ /**
349
+ * Gets the value of the ProviderCreditList.
350
+ *
351
+ * @return ProviderCreditList ProviderCreditList
352
+ */
353
+ public function getProviderCreditList()
354
+ {
355
+ return $this->_fields['ProviderCreditList']['FieldValue'];
356
+ }
357
+
358
+ /**
359
+ * Sets the value of the ProviderCreditList.
360
+ *
361
+ * @param ProviderCreditList ProviderCreditList
362
+ * @return void
363
+ */
364
+ public function setProviderCreditList($value)
365
+ {
366
+ $this->_fields['ProviderCreditList']['FieldValue'] = $value;
367
+ return;
368
+ }
369
+
370
+ /**
371
+ * Sets the value of the ProviderCreditList and returns this instance
372
+ *
373
+ * @param ProviderCreditList $value ProviderCreditList
374
+ * @return OffAmazonPaymentsService_Model_CaptureRequest instance
375
+ */
376
+ public function withProviderCreditList($value)
377
+ {
378
+ $this->setProviderCreditList($value);
379
+ return $this;
380
+ }
381
+
382
+
383
+ /**
384
+ * Checks if ProviderCreditList is set
385
+ *
386
+ * @return bool true if ProviderCreditList property is set
387
+ */
388
+ public function isSetProviderCreditList()
389
+ {
390
+ return !is_null($this->_fields['ProviderCreditList']['FieldValue']);
391
+
392
+ }
393
  }
394
  ?>
lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsRequest.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>SellerId: string</li>
33
+ * <li>AmazonProviderCreditId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>SellerId: string</li>
49
+ * <li>AmazonProviderCreditId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'AmazonProviderCreditId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the SellerId property.
64
+ *
65
+ * @return string SellerId
66
+ */
67
+ public function getSellerId()
68
+ {
69
+ return $this->_fields['SellerId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the SellerId property.
74
+ *
75
+ * @param string SellerId
76
+ * @return this instance
77
+ */
78
+ public function setSellerId($value)
79
+ {
80
+ $this->_fields['SellerId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the SellerId and returns this instance
86
+ *
87
+ * @param string $value SellerId
88
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest instance
89
+ */
90
+ public function withSellerId($value)
91
+ {
92
+ $this->setSellerId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if SellerId is set
99
+ *
100
+ * @return bool true if SellerId is set
101
+ */
102
+ public function isSetSellerId()
103
+ {
104
+ return !is_null($this->_fields['SellerId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the AmazonProviderCreditId property.
109
+ *
110
+ * @return string AmazonProviderCreditId
111
+ */
112
+ public function getAmazonProviderCreditId()
113
+ {
114
+ return $this->_fields['AmazonProviderCreditId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the AmazonProviderCreditId property.
119
+ *
120
+ * @param string AmazonProviderCreditId
121
+ * @return this instance
122
+ */
123
+ public function setAmazonProviderCreditId($value)
124
+ {
125
+ $this->_fields['AmazonProviderCreditId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the AmazonProviderCreditId and returns this instance
131
+ *
132
+ * @param string $value AmazonProviderCreditId
133
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsRequest instance
134
+ */
135
+ public function withAmazonProviderCreditId($value)
136
+ {
137
+ $this->setAmazonProviderCreditId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if AmazonProviderCreditId is set
144
+ *
145
+ * @return bool true if AmazonProviderCreditId is set
146
+ */
147
+ public function isSetAmazonProviderCreditId()
148
+ {
149
+ return !is_null($this->_fields['AmazonProviderCreditId']['FieldValue']);
150
+ }
151
+
152
+
153
+
154
+
155
+ }
lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsResponse.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>GetProviderCreditDetailsResult: OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult</li>
33
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>GetProviderCreditDetailsResult: OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult</li>
49
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+
57
+ 'GetProviderCreditDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult'),
58
+
59
+
60
+ 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'),
61
+
62
+ );
63
+ parent::__construct($data);
64
+ }
65
+
66
+
67
+ /**
68
+ * Construct OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse
72
+ */
73
+ public static function fromXML($xml)
74
+ {
75
+ $dom = new DOMDocument();
76
+ $dom->loadXML($xml);
77
+ $xpath = new DOMXPath($dom);
78
+ $xpath->registerNamespace('a', 'http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01');
79
+ $response = $xpath->query('//a:GetProviderCreditDetailsResponse');
80
+ if ($response->length == 1) {
81
+ return new OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse(($response->item(0)));
82
+ } else {
83
+ throw new Exception ("Unable to construct OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse from provided XML.
84
+ Make sure that GetProviderCreditDetailsResponse is a root element");
85
+ }
86
+
87
+ }
88
+
89
+ /**
90
+ * Gets the value of the GetProviderCreditDetailsResult.
91
+ *
92
+ * @return GetProviderCreditDetailsResult GetProviderCreditDetailsResult
93
+ */
94
+ public function getGetProviderCreditDetailsResult()
95
+ {
96
+ return $this->_fields['GetProviderCreditDetailsResult']['FieldValue'];
97
+ }
98
+
99
+ /**
100
+ * Sets the value of the GetProviderCreditDetailsResult.
101
+ *
102
+ * @param GetProviderCreditDetailsResult GetProviderCreditDetailsResult
103
+ * @return void
104
+ */
105
+ public function setGetProviderCreditDetailsResult($value)
106
+ {
107
+ $this->_fields['GetProviderCreditDetailsResult']['FieldValue'] = $value;
108
+ return;
109
+ }
110
+
111
+ /**
112
+ * Sets the value of the GetProviderCreditDetailsResult and returns this instance
113
+ *
114
+ * @param GetProviderCreditDetailsResult $value GetProviderCreditDetailsResult
115
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse instance
116
+ */
117
+ public function withGetProviderCreditDetailsResult($value)
118
+ {
119
+ $this->setGetProviderCreditDetailsResult($value);
120
+ return $this;
121
+ }
122
+
123
+
124
+ /**
125
+ * Checks if GetProviderCreditDetailsResult is set
126
+ *
127
+ * @return bool true if GetProviderCreditDetailsResult property is set
128
+ */
129
+ public function isSetGetProviderCreditDetailsResult()
130
+ {
131
+ return !is_null($this->_fields['GetProviderCreditDetailsResult']['FieldValue']);
132
+
133
+ }
134
+
135
+ /**
136
+ * Gets the value of the ResponseMetadata.
137
+ *
138
+ * @return ResponseMetadata ResponseMetadata
139
+ */
140
+ public function getResponseMetadata()
141
+ {
142
+ return $this->_fields['ResponseMetadata']['FieldValue'];
143
+ }
144
+
145
+ /**
146
+ * Sets the value of the ResponseMetadata.
147
+ *
148
+ * @param ResponseMetadata ResponseMetadata
149
+ * @return void
150
+ */
151
+ public function setResponseMetadata($value)
152
+ {
153
+ $this->_fields['ResponseMetadata']['FieldValue'] = $value;
154
+ return;
155
+ }
156
+
157
+ /**
158
+ * Sets the value of the ResponseMetadata and returns this instance
159
+ *
160
+ * @param ResponseMetadata $value ResponseMetadata
161
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResponse instance
162
+ */
163
+ public function withResponseMetadata($value)
164
+ {
165
+ $this->setResponseMetadata($value);
166
+ return $this;
167
+ }
168
+
169
+
170
+ /**
171
+ * Checks if ResponseMetadata is set
172
+ *
173
+ * @return bool true if ResponseMetadata property is set
174
+ */
175
+ public function isSetResponseMetadata()
176
+ {
177
+ return !is_null($this->_fields['ResponseMetadata']['FieldValue']);
178
+
179
+ }
180
+
181
+
182
+
183
+ /**
184
+ * XML Representation for this object
185
+ *
186
+ * @return string XML for this object
187
+ */
188
+ public function toXML()
189
+ {
190
+ $xml = "";
191
+ $xml .= "<GetProviderCreditDetailsResponse xmlns=\"http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01\">";
192
+ $xml .= $this->_toXMLFragment();
193
+ $xml .= "</GetProviderCreditDetailsResponse>";
194
+ return $xml;
195
+ }
196
+
197
+ private $_responseHeaderMetadata = null;
198
+
199
+ public function getResponseHeaderMetadata() {
200
+ return $this->_responseHeaderMetadata;
201
+ }
202
+
203
+ public function setResponseHeaderMetadata($responseHeaderMetadata) {
204
+ return $this->_responseHeaderMetadata = $responseHeaderMetadata;
205
+ }
206
+
207
+ }
lib/OffAmazonPaymentsService/Model/GetProviderCreditDetailsResult.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderCreditDetails: OffAmazonPaymentsService_Model_ProviderCreditDetails</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>ProviderCreditDetails: OffAmazonPaymentsService_Model_ProviderCreditDetails</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+
55
+ 'ProviderCreditDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditDetails'),
56
+
57
+ );
58
+ parent::__construct($data);
59
+ }
60
+
61
+ /**
62
+ * Gets the value of the ProviderCreditDetails.
63
+ *
64
+ * @return ProviderCreditDetails ProviderCreditDetails
65
+ */
66
+ public function getProviderCreditDetails()
67
+ {
68
+ return $this->_fields['ProviderCreditDetails']['FieldValue'];
69
+ }
70
+
71
+ /**
72
+ * Sets the value of the ProviderCreditDetails.
73
+ *
74
+ * @param ProviderCreditDetails ProviderCreditDetails
75
+ * @return void
76
+ */
77
+ public function setProviderCreditDetails($value)
78
+ {
79
+ $this->_fields['ProviderCreditDetails']['FieldValue'] = $value;
80
+ return;
81
+ }
82
+
83
+ /**
84
+ * Sets the value of the ProviderCreditDetails and returns this instance
85
+ *
86
+ * @param ProviderCreditDetails $value ProviderCreditDetails
87
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditDetailsResult instance
88
+ */
89
+ public function withProviderCreditDetails($value)
90
+ {
91
+ $this->setProviderCreditDetails($value);
92
+ return $this;
93
+ }
94
+
95
+
96
+ /**
97
+ * Checks if ProviderCreditDetails is set
98
+ *
99
+ * @return bool true if ProviderCreditDetails property is set
100
+ */
101
+ public function isSetProviderCreditDetails()
102
+ {
103
+ return !is_null($this->_fields['ProviderCreditDetails']['FieldValue']);
104
+
105
+ }
106
+
107
+
108
+
109
+
110
+ }
lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsRequest.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>SellerId: string</li>
33
+ * <li>AmazonProviderCreditReversalId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>SellerId: string</li>
49
+ * <li>AmazonProviderCreditReversalId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'AmazonProviderCreditReversalId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the SellerId property.
64
+ *
65
+ * @return string SellerId
66
+ */
67
+ public function getSellerId()
68
+ {
69
+ return $this->_fields['SellerId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the SellerId property.
74
+ *
75
+ * @param string SellerId
76
+ * @return this instance
77
+ */
78
+ public function setSellerId($value)
79
+ {
80
+ $this->_fields['SellerId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the SellerId and returns this instance
86
+ *
87
+ * @param string $value SellerId
88
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest instance
89
+ */
90
+ public function withSellerId($value)
91
+ {
92
+ $this->setSellerId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if SellerId is set
99
+ *
100
+ * @return bool true if SellerId is set
101
+ */
102
+ public function isSetSellerId()
103
+ {
104
+ return !is_null($this->_fields['SellerId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the AmazonProviderCreditReversalId property.
109
+ *
110
+ * @return string AmazonProviderCreditReversalId
111
+ */
112
+ public function getAmazonProviderCreditReversalId()
113
+ {
114
+ return $this->_fields['AmazonProviderCreditReversalId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the AmazonProviderCreditReversalId property.
119
+ *
120
+ * @param string AmazonProviderCreditReversalId
121
+ * @return this instance
122
+ */
123
+ public function setAmazonProviderCreditReversalId($value)
124
+ {
125
+ $this->_fields['AmazonProviderCreditReversalId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the AmazonProviderCreditReversalId and returns this instance
131
+ *
132
+ * @param string $value AmazonProviderCreditReversalId
133
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsRequest instance
134
+ */
135
+ public function withAmazonProviderCreditReversalId($value)
136
+ {
137
+ $this->setAmazonProviderCreditReversalId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if AmazonProviderCreditReversalId is set
144
+ *
145
+ * @return bool true if AmazonProviderCreditReversalId is set
146
+ */
147
+ public function isSetAmazonProviderCreditReversalId()
148
+ {
149
+ return !is_null($this->_fields['AmazonProviderCreditReversalId']['FieldValue']);
150
+ }
151
+
152
+
153
+
154
+
155
+ }
lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsResponse.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>GetProviderCreditReversalDetailsResult: OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult</li>
33
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>GetProviderCreditReversalDetailsResult: OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult</li>
49
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+
57
+ 'GetProviderCreditReversalDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult'),
58
+
59
+
60
+ 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'),
61
+
62
+ );
63
+ parent::__construct($data);
64
+ }
65
+
66
+
67
+ /**
68
+ * Construct OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse
72
+ */
73
+ public static function fromXML($xml)
74
+ {
75
+ $dom = new DOMDocument();
76
+ $dom->loadXML($xml);
77
+ $xpath = new DOMXPath($dom);
78
+ $xpath->registerNamespace('a', 'http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01');
79
+ $response = $xpath->query('//a:GetProviderCreditReversalDetailsResponse');
80
+ if ($response->length == 1) {
81
+ return new OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse(($response->item(0)));
82
+ } else {
83
+ throw new Exception ("Unable to construct OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse from provided XML.
84
+ Make sure that GetProviderCreditReversalDetailsResponse is a root element");
85
+ }
86
+
87
+ }
88
+
89
+ /**
90
+ * Gets the value of the GetProviderCreditReversalDetailsResult.
91
+ *
92
+ * @return GetProviderCreditReversalDetailsResult GetProviderCreditReversalDetailsResult
93
+ */
94
+ public function getGetProviderCreditReversalDetailsResult()
95
+ {
96
+ return $this->_fields['GetProviderCreditReversalDetailsResult']['FieldValue'];
97
+ }
98
+
99
+ /**
100
+ * Sets the value of the GetProviderCreditReversalDetailsResult.
101
+ *
102
+ * @param GetProviderCreditReversalDetailsResult GetProviderCreditReversalDetailsResult
103
+ * @return void
104
+ */
105
+ public function setGetProviderCreditReversalDetailsResult($value)
106
+ {
107
+ $this->_fields['GetProviderCreditReversalDetailsResult']['FieldValue'] = $value;
108
+ return;
109
+ }
110
+
111
+ /**
112
+ * Sets the value of the GetProviderCreditReversalDetailsResult and returns this instance
113
+ *
114
+ * @param GetProviderCreditReversalDetailsResult $value GetProviderCreditReversalDetailsResult
115
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse instance
116
+ */
117
+ public function withGetProviderCreditReversalDetailsResult($value)
118
+ {
119
+ $this->setGetProviderCreditReversalDetailsResult($value);
120
+ return $this;
121
+ }
122
+
123
+
124
+ /**
125
+ * Checks if GetProviderCreditReversalDetailsResult is set
126
+ *
127
+ * @return bool true if GetProviderCreditReversalDetailsResult property is set
128
+ */
129
+ public function isSetGetProviderCreditReversalDetailsResult()
130
+ {
131
+ return !is_null($this->_fields['GetProviderCreditReversalDetailsResult']['FieldValue']);
132
+
133
+ }
134
+
135
+ /**
136
+ * Gets the value of the ResponseMetadata.
137
+ *
138
+ * @return ResponseMetadata ResponseMetadata
139
+ */
140
+ public function getResponseMetadata()
141
+ {
142
+ return $this->_fields['ResponseMetadata']['FieldValue'];
143
+ }
144
+
145
+ /**
146
+ * Sets the value of the ResponseMetadata.
147
+ *
148
+ * @param ResponseMetadata ResponseMetadata
149
+ * @return void
150
+ */
151
+ public function setResponseMetadata($value)
152
+ {
153
+ $this->_fields['ResponseMetadata']['FieldValue'] = $value;
154
+ return;
155
+ }
156
+
157
+ /**
158
+ * Sets the value of the ResponseMetadata and returns this instance
159
+ *
160
+ * @param ResponseMetadata $value ResponseMetadata
161
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResponse instance
162
+ */
163
+ public function withResponseMetadata($value)
164
+ {
165
+ $this->setResponseMetadata($value);
166
+ return $this;
167
+ }
168
+
169
+
170
+ /**
171
+ * Checks if ResponseMetadata is set
172
+ *
173
+ * @return bool true if ResponseMetadata property is set
174
+ */
175
+ public function isSetResponseMetadata()
176
+ {
177
+ return !is_null($this->_fields['ResponseMetadata']['FieldValue']);
178
+
179
+ }
180
+
181
+
182
+
183
+ /**
184
+ * XML Representation for this object
185
+ *
186
+ * @return string XML for this object
187
+ */
188
+ public function toXML()
189
+ {
190
+ $xml = "";
191
+ $xml .= "<GetProviderCreditReversalDetailsResponse xmlns=\"http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01\">";
192
+ $xml .= $this->_toXMLFragment();
193
+ $xml .= "</GetProviderCreditReversalDetailsResponse>";
194
+ return $xml;
195
+ }
196
+
197
+ private $_responseHeaderMetadata = null;
198
+
199
+ public function getResponseHeaderMetadata() {
200
+ return $this->_responseHeaderMetadata;
201
+ }
202
+
203
+ public function setResponseHeaderMetadata($responseHeaderMetadata) {
204
+ return $this->_responseHeaderMetadata = $responseHeaderMetadata;
205
+ }
206
+
207
+ }
lib/OffAmazonPaymentsService/Model/GetProviderCreditReversalDetailsResult.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsService_Model_ProviderCreditReversalDetails</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsService_Model_ProviderCreditReversalDetails</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+
55
+ 'ProviderCreditReversalDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditReversalDetails'),
56
+
57
+ );
58
+ parent::__construct($data);
59
+ }
60
+
61
+ /**
62
+ * Gets the value of the ProviderCreditReversalDetails.
63
+ *
64
+ * @return ProviderCreditReversalDetails ProviderCreditReversalDetails
65
+ */
66
+ public function getProviderCreditReversalDetails()
67
+ {
68
+ return $this->_fields['ProviderCreditReversalDetails']['FieldValue'];
69
+ }
70
+
71
+ /**
72
+ * Sets the value of the ProviderCreditReversalDetails.
73
+ *
74
+ * @param ProviderCreditReversalDetails ProviderCreditReversalDetails
75
+ * @return void
76
+ */
77
+ public function setProviderCreditReversalDetails($value)
78
+ {
79
+ $this->_fields['ProviderCreditReversalDetails']['FieldValue'] = $value;
80
+ return;
81
+ }
82
+
83
+ /**
84
+ * Sets the value of the ProviderCreditReversalDetails and returns this instance
85
+ *
86
+ * @param ProviderCreditReversalDetails $value ProviderCreditReversalDetails
87
+ * @return OffAmazonPaymentsService_Model_GetProviderCreditReversalDetailsResult instance
88
+ */
89
+ public function withProviderCreditReversalDetails($value)
90
+ {
91
+ $this->setProviderCreditReversalDetails($value);
92
+ return $this;
93
+ }
94
+
95
+
96
+ /**
97
+ * Checks if ProviderCreditReversalDetails is set
98
+ *
99
+ * @return bool true if ProviderCreditReversalDetails property is set
100
+ */
101
+ public function isSetProviderCreditReversalDetails()
102
+ {
103
+ return !is_null($this->_fields['ProviderCreditReversalDetails']['FieldValue']);
104
+
105
+ }
106
+
107
+
108
+
109
+
110
+ }
lib/OffAmazonPaymentsService/Model/OrderReferenceDetails.php CHANGED
@@ -35,13 +35,15 @@ require_once 'OffAmazonPaymentsService/Model.php';
35
  * <li>SellerNote: string</li>
36
  * <li>PlatformId: string</li>
37
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
 
38
  * <li>ReleaseEnvironment: string</li>
39
  * <li>SellerOrderAttributes: OffAmazonPaymentsService_Model_SellerOrderAttributes</li>
40
  * <li>OrderReferenceStatus: OffAmazonPaymentsService_Model_OrderReferenceStatus</li>
41
  * <li>Constraints: OffAmazonPaymentsService_Model_Constraints</li>
42
  * <li>CreationTimestamp: string</li>
43
  * <li>ExpirationTimestamp: string</li>
44
- *
 
45
  * </ul>
46
  */
47
  class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaymentsService_Model
@@ -61,13 +63,16 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
61
  * <li>SellerNote: string</li>
62
  * <li>PlatformId: string</li>
63
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
 
64
  * <li>ReleaseEnvironment: string</li>
65
  * <li>SellerOrderAttributes: OffAmazonPaymentsService_Model_SellerOrderAttributes</li>
66
  * <li>OrderReferenceStatus: OffAmazonPaymentsService_Model_OrderReferenceStatus</li>
67
  * <li>Constraints: OffAmazonPaymentsService_Model_Constraints</li>
68
  * <li>CreationTimestamp: string</li>
69
  * <li>ExpirationTimestamp: string</li>
70
- *
 
 
71
  * </ul>
72
  */
73
  public function __construct($data = null)
@@ -85,12 +90,13 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
85
  'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'),
86
 
87
  'Destination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Destination'),
88
-
 
 
89
  'ReleaseEnvironment' => array('FieldValue' => null, 'FieldType' => 'string'),
90
 
91
  'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'),
92
 
93
-
94
  'OrderReferenceStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceStatus'),
95
 
96
 
@@ -98,6 +104,11 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
98
 
99
  'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
100
  'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
 
 
 
 
 
101
  );
102
  parent::__construct($data);
103
  }
@@ -375,6 +386,52 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
375
 
376
  }
377
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  /**
379
  * Gets the value of the ReleaseEnvironment property.
380
  *
@@ -465,7 +522,7 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
465
  return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']);
466
 
467
  }
468
-
469
  /**
470
  * Gets the value of the OrderReferenceStatus.
471
  *
@@ -649,7 +706,97 @@ class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaym
649
  }
650
 
651
 
652
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
653
 
654
  }
655
- ?>
35
  * <li>SellerNote: string</li>
36
  * <li>PlatformId: string</li>
37
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
38
+ * <li>BillingAddress: OffAmazonPaymentsService_Model_BillingAddress</li>
39
  * <li>ReleaseEnvironment: string</li>
40
  * <li>SellerOrderAttributes: OffAmazonPaymentsService_Model_SellerOrderAttributes</li>
41
  * <li>OrderReferenceStatus: OffAmazonPaymentsService_Model_OrderReferenceStatus</li>
42
  * <li>Constraints: OffAmazonPaymentsService_Model_Constraints</li>
43
  * <li>CreationTimestamp: string</li>
44
  * <li>ExpirationTimestamp: string</li>
45
+ * <li>IdList: OffAmazonPaymentsService_Model_IdList</li>
46
+ * <li>ParentDetails: OffAmazonPaymentsService_Model_ParentDetails</li>
47
  * </ul>
48
  */
49
  class OffAmazonPaymentsService_Model_OrderReferenceDetails extends OffAmazonPaymentsService_Model
63
  * <li>SellerNote: string</li>
64
  * <li>PlatformId: string</li>
65
  * <li>Destination: OffAmazonPaymentsService_Model_Destination</li>
66
+ * <li>BillingAddress: OffAmazonPaymentsService_Model_BillingAddress</li>
67
  * <li>ReleaseEnvironment: string</li>
68
  * <li>SellerOrderAttributes: OffAmazonPaymentsService_Model_SellerOrderAttributes</li>
69
  * <li>OrderReferenceStatus: OffAmazonPaymentsService_Model_OrderReferenceStatus</li>
70
  * <li>Constraints: OffAmazonPaymentsService_Model_Constraints</li>
71
  * <li>CreationTimestamp: string</li>
72
  * <li>ExpirationTimestamp: string</li>
73
+ * <li>IdList: OffAmazonPaymentsService_Model_IdList</li>
74
+ * <li>ParentDetails: OffAmazonPaymentsService_Model_ParentDetails</li>
75
+ *
76
  * </ul>
77
  */
78
  public function __construct($data = null)
90
  'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'),
91
 
92
  'Destination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Destination'),
93
+
94
+ 'BillingAddress' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAddress'),
95
+
96
  'ReleaseEnvironment' => array('FieldValue' => null, 'FieldType' => 'string'),
97
 
98
  'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'),
99
 
 
100
  'OrderReferenceStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceStatus'),
101
 
102
 
104
 
105
  'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
106
  'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
107
+
108
+ 'IdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'),
109
+
110
+ 'ParentDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ParentDetails'),
111
+
112
  );
113
  parent::__construct($data);
114
  }
386
 
387
  }
388
 
389
+ /**
390
+ * Gets the value of the BillingAddress.
391
+ *
392
+ * @return BillingAddress BillingAddress
393
+ */
394
+ public function getBillingAddress()
395
+ {
396
+ return $this->_fields['BillingAddress']['FieldValue'];
397
+ }
398
+
399
+ /**
400
+ * Sets the value of the BillingAddress.
401
+ *
402
+ * @param BillingAddress BillingAddress
403
+ * @return void
404
+ */
405
+ public function setBillingAddress($value)
406
+ {
407
+ $this->_fields['BillingAddress']['FieldValue'] = $value;
408
+ return;
409
+ }
410
+
411
+ /**
412
+ * Sets the value of the BillingAddress and returns this instance
413
+ *
414
+ * @param BillingAddress $value BillingAddress
415
+ * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance
416
+ */
417
+ public function withBillingAddress($value)
418
+ {
419
+ $this->setBillingAddress($value);
420
+ return $this;
421
+ }
422
+
423
+ /**
424
+ * Checks if BillingAddress is set
425
+ *
426
+ * @return bool true if BillingAddress property is set
427
+ */
428
+ public function isSetBillingAddress()
429
+ {
430
+ return !is_null($this->_fields['BillingAddress']['FieldValue']);
431
+
432
+ }
433
+
434
+
435
  /**
436
  * Gets the value of the ReleaseEnvironment property.
437
  *
522
  return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']);
523
 
524
  }
525
+
526
  /**
527
  * Gets the value of the OrderReferenceStatus.
528
  *
706
  }
707
 
708
 
709
+ /**
710
+ * Gets the value of the IdList.
711
+ *
712
+ * @return IdList IdList
713
+ */
714
+ public function getIdList()
715
+ {
716
+ return $this->_fields['IdList']['FieldValue'];
717
+ }
718
+
719
+ /**
720
+ * Sets the value of the IdList.
721
+ *
722
+ * @param IdList IdList
723
+ * @return void
724
+ */
725
+ public function setIdList($value)
726
+ {
727
+ $this->_fields['IdList']['FieldValue'] = $value;
728
+ return;
729
+ }
730
+
731
+ /**
732
+ * Sets the value of the IdList and returns this instance
733
+ *
734
+ * @param IdList $value IdList
735
+ * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance
736
+ */
737
+ public function withIdList($value)
738
+ {
739
+ $this->setIdList($value);
740
+ return $this;
741
+ }
742
+
743
+
744
+ /**
745
+ * Checks if IdList is set
746
+ *
747
+ * @return bool true if IdList property is set
748
+ */
749
+ public function isSetIdList()
750
+ {
751
+ return !is_null($this->_fields['IdList']['FieldValue']);
752
+
753
+ }
754
+
755
+ /**
756
+ * Gets the value of the ParentDetails.
757
+ *
758
+ * @return OffAmazonPaymentsService_Model_ParentDetails ParentDetails
759
+ */
760
+ public function getParentDetails()
761
+ {
762
+ return $this->_fields['ParentDetails']['FieldValue'];
763
+ }
764
+
765
+ /**
766
+ * Sets the value of the ParentDetails.
767
+ *
768
+ * @param OffAmazonPaymentsService_Model_ParentDetails ParentDetails
769
+ * @return void
770
+ */
771
+ public function setParentDetails($value)
772
+ {
773
+ $this->_fields['ParentDetails']['FieldValue'] = $value;
774
+ return;
775
+ }
776
+
777
+ /**
778
+ * Sets the value of the ParentDetails and returns this instance
779
+ *
780
+ * @param ParentDetails $value ParentDetails
781
+ * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance
782
+ */
783
+ public function withParentDetails($value)
784
+ {
785
+ $this->setParentDetails($value);
786
+ return $this;
787
+ }
788
+
789
+
790
+ /**
791
+ * Checks if ParentDetails is set
792
+ *
793
+ * @return bool true if ParentDetails property is set
794
+ */
795
+ public function isSetParentDetails()
796
+ {
797
+ return !is_null($this->_fields['ParentDetails']['FieldValue']);
798
+
799
+ }
800
 
801
  }
802
+ ?>
lib/OffAmazonPaymentsService/Model/ParentDetails.php ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+ /**
19
+ * @see OffAmazonPaymentsService_Model
20
+ */
21
+ require_once 'OffAmazonPaymentsService/Model.php';
22
+
23
+ /**
24
+ * OffAmazonPaymentsService_Model_ParentDetails
25
+ *
26
+ * Properties:
27
+ * <ul>
28
+ *
29
+ * <li>Id: string</li>
30
+ * <li>Type: string</li>
31
+ *
32
+ * </ul>
33
+ */
34
+ class OffAmazonPaymentsService_Model_ParentDetails extends OffAmazonPaymentsService_Model
35
+ {
36
+
37
+ /**
38
+ * Construct new OffAmazonPaymentsService_Model_ParentDetails
39
+ *
40
+ * @param mixed $data DOMElement or Associative Array to construct from.
41
+ *
42
+ * Valid properties:
43
+ * <ul>
44
+ *
45
+ * <li>Id: string</li>
46
+ * <li>Type: string</li>
47
+ *
48
+ * </ul>
49
+ */
50
+ public function __construct ($data = null)
51
+ {
52
+ $this->_fields = array(
53
+ 'Id' => array(
54
+ 'FieldValue' => null,
55
+ 'FieldType' => 'string'
56
+ ),
57
+ 'Type' => array(
58
+ 'FieldValue' => null,
59
+ 'FieldType' => 'string'
60
+ )
61
+ );
62
+ parent::__construct($data);
63
+ }
64
+
65
+ /**
66
+ * Gets the value of the Id property.
67
+ *
68
+ * @return string Id
69
+ */
70
+ public function getId ()
71
+ {
72
+ return $this->_fields['Id']['FieldValue'];
73
+ }
74
+
75
+ /**
76
+ * Sets the value of the Id property.
77
+ *
78
+ * @param string Id
79
+ * @return this instance
80
+ */
81
+ public function setId ($value)
82
+ {
83
+ $this->_fields['Id']['FieldValue'] = $value;
84
+ return $this;
85
+ }
86
+
87
+ /**
88
+ * Sets the value of the Id and returns this instance
89
+ *
90
+ * @param string $value Id
91
+ * @return OffAmazonPaymentsService_Model_ParentDetails instance
92
+ */
93
+ public function withId ($value)
94
+ {
95
+ $this->setId($value);
96
+ return $this;
97
+ }
98
+
99
+ /**
100
+ * Checks if Id is set
101
+ *
102
+ * @return bool true if Id is set
103
+ */
104
+ public function isSetId ()
105
+ {
106
+ return ! is_null($this->_fields['Id']['FieldValue']);
107
+ }
108
+
109
+ /**
110
+ * Gets the value of the Type property.
111
+ *
112
+ * @return string Type
113
+ */
114
+ public function getType ()
115
+ {
116
+ return $this->_fields['Type']['FieldValue'];
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the Type property.
121
+ *
122
+ * @param string Type
123
+ * @return this instance
124
+ */
125
+ public function setType ($value)
126
+ {
127
+ $this->_fields['Type']['FieldValue'] = $value;
128
+ return $this;
129
+ }
130
+
131
+ /**
132
+ * Sets the value of the Type and returns this instance
133
+ *
134
+ * @param string $value Type
135
+ * @return OffAmazonPaymentsService_Model_ParentDetails instance
136
+ */
137
+ public function withType ($value)
138
+ {
139
+ $this->setType($value);
140
+ return $this;
141
+ }
142
+
143
+ /**
144
+ * Checks if Type is set
145
+ *
146
+ * @return bool true if Type is set
147
+ */
148
+ public function isSetType ()
149
+ {
150
+ return ! is_null($this->_fields['Type']['FieldValue']);
151
+ }
152
+ }
153
+ ?>
lib/OffAmazonPaymentsService/Model/ProviderCredit.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCredit
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderId: string</li>
33
+ * <li>CreditAmount: OffAmazonPaymentsService_Model_Price</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_ProviderCredit extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_ProviderCredit
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderId: string</li>
49
+ * <li>CreditAmount: OffAmazonPaymentsService_Model_Price</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+
58
+ 'CreditAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
59
+
60
+ );
61
+ parent::__construct($data);
62
+ }
63
+
64
+ /**
65
+ * Gets the value of the ProviderId property.
66
+ *
67
+ * @return string ProviderId
68
+ */
69
+ public function getProviderId()
70
+ {
71
+ return $this->_fields['ProviderId']['FieldValue'];
72
+ }
73
+
74
+ /**
75
+ * Sets the value of the ProviderId property.
76
+ *
77
+ * @param string ProviderId
78
+ * @return this instance
79
+ */
80
+ public function setProviderId($value)
81
+ {
82
+ $this->_fields['ProviderId']['FieldValue'] = $value;
83
+ return $this;
84
+ }
85
+
86
+ /**
87
+ * Sets the value of the ProviderId and returns this instance
88
+ *
89
+ * @param string $value ProviderId
90
+ * @return OffAmazonPaymentsService_Model_ProviderCredit instance
91
+ */
92
+ public function withProviderId($value)
93
+ {
94
+ $this->setProviderId($value);
95
+ return $this;
96
+ }
97
+
98
+
99
+ /**
100
+ * Checks if ProviderId is set
101
+ *
102
+ * @return bool true if ProviderId is set
103
+ */
104
+ public function isSetProviderId()
105
+ {
106
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
107
+ }
108
+
109
+ /**
110
+ * Gets the value of the CreditAmount.
111
+ *
112
+ * @return Price CreditAmount
113
+ */
114
+ public function getCreditAmount()
115
+ {
116
+ return $this->_fields['CreditAmount']['FieldValue'];
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the CreditAmount.
121
+ *
122
+ * @param Price CreditAmount
123
+ * @return void
124
+ */
125
+ public function setCreditAmount($value)
126
+ {
127
+ $this->_fields['CreditAmount']['FieldValue'] = $value;
128
+ return;
129
+ }
130
+
131
+ /**
132
+ * Sets the value of the CreditAmount and returns this instance
133
+ *
134
+ * @param Price $value CreditAmount
135
+ * @return OffAmazonPaymentsService_Model_ProviderCredit instance
136
+ */
137
+ public function withCreditAmount($value)
138
+ {
139
+ $this->setCreditAmount($value);
140
+ return $this;
141
+ }
142
+
143
+
144
+ /**
145
+ * Checks if CreditAmount is set
146
+ *
147
+ * @return bool true if CreditAmount property is set
148
+ */
149
+ public function isSetCreditAmount()
150
+ {
151
+ return !is_null($this->_fields['CreditAmount']['FieldValue']);
152
+
153
+ }
154
+
155
+
156
+
157
+
158
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditDetails.php ADDED
@@ -0,0 +1,503 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditDetails
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>AmazonProviderCreditId: string</li>
33
+ * <li>SellerId: string</li>
34
+ * <li>ProviderId: string</li>
35
+ * <li>CreditReferenceId: string</li>
36
+ * <li>CreditAmount: OffAmazonPaymentsService_Model_Price</li>
37
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
38
+ * <li>CreditReversalIdList: OffAmazonPaymentsService_Model_IdList</li>
39
+ * <li>CreationTimestamp: string</li>
40
+ * <li>CreditStatus: OffAmazonPaymentsService_Model_Status</li>
41
+ *
42
+ * </ul>
43
+ */
44
+ class OffAmazonPaymentsService_Model_ProviderCreditDetails extends OffAmazonPaymentsService_Model
45
+ {
46
+
47
+ /**
48
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditDetails
49
+ *
50
+ * @param mixed $data DOMElement or Associative Array to construct from.
51
+ *
52
+ * Valid properties:
53
+ * <ul>
54
+ *
55
+ * <li>AmazonProviderCreditId: string</li>
56
+ * <li>SellerId: string</li>
57
+ * <li>ProviderId: string</li>
58
+ * <li>CreditReferenceId: string</li>
59
+ * <li>CreditAmount: OffAmazonPaymentsService_Model_Price</li>
60
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
61
+ * <li>CreditReversalIdList: OffAmazonPaymentsService_Model_IdList</li>
62
+ * <li>CreationTimestamp: string</li>
63
+ * <li>CreditStatus: OffAmazonPaymentsService_Model_Status</li>
64
+ *
65
+ * </ul>
66
+ */
67
+ public function __construct($data = null)
68
+ {
69
+ $this->_fields = array (
70
+ 'AmazonProviderCreditId' => array('FieldValue' => null, 'FieldType' => 'string'),
71
+ 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
72
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
73
+ 'CreditReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'),
74
+
75
+ 'CreditAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
76
+
77
+
78
+ 'CreditReversalAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
79
+
80
+
81
+ 'CreditReversalIdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'),
82
+
83
+ 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
84
+
85
+ 'CreditStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
86
+
87
+ );
88
+ parent::__construct($data);
89
+ }
90
+
91
+ /**
92
+ * Gets the value of the AmazonProviderCreditId property.
93
+ *
94
+ * @return string AmazonProviderCreditId
95
+ */
96
+ public function getAmazonProviderCreditId()
97
+ {
98
+ return $this->_fields['AmazonProviderCreditId']['FieldValue'];
99
+ }
100
+
101
+ /**
102
+ * Sets the value of the AmazonProviderCreditId property.
103
+ *
104
+ * @param string AmazonProviderCreditId
105
+ * @return this instance
106
+ */
107
+ public function setAmazonProviderCreditId($value)
108
+ {
109
+ $this->_fields['AmazonProviderCreditId']['FieldValue'] = $value;
110
+ return $this;
111
+ }
112
+
113
+ /**
114
+ * Sets the value of the AmazonProviderCreditId and returns this instance
115
+ *
116
+ * @param string $value AmazonProviderCreditId
117
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
118
+ */
119
+ public function withAmazonProviderCreditId($value)
120
+ {
121
+ $this->setAmazonProviderCreditId($value);
122
+ return $this;
123
+ }
124
+
125
+
126
+ /**
127
+ * Checks if AmazonProviderCreditId is set
128
+ *
129
+ * @return bool true if AmazonProviderCreditId is set
130
+ */
131
+ public function isSetAmazonProviderCreditId()
132
+ {
133
+ return !is_null($this->_fields['AmazonProviderCreditId']['FieldValue']);
134
+ }
135
+
136
+ /**
137
+ * Gets the value of the SellerId property.
138
+ *
139
+ * @return string SellerId
140
+ */
141
+ public function getSellerId()
142
+ {
143
+ return $this->_fields['SellerId']['FieldValue'];
144
+ }
145
+
146
+ /**
147
+ * Sets the value of the SellerId property.
148
+ *
149
+ * @param string SellerId
150
+ * @return this instance
151
+ */
152
+ public function setSellerId($value)
153
+ {
154
+ $this->_fields['SellerId']['FieldValue'] = $value;
155
+ return $this;
156
+ }
157
+
158
+ /**
159
+ * Sets the value of the SellerId and returns this instance
160
+ *
161
+ * @param string $value SellerId
162
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
163
+ */
164
+ public function withSellerId($value)
165
+ {
166
+ $this->setSellerId($value);
167
+ return $this;
168
+ }
169
+
170
+
171
+ /**
172
+ * Checks if SellerId is set
173
+ *
174
+ * @return bool true if SellerId is set
175
+ */
176
+ public function isSetSellerId()
177
+ {
178
+ return !is_null($this->_fields['SellerId']['FieldValue']);
179
+ }
180
+
181
+ /**
182
+ * Gets the value of the ProviderId property.
183
+ *
184
+ * @return string ProviderId
185
+ */
186
+ public function getProviderId()
187
+ {
188
+ return $this->_fields['ProviderId']['FieldValue'];
189
+ }
190
+
191
+ /**
192
+ * Sets the value of the ProviderId property.
193
+ *
194
+ * @param string ProviderId
195
+ * @return this instance
196
+ */
197
+ public function setProviderId($value)
198
+ {
199
+ $this->_fields['ProviderId']['FieldValue'] = $value;
200
+ return $this;
201
+ }
202
+
203
+ /**
204
+ * Sets the value of the ProviderId and returns this instance
205
+ *
206
+ * @param string $value ProviderId
207
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
208
+ */
209
+ public function withProviderId($value)
210
+ {
211
+ $this->setProviderId($value);
212
+ return $this;
213
+ }
214
+
215
+
216
+ /**
217
+ * Checks if ProviderId is set
218
+ *
219
+ * @return bool true if ProviderId is set
220
+ */
221
+ public function isSetProviderId()
222
+ {
223
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
224
+ }
225
+
226
+ /**
227
+ * Gets the value of the CreditReferenceId property.
228
+ *
229
+ * @return string CreditReferenceId
230
+ */
231
+ public function getCreditReferenceId()
232
+ {
233
+ return $this->_fields['CreditReferenceId']['FieldValue'];
234
+ }
235
+
236
+ /**
237
+ * Sets the value of the CreditReferenceId property.
238
+ *
239
+ * @param string CreditReferenceId
240
+ * @return this instance
241
+ */
242
+ public function setCreditReferenceId($value)
243
+ {
244
+ $this->_fields['CreditReferenceId']['FieldValue'] = $value;
245
+ return $this;
246
+ }
247
+
248
+ /**
249
+ * Sets the value of the CreditReferenceId and returns this instance
250
+ *
251
+ * @param string $value CreditReferenceId
252
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
253
+ */
254
+ public function withCreditReferenceId($value)
255
+ {
256
+ $this->setCreditReferenceId($value);
257
+ return $this;
258
+ }
259
+
260
+
261
+ /**
262
+ * Checks if CreditReferenceId is set
263
+ *
264
+ * @return bool true if CreditReferenceId is set
265
+ */
266
+ public function isSetCreditReferenceId()
267
+ {
268
+ return !is_null($this->_fields['CreditReferenceId']['FieldValue']);
269
+ }
270
+
271
+ /**
272
+ * Gets the value of the CreditAmount.
273
+ *
274
+ * @return Price CreditAmount
275
+ */
276
+ public function getCreditAmount()
277
+ {
278
+ return $this->_fields['CreditAmount']['FieldValue'];
279
+ }
280
+
281
+ /**
282
+ * Sets the value of the CreditAmount.
283
+ *
284
+ * @param Price CreditAmount
285
+ * @return void
286
+ */
287
+ public function setCreditAmount($value)
288
+ {
289
+ $this->_fields['CreditAmount']['FieldValue'] = $value;
290
+ return;
291
+ }
292
+
293
+ /**
294
+ * Sets the value of the CreditAmount and returns this instance
295
+ *
296
+ * @param Price $value CreditAmount
297
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
298
+ */
299
+ public function withCreditAmount($value)
300
+ {
301
+ $this->setCreditAmount($value);
302
+ return $this;
303
+ }
304
+
305
+
306
+ /**
307
+ * Checks if CreditAmount is set
308
+ *
309
+ * @return bool true if CreditAmount property is set
310
+ */
311
+ public function isSetCreditAmount()
312
+ {
313
+ return !is_null($this->_fields['CreditAmount']['FieldValue']);
314
+
315
+ }
316
+
317
+ /**
318
+ * Gets the value of the CreditReversalAmount.
319
+ *
320
+ * @return Price CreditReversalAmount
321
+ */
322
+ public function getCreditReversalAmount()
323
+ {
324
+ return $this->_fields['CreditReversalAmount']['FieldValue'];
325
+ }
326
+
327
+ /**
328
+ * Sets the value of the CreditReversalAmount.
329
+ *
330
+ * @param Price CreditReversalAmount
331
+ * @return void
332
+ */
333
+ public function setCreditReversalAmount($value)
334
+ {
335
+ $this->_fields['CreditReversalAmount']['FieldValue'] = $value;
336
+ return;
337
+ }
338
+
339
+ /**
340
+ * Sets the value of the CreditReversalAmount and returns this instance
341
+ *
342
+ * @param Price $value CreditReversalAmount
343
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
344
+ */
345
+ public function withCreditReversalAmount($value)
346
+ {
347
+ $this->setCreditReversalAmount($value);
348
+ return $this;
349
+ }
350
+
351
+
352
+ /**
353
+ * Checks if CreditReversalAmount is set
354
+ *
355
+ * @return bool true if CreditReversalAmount property is set
356
+ */
357
+ public function isSetCreditReversalAmount()
358
+ {
359
+ return !is_null($this->_fields['CreditReversalAmount']['FieldValue']);
360
+
361
+ }
362
+
363
+ /**
364
+ * Gets the value of the CreditReversalIdList.
365
+ *
366
+ * @return IdList CreditReversalIdList
367
+ */
368
+ public function getCreditReversalIdList()
369
+ {
370
+ return $this->_fields['CreditReversalIdList']['FieldValue'];
371
+ }
372
+
373
+ /**
374
+ * Sets the value of the CreditReversalIdList.
375
+ *
376
+ * @param IdList CreditReversalIdList
377
+ * @return void
378
+ */
379
+ public function setCreditReversalIdList($value)
380
+ {
381
+ $this->_fields['CreditReversalIdList']['FieldValue'] = $value;
382
+ return;
383
+ }
384
+
385
+ /**
386
+ * Sets the value of the CreditReversalIdList and returns this instance
387
+ *
388
+ * @param IdList $value CreditReversalIdList
389
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
390
+ */
391
+ public function withCreditReversalIdList($value)
392
+ {
393
+ $this->setCreditReversalIdList($value);
394
+ return $this;
395
+ }
396
+
397
+
398
+ /**
399
+ * Checks if CreditReversalIdList is set
400
+ *
401
+ * @return bool true if CreditReversalIdList property is set
402
+ */
403
+ public function isSetCreditReversalIdList()
404
+ {
405
+ return !is_null($this->_fields['CreditReversalIdList']['FieldValue']);
406
+
407
+ }
408
+
409
+ /**
410
+ * Gets the value of the CreationTimestamp property.
411
+ *
412
+ * @return string CreationTimestamp
413
+ */
414
+ public function getCreationTimestamp()
415
+ {
416
+ return $this->_fields['CreationTimestamp']['FieldValue'];
417
+ }
418
+
419
+ /**
420
+ * Sets the value of the CreationTimestamp property.
421
+ *
422
+ * @param string CreationTimestamp
423
+ * @return this instance
424
+ */
425
+ public function setCreationTimestamp($value)
426
+ {
427
+ $this->_fields['CreationTimestamp']['FieldValue'] = $value;
428
+ return $this;
429
+ }
430
+
431
+ /**
432
+ * Sets the value of the CreationTimestamp and returns this instance
433
+ *
434
+ * @param string $value CreationTimestamp
435
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
436
+ */
437
+ public function withCreationTimestamp($value)
438
+ {
439
+ $this->setCreationTimestamp($value);
440
+ return $this;
441
+ }
442
+
443
+
444
+ /**
445
+ * Checks if CreationTimestamp is set
446
+ *
447
+ * @return bool true if CreationTimestamp is set
448
+ */
449
+ public function isSetCreationTimestamp()
450
+ {
451
+ return !is_null($this->_fields['CreationTimestamp']['FieldValue']);
452
+ }
453
+
454
+ /**
455
+ * Gets the value of the CreditStatus.
456
+ *
457
+ * @return Status CreditStatus
458
+ */
459
+ public function getCreditStatus()
460
+ {
461
+ return $this->_fields['CreditStatus']['FieldValue'];
462
+ }
463
+
464
+ /**
465
+ * Sets the value of the CreditStatus.
466
+ *
467
+ * @param Status CreditStatus
468
+ * @return void
469
+ */
470
+ public function setCreditStatus($value)
471
+ {
472
+ $this->_fields['CreditStatus']['FieldValue'] = $value;
473
+ return;
474
+ }
475
+
476
+ /**
477
+ * Sets the value of the CreditStatus and returns this instance
478
+ *
479
+ * @param Status $value CreditStatus
480
+ * @return OffAmazonPaymentsService_Model_ProviderCreditDetails instance
481
+ */
482
+ public function withCreditStatus($value)
483
+ {
484
+ $this->setCreditStatus($value);
485
+ return $this;
486
+ }
487
+
488
+
489
+ /**
490
+ * Checks if CreditStatus is set
491
+ *
492
+ * @return bool true if CreditStatus property is set
493
+ */
494
+ public function isSetCreditStatus()
495
+ {
496
+ return !is_null($this->_fields['CreditStatus']['FieldValue']);
497
+
498
+ }
499
+
500
+
501
+
502
+
503
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCredit</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_ProviderCreditList extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCredit</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+ 'member' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_ProviderCredit')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the member.
61
+ *
62
+ * @return array of ProviderCredit member
63
+ */
64
+ public function getmember()
65
+ {
66
+ return $this->_fields['member']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the member.
71
+ *
72
+ * @param mixed ProviderCredit or an array of ProviderCredit member
73
+ * @return this instance
74
+ */
75
+ public function setmember($member)
76
+ {
77
+ if (!$this->_isNumericArray($member)) {
78
+ $member = array ($member);
79
+ }
80
+ $this->_fields['member']['FieldValue'] = $member;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of member list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withmember($member1, $member2)</code>
89
+ *
90
+ * @param ProviderCredit $providerCreditArgs one or more member
91
+ * @return OffAmazonPaymentsService_Model_ProviderCreditList instance
92
+ */
93
+ public function withmember($providerCreditArgs)
94
+ {
95
+ foreach (func_get_args() as $member) {
96
+ $this->_fields['member']['FieldValue'][] = $member;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if member list is non-empty
105
+ *
106
+ * @return bool true if member list is non-empty
107
+ */
108
+ public function isSetmember()
109
+ {
110
+ return count ($this->_fields['member']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditReversal.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditReversal
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderId: string</li>
33
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_ProviderCreditReversal extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditReversal
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderId: string</li>
49
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+
58
+ 'CreditReversalAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
59
+
60
+ );
61
+ parent::__construct($data);
62
+ }
63
+
64
+ /**
65
+ * Gets the value of the ProviderId property.
66
+ *
67
+ * @return string ProviderId
68
+ */
69
+ public function getProviderId()
70
+ {
71
+ return $this->_fields['ProviderId']['FieldValue'];
72
+ }
73
+
74
+ /**
75
+ * Sets the value of the ProviderId property.
76
+ *
77
+ * @param string ProviderId
78
+ * @return this instance
79
+ */
80
+ public function setProviderId($value)
81
+ {
82
+ $this->_fields['ProviderId']['FieldValue'] = $value;
83
+ return $this;
84
+ }
85
+
86
+ /**
87
+ * Sets the value of the ProviderId and returns this instance
88
+ *
89
+ * @param string $value ProviderId
90
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversal instance
91
+ */
92
+ public function withProviderId($value)
93
+ {
94
+ $this->setProviderId($value);
95
+ return $this;
96
+ }
97
+
98
+
99
+ /**
100
+ * Checks if ProviderId is set
101
+ *
102
+ * @return bool true if ProviderId is set
103
+ */
104
+ public function isSetProviderId()
105
+ {
106
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
107
+ }
108
+
109
+ /**
110
+ * Gets the value of the CreditReversalAmount.
111
+ *
112
+ * @return Price CreditReversalAmount
113
+ */
114
+ public function getCreditReversalAmount()
115
+ {
116
+ return $this->_fields['CreditReversalAmount']['FieldValue'];
117
+ }
118
+
119
+ /**
120
+ * Sets the value of the CreditReversalAmount.
121
+ *
122
+ * @param Price CreditReversalAmount
123
+ * @return void
124
+ */
125
+ public function setCreditReversalAmount($value)
126
+ {
127
+ $this->_fields['CreditReversalAmount']['FieldValue'] = $value;
128
+ return;
129
+ }
130
+
131
+ /**
132
+ * Sets the value of the CreditReversalAmount and returns this instance
133
+ *
134
+ * @param Price $value CreditReversalAmount
135
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversal instance
136
+ */
137
+ public function withCreditReversalAmount($value)
138
+ {
139
+ $this->setCreditReversalAmount($value);
140
+ return $this;
141
+ }
142
+
143
+
144
+ /**
145
+ * Checks if CreditReversalAmount is set
146
+ *
147
+ * @return bool true if CreditReversalAmount property is set
148
+ */
149
+ public function isSetCreditReversalAmount()
150
+ {
151
+ return !is_null($this->_fields['CreditReversalAmount']['FieldValue']);
152
+
153
+ }
154
+
155
+
156
+
157
+
158
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditReversalDetails.php ADDED
@@ -0,0 +1,449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditReversalDetails
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>AmazonProviderCreditReversalId: string</li>
33
+ * <li>SellerId: string</li>
34
+ * <li>ProviderId: string</li>
35
+ * <li>CreditReversalReferenceId: string</li>
36
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
37
+ * <li>CreationTimestamp: string</li>
38
+ * <li>CreditReversalStatus: OffAmazonPaymentsService_Model_Status</li>
39
+ * <li>CreditReversalNote: string</li>
40
+ *
41
+ * </ul>
42
+ */
43
+ class OffAmazonPaymentsService_Model_ProviderCreditReversalDetails extends OffAmazonPaymentsService_Model
44
+ {
45
+
46
+ /**
47
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditReversalDetails
48
+ *
49
+ * @param mixed $data DOMElement or Associative Array to construct from.
50
+ *
51
+ * Valid properties:
52
+ * <ul>
53
+ *
54
+ * <li>AmazonProviderCreditReversalId: string</li>
55
+ * <li>SellerId: string</li>
56
+ * <li>ProviderId: string</li>
57
+ * <li>CreditReversalReferenceId: string</li>
58
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
59
+ * <li>CreationTimestamp: string</li>
60
+ * <li>CreditReversalStatus: OffAmazonPaymentsService_Model_Status</li>
61
+ * <li>CreditReversalNote: string</li>
62
+ *
63
+ * </ul>
64
+ */
65
+ public function __construct($data = null)
66
+ {
67
+ $this->_fields = array (
68
+ 'AmazonProviderCreditReversalId' => array('FieldValue' => null, 'FieldType' => 'string'),
69
+ 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
70
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
71
+ 'CreditReversalReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'),
72
+
73
+ 'CreditReversalAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
74
+
75
+ 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'),
76
+
77
+ 'CreditReversalStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
78
+
79
+ 'CreditReversalNote' => array('FieldValue' => null, 'FieldType' => 'string'),
80
+ );
81
+ parent::__construct($data);
82
+ }
83
+
84
+ /**
85
+ * Gets the value of the AmazonProviderCreditReversalId property.
86
+ *
87
+ * @return string AmazonProviderCreditReversalId
88
+ */
89
+ public function getAmazonProviderCreditReversalId()
90
+ {
91
+ return $this->_fields['AmazonProviderCreditReversalId']['FieldValue'];
92
+ }
93
+
94
+ /**
95
+ * Sets the value of the AmazonProviderCreditReversalId property.
96
+ *
97
+ * @param string AmazonProviderCreditReversalId
98
+ * @return this instance
99
+ */
100
+ public function setAmazonProviderCreditReversalId($value)
101
+ {
102
+ $this->_fields['AmazonProviderCreditReversalId']['FieldValue'] = $value;
103
+ return $this;
104
+ }
105
+
106
+ /**
107
+ * Sets the value of the AmazonProviderCreditReversalId and returns this instance
108
+ *
109
+ * @param string $value AmazonProviderCreditReversalId
110
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
111
+ */
112
+ public function withAmazonProviderCreditReversalId($value)
113
+ {
114
+ $this->setAmazonProviderCreditReversalId($value);
115
+ return $this;
116
+ }
117
+
118
+
119
+ /**
120
+ * Checks if AmazonProviderCreditReversalId is set
121
+ *
122
+ * @return bool true if AmazonProviderCreditReversalId is set
123
+ */
124
+ public function isSetAmazonProviderCreditReversalId()
125
+ {
126
+ return !is_null($this->_fields['AmazonProviderCreditReversalId']['FieldValue']);
127
+ }
128
+
129
+ /**
130
+ * Gets the value of the SellerId property.
131
+ *
132
+ * @return string SellerId
133
+ */
134
+ public function getSellerId()
135
+ {
136
+ return $this->_fields['SellerId']['FieldValue'];
137
+ }
138
+
139
+ /**
140
+ * Sets the value of the SellerId property.
141
+ *
142
+ * @param string SellerId
143
+ * @return this instance
144
+ */
145
+ public function setSellerId($value)
146
+ {
147
+ $this->_fields['SellerId']['FieldValue'] = $value;
148
+ return $this;
149
+ }
150
+
151
+ /**
152
+ * Sets the value of the SellerId and returns this instance
153
+ *
154
+ * @param string $value SellerId
155
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
156
+ */
157
+ public function withSellerId($value)
158
+ {
159
+ $this->setSellerId($value);
160
+ return $this;
161
+ }
162
+
163
+
164
+ /**
165
+ * Checks if SellerId is set
166
+ *
167
+ * @return bool true if SellerId is set
168
+ */
169
+ public function isSetSellerId()
170
+ {
171
+ return !is_null($this->_fields['SellerId']['FieldValue']);
172
+ }
173
+
174
+ /**
175
+ * Gets the value of the ProviderId property.
176
+ *
177
+ * @return string ProviderId
178
+ */
179
+ public function getProviderId()
180
+ {
181
+ return $this->_fields['ProviderId']['FieldValue'];
182
+ }
183
+
184
+ /**
185
+ * Sets the value of the ProviderId property.
186
+ *
187
+ * @param string ProviderId
188
+ * @return this instance
189
+ */
190
+ public function setProviderId($value)
191
+ {
192
+ $this->_fields['ProviderId']['FieldValue'] = $value;
193
+ return $this;
194
+ }
195
+
196
+ /**
197
+ * Sets the value of the ProviderId and returns this instance
198
+ *
199
+ * @param string $value ProviderId
200
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
201
+ */
202
+ public function withProviderId($value)
203
+ {
204
+ $this->setProviderId($value);
205
+ return $this;
206
+ }
207
+
208
+
209
+ /**
210
+ * Checks if ProviderId is set
211
+ *
212
+ * @return bool true if ProviderId is set
213
+ */
214
+ public function isSetProviderId()
215
+ {
216
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
217
+ }
218
+
219
+ /**
220
+ * Gets the value of the CreditReversalReferenceId property.
221
+ *
222
+ * @return string CreditReversalReferenceId
223
+ */
224
+ public function getCreditReversalReferenceId()
225
+ {
226
+ return $this->_fields['CreditReversalReferenceId']['FieldValue'];
227
+ }
228
+
229
+ /**
230
+ * Sets the value of the CreditReversalReferenceId property.
231
+ *
232
+ * @param string CreditReversalReferenceId
233
+ * @return this instance
234
+ */
235
+ public function setCreditReversalReferenceId($value)
236
+ {
237
+ $this->_fields['CreditReversalReferenceId']['FieldValue'] = $value;
238
+ return $this;
239
+ }
240
+
241
+ /**
242
+ * Sets the value of the CreditReversalReferenceId and returns this instance
243
+ *
244
+ * @param string $value CreditReversalReferenceId
245
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
246
+ */
247
+ public function withCreditReversalReferenceId($value)
248
+ {
249
+ $this->setCreditReversalReferenceId($value);
250
+ return $this;
251
+ }
252
+
253
+
254
+ /**
255
+ * Checks if CreditReversalReferenceId is set
256
+ *
257
+ * @return bool true if CreditReversalReferenceId is set
258
+ */
259
+ public function isSetCreditReversalReferenceId()
260
+ {
261
+ return !is_null($this->_fields['CreditReversalReferenceId']['FieldValue']);
262
+ }
263
+
264
+ /**
265
+ * Gets the value of the CreditReversalAmount.
266
+ *
267
+ * @return Price CreditReversalAmount
268
+ */
269
+ public function getCreditReversalAmount()
270
+ {
271
+ return $this->_fields['CreditReversalAmount']['FieldValue'];
272
+ }
273
+
274
+ /**
275
+ * Sets the value of the CreditReversalAmount.
276
+ *
277
+ * @param Price CreditReversalAmount
278
+ * @return void
279
+ */
280
+ public function setCreditReversalAmount($value)
281
+ {
282
+ $this->_fields['CreditReversalAmount']['FieldValue'] = $value;
283
+ return;
284
+ }
285
+
286
+ /**
287
+ * Sets the value of the CreditReversalAmount and returns this instance
288
+ *
289
+ * @param Price $value CreditReversalAmount
290
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
291
+ */
292
+ public function withCreditReversalAmount($value)
293
+ {
294
+ $this->setCreditReversalAmount($value);
295
+ return $this;
296
+ }
297
+
298
+
299
+ /**
300
+ * Checks if CreditReversalAmount is set
301
+ *
302
+ * @return bool true if CreditReversalAmount property is set
303
+ */
304
+ public function isSetCreditReversalAmount()
305
+ {
306
+ return !is_null($this->_fields['CreditReversalAmount']['FieldValue']);
307
+
308
+ }
309
+
310
+ /**
311
+ * Gets the value of the CreationTimestamp property.
312
+ *
313
+ * @return string CreationTimestamp
314
+ */
315
+ public function getCreationTimestamp()
316
+ {
317
+ return $this->_fields['CreationTimestamp']['FieldValue'];
318
+ }
319
+
320
+ /**
321
+ * Sets the value of the CreationTimestamp property.
322
+ *
323
+ * @param string CreationTimestamp
324
+ * @return this instance
325
+ */
326
+ public function setCreationTimestamp($value)
327
+ {
328
+ $this->_fields['CreationTimestamp']['FieldValue'] = $value;
329
+ return $this;
330
+ }
331
+
332
+ /**
333
+ * Sets the value of the CreationTimestamp and returns this instance
334
+ *
335
+ * @param string $value CreationTimestamp
336
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
337
+ */
338
+ public function withCreationTimestamp($value)
339
+ {
340
+ $this->setCreationTimestamp($value);
341
+ return $this;
342
+ }
343
+
344
+
345
+ /**
346
+ * Checks if CreationTimestamp is set
347
+ *
348
+ * @return bool true if CreationTimestamp is set
349
+ */
350
+ public function isSetCreationTimestamp()
351
+ {
352
+ return !is_null($this->_fields['CreationTimestamp']['FieldValue']);
353
+ }
354
+
355
+ /**
356
+ * Gets the value of the CreditReversalStatus.
357
+ *
358
+ * @return Status CreditReversalStatus
359
+ */
360
+ public function getCreditReversalStatus()
361
+ {
362
+ return $this->_fields['CreditReversalStatus']['FieldValue'];
363
+ }
364
+
365
+ /**
366
+ * Sets the value of the CreditReversalStatus.
367
+ *
368
+ * @param Status CreditReversalStatus
369
+ * @return void
370
+ */
371
+ public function setCreditReversalStatus($value)
372
+ {
373
+ $this->_fields['CreditReversalStatus']['FieldValue'] = $value;
374
+ return;
375
+ }
376
+
377
+ /**
378
+ * Sets the value of the CreditReversalStatus and returns this instance
379
+ *
380
+ * @param Status $value CreditReversalStatus
381
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
382
+ */
383
+ public function withCreditReversalStatus($value)
384
+ {
385
+ $this->setCreditReversalStatus($value);
386
+ return $this;
387
+ }
388
+
389
+
390
+ /**
391
+ * Checks if CreditReversalStatus is set
392
+ *
393
+ * @return bool true if CreditReversalStatus property is set
394
+ */
395
+ public function isSetCreditReversalStatus()
396
+ {
397
+ return !is_null($this->_fields['CreditReversalStatus']['FieldValue']);
398
+
399
+ }
400
+
401
+ /**
402
+ * Gets the value of the CreditReversalNote property.
403
+ *
404
+ * @return string CreditReversalNote
405
+ */
406
+ public function getCreditReversalNote()
407
+ {
408
+ return $this->_fields['CreditReversalNote']['FieldValue'];
409
+ }
410
+
411
+ /**
412
+ * Sets the value of the CreditReversalNote property.
413
+ *
414
+ * @param string CreditReversalNote
415
+ * @return this instance
416
+ */
417
+ public function setCreditReversalNote($value)
418
+ {
419
+ $this->_fields['CreditReversalNote']['FieldValue'] = $value;
420
+ return $this;
421
+ }
422
+
423
+ /**
424
+ * Sets the value of the CreditReversalNote and returns this instance
425
+ *
426
+ * @param string $value CreditReversalNote
427
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalDetails instance
428
+ */
429
+ public function withCreditReversalNote($value)
430
+ {
431
+ $this->setCreditReversalNote($value);
432
+ return $this;
433
+ }
434
+
435
+
436
+ /**
437
+ * Checks if CreditReversalNote is set
438
+ *
439
+ * @return bool true if CreditReversalNote is set
440
+ */
441
+ public function isSetCreditReversalNote()
442
+ {
443
+ return !is_null($this->_fields['CreditReversalNote']['FieldValue']);
444
+ }
445
+
446
+
447
+
448
+
449
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditReversalList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditReversalList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditReversal</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_ProviderCreditReversalList extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditReversalList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditReversal</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+ 'member' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_ProviderCreditReversal')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the member.
61
+ *
62
+ * @return array of ProviderCreditReversal member
63
+ */
64
+ public function getmember()
65
+ {
66
+ return $this->_fields['member']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the member.
71
+ *
72
+ * @param mixed ProviderCreditReversal or an array of ProviderCreditReversal member
73
+ * @return this instance
74
+ */
75
+ public function setmember($member)
76
+ {
77
+ if (!$this->_isNumericArray($member)) {
78
+ $member = array ($member);
79
+ }
80
+ $this->_fields['member']['FieldValue'] = $member;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of member list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withmember($member1, $member2)</code>
89
+ *
90
+ * @param ProviderCreditReversal $providerCreditReversalArgs one or more member
91
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalList instance
92
+ */
93
+ public function withmember($providerCreditReversalArgs)
94
+ {
95
+ foreach (func_get_args() as $member) {
96
+ $this->_fields['member']['FieldValue'][] = $member;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if member list is non-empty
105
+ *
106
+ * @return bool true if member list is non-empty
107
+ */
108
+ public function isSetmember()
109
+ {
110
+ return count ($this->_fields['member']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditReversalSummary.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditReversalSummary
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderId: string</li>
33
+ * <li>ProviderCreditReversalId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_ProviderCreditReversalSummary extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditReversalSummary
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderId: string</li>
49
+ * <li>ProviderCreditReversalId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'ProviderCreditReversalId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the ProviderId property.
64
+ *
65
+ * @return string ProviderId
66
+ */
67
+ public function getProviderId()
68
+ {
69
+ return $this->_fields['ProviderId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the ProviderId property.
74
+ *
75
+ * @param string ProviderId
76
+ * @return this instance
77
+ */
78
+ public function setProviderId($value)
79
+ {
80
+ $this->_fields['ProviderId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the ProviderId and returns this instance
86
+ *
87
+ * @param string $value ProviderId
88
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalSummary instance
89
+ */
90
+ public function withProviderId($value)
91
+ {
92
+ $this->setProviderId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if ProviderId is set
99
+ *
100
+ * @return bool true if ProviderId is set
101
+ */
102
+ public function isSetProviderId()
103
+ {
104
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the ProviderCreditReversalId property.
109
+ *
110
+ * @return string ProviderCreditReversalId
111
+ */
112
+ public function getProviderCreditReversalId()
113
+ {
114
+ return $this->_fields['ProviderCreditReversalId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the ProviderCreditReversalId property.
119
+ *
120
+ * @param string ProviderCreditReversalId
121
+ * @return this instance
122
+ */
123
+ public function setProviderCreditReversalId($value)
124
+ {
125
+ $this->_fields['ProviderCreditReversalId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the ProviderCreditReversalId and returns this instance
131
+ *
132
+ * @param string $value ProviderCreditReversalId
133
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalSummary instance
134
+ */
135
+ public function withProviderCreditReversalId($value)
136
+ {
137
+ $this->setProviderCreditReversalId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if ProviderCreditReversalId is set
144
+ *
145
+ * @return bool true if ProviderCreditReversalId is set
146
+ */
147
+ public function isSetProviderCreditReversalId()
148
+ {
149
+ return !is_null($this->_fields['ProviderCreditReversalId']['FieldValue']);
150
+ }
151
+
152
+
153
+
154
+
155
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditReversalSummaryList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditReversalSummaryList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditReversalSummary</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_ProviderCreditReversalSummaryList extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditReversalSummaryList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditReversalSummary</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+ 'member' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_ProviderCreditReversalSummary')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the member.
61
+ *
62
+ * @return array of ProviderCreditReversalSummary member
63
+ */
64
+ public function getmember()
65
+ {
66
+ return $this->_fields['member']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the member.
71
+ *
72
+ * @param mixed ProviderCreditReversalSummary or an array of ProviderCreditReversalSummary member
73
+ * @return this instance
74
+ */
75
+ public function setmember($member)
76
+ {
77
+ if (!$this->_isNumericArray($member)) {
78
+ $member = array ($member);
79
+ }
80
+ $this->_fields['member']['FieldValue'] = $member;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of member list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withmember($member1, $member2)</code>
89
+ *
90
+ * @param ProviderCreditReversalSummary $providerCreditReversalSummaryArgs one or more member
91
+ * @return OffAmazonPaymentsService_Model_ProviderCreditReversalSummaryList instance
92
+ */
93
+ public function withmember($providerCreditReversalSummaryArgs)
94
+ {
95
+ foreach (func_get_args() as $member) {
96
+ $this->_fields['member']['FieldValue'][] = $member;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if member list is non-empty
105
+ *
106
+ * @return bool true if member list is non-empty
107
+ */
108
+ public function isSetmember()
109
+ {
110
+ return count ($this->_fields['member']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditSummary.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditSummary
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderId: string</li>
33
+ * <li>ProviderCreditId: string</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_ProviderCreditSummary extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditSummary
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ProviderId: string</li>
49
+ * <li>ProviderCreditId: string</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+ 'ProviderId' => array('FieldValue' => null, 'FieldType' => 'string'),
57
+ 'ProviderCreditId' => array('FieldValue' => null, 'FieldType' => 'string'),
58
+ );
59
+ parent::__construct($data);
60
+ }
61
+
62
+ /**
63
+ * Gets the value of the ProviderId property.
64
+ *
65
+ * @return string ProviderId
66
+ */
67
+ public function getProviderId()
68
+ {
69
+ return $this->_fields['ProviderId']['FieldValue'];
70
+ }
71
+
72
+ /**
73
+ * Sets the value of the ProviderId property.
74
+ *
75
+ * @param string ProviderId
76
+ * @return this instance
77
+ */
78
+ public function setProviderId($value)
79
+ {
80
+ $this->_fields['ProviderId']['FieldValue'] = $value;
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets the value of the ProviderId and returns this instance
86
+ *
87
+ * @param string $value ProviderId
88
+ * @return OffAmazonPaymentsService_Model_ProviderCreditSummary instance
89
+ */
90
+ public function withProviderId($value)
91
+ {
92
+ $this->setProviderId($value);
93
+ return $this;
94
+ }
95
+
96
+
97
+ /**
98
+ * Checks if ProviderId is set
99
+ *
100
+ * @return bool true if ProviderId is set
101
+ */
102
+ public function isSetProviderId()
103
+ {
104
+ return !is_null($this->_fields['ProviderId']['FieldValue']);
105
+ }
106
+
107
+ /**
108
+ * Gets the value of the ProviderCreditId property.
109
+ *
110
+ * @return string ProviderCreditId
111
+ */
112
+ public function getProviderCreditId()
113
+ {
114
+ return $this->_fields['ProviderCreditId']['FieldValue'];
115
+ }
116
+
117
+ /**
118
+ * Sets the value of the ProviderCreditId property.
119
+ *
120
+ * @param string ProviderCreditId
121
+ * @return this instance
122
+ */
123
+ public function setProviderCreditId($value)
124
+ {
125
+ $this->_fields['ProviderCreditId']['FieldValue'] = $value;
126
+ return $this;
127
+ }
128
+
129
+ /**
130
+ * Sets the value of the ProviderCreditId and returns this instance
131
+ *
132
+ * @param string $value ProviderCreditId
133
+ * @return OffAmazonPaymentsService_Model_ProviderCreditSummary instance
134
+ */
135
+ public function withProviderCreditId($value)
136
+ {
137
+ $this->setProviderCreditId($value);
138
+ return $this;
139
+ }
140
+
141
+
142
+ /**
143
+ * Checks if ProviderCreditId is set
144
+ *
145
+ * @return bool true if ProviderCreditId is set
146
+ */
147
+ public function isSetProviderCreditId()
148
+ {
149
+ return !is_null($this->_fields['ProviderCreditId']['FieldValue']);
150
+ }
151
+
152
+
153
+
154
+
155
+ }
lib/OffAmazonPaymentsService/Model/ProviderCreditSummaryList.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ProviderCreditSummaryList
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditSummary</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_ProviderCreditSummaryList extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_ProviderCreditSummaryList
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>member: OffAmazonPaymentsService_Model_ProviderCreditSummary</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+ 'member' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_ProviderCreditSummary')),
55
+ );
56
+ parent::__construct($data);
57
+ }
58
+
59
+ /**
60
+ * Gets the value of the member.
61
+ *
62
+ * @return array of ProviderCreditSummary member
63
+ */
64
+ public function getmember()
65
+ {
66
+ return $this->_fields['member']['FieldValue'];
67
+ }
68
+
69
+ /**
70
+ * Sets the value of the member.
71
+ *
72
+ * @param mixed ProviderCreditSummary or an array of ProviderCreditSummary member
73
+ * @return this instance
74
+ */
75
+ public function setmember($member)
76
+ {
77
+ if (!$this->_isNumericArray($member)) {
78
+ $member = array ($member);
79
+ }
80
+ $this->_fields['member']['FieldValue'] = $member;
81
+ return $this;
82
+ }
83
+
84
+
85
+ /**
86
+ * Sets single or multiple values of member list via variable number of arguments.
87
+ * For example, to set the list with two elements, simply pass two values as arguments to this function
88
+ * <code>withmember($member1, $member2)</code>
89
+ *
90
+ * @param ProviderCreditSummary $providerCreditSummaryArgs one or more member
91
+ * @return OffAmazonPaymentsService_Model_ProviderCreditSummaryList instance
92
+ */
93
+ public function withmember($providerCreditSummaryArgs)
94
+ {
95
+ foreach (func_get_args() as $member) {
96
+ $this->_fields['member']['FieldValue'][] = $member;
97
+ }
98
+ return $this;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Checks if member list is non-empty
105
+ *
106
+ * @return bool true if member list is non-empty
107
+ */
108
+ public function isSetmember()
109
+ {
110
+ return count ($this->_fields['member']['FieldValue']) > 0;
111
+ }
112
+
113
+
114
+
115
+
116
+ }
lib/OffAmazonPaymentsService/Model/RefundDetails.php CHANGED
@@ -82,6 +82,8 @@ class OffAmazonPaymentsService_Model_RefundDetails extends OffAmazonPaymentsServ
82
  'RefundStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
83
 
84
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
 
85
  );
86
  parent::__construct($data);
87
  }
@@ -494,8 +496,51 @@ class OffAmazonPaymentsService_Model_RefundDetails extends OffAmazonPaymentsServ
494
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
495
  }
496
 
497
-
498
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
 
500
  }
501
  ?>
82
  'RefundStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'),
83
 
84
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
85
+
86
+ 'ProviderCreditReversalSummaryList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditReversalSummaryList'),
87
  );
88
  parent::__construct($data);
89
  }
496
  return !is_null($this->_fields['SoftDescriptor']['FieldValue']);
497
  }
498
 
499
+ /**
500
+ * Gets the value of the ProviderCreditReversalSummaryList.
501
+ *
502
+ * @return ProviderCreditReversalSummaryList ProviderCreditReversalSummaryList
503
+ */
504
+ public function getProviderCreditReversalSummaryList()
505
+ {
506
+ return $this->_fields['ProviderCreditReversalSummaryList']['FieldValue'];
507
+ }
508
+
509
+ /**
510
+ * Sets the value of the ProviderCreditReversalSummaryList.
511
+ *
512
+ * @param ProviderCreditReversalSummaryList ProviderCreditReversalSummaryList
513
+ * @return void
514
+ */
515
+ public function setProviderCreditReversalSummaryList($value)
516
+ {
517
+ $this->_fields['ProviderCreditReversalSummaryList']['FieldValue'] = $value;
518
+ return;
519
+ }
520
+
521
+ /**
522
+ * Sets the value of the ProviderCreditReversalSummaryList and returns this instance
523
+ *
524
+ * @param ProviderCreditReversalSummaryList $value ProviderCreditReversalSummaryList
525
+ * @return OffAmazonPaymentsService_Model_RefundDetails instance
526
+ */
527
+ public function withProviderCreditReversalSummaryList($value)
528
+ {
529
+ $this->setProviderCreditReversalSummaryList($value);
530
+ return $this;
531
+ }
532
+
533
+
534
+ /**
535
+ * Checks if ProviderCreditReversalSummaryList is set
536
+ *
537
+ * @return bool true if ProviderCreditReversalSummaryList property is set
538
+ */
539
+ public function isSetProviderCreditReversalSummaryList()
540
+ {
541
+ return !is_null($this->_fields['ProviderCreditReversalSummaryList']['FieldValue']);
542
+
543
+ }
544
 
545
  }
546
  ?>
lib/OffAmazonPaymentsService/Model/RefundRequest.php CHANGED
@@ -69,6 +69,7 @@ class OffAmazonPaymentsService_Model_RefundRequest extends OffAmazonPaymentsServ
69
 
70
  'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'),
71
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
 
72
  );
73
  parent::__construct($data);
74
  }
@@ -346,6 +347,51 @@ class OffAmazonPaymentsService_Model_RefundRequest extends OffAmazonPaymentsServ
346
 
347
 
348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
 
350
  }
351
  ?>
69
 
70
  'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'),
71
  'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'),
72
+ 'ProviderCreditReversalList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditReversalList'),
73
  );
74
  parent::__construct($data);
75
  }
347
 
348
 
349
 
350
+ /**
351
+ * Gets the value of the ProviderCreditReversalList.
352
+ *
353
+ * @return ProviderCreditReversalList ProviderCreditReversalList
354
+ */
355
+ public function getProviderCreditReversalList()
356
+ {
357
+ return $this->_fields['ProviderCreditReversalList']['FieldValue'];
358
+ }
359
+
360
+ /**
361
+ * Sets the value of the ProviderCreditReversalList.
362
+ *
363
+ * @param ProviderCreditReversalList ProviderCreditReversalList
364
+ * @return void
365
+ */
366
+ public function setProviderCreditReversalList($value)
367
+ {
368
+ $this->_fields['ProviderCreditReversalList']['FieldValue'] = $value;
369
+ return;
370
+ }
371
+
372
+ /**
373
+ * Sets the value of the ProviderCreditReversalList and returns this instance
374
+ *
375
+ * @param ProviderCreditReversalList $value ProviderCreditReversalList
376
+ * @return OffAmazonPaymentsService_Model_RefundRequest instance
377
+ */
378
+ public function withProviderCreditReversalList($value)
379
+ {
380
+ $this->setProviderCreditReversalList($value);
381
+ return $this;
382
+ }
383
+
384
+
385
+ /**
386
+ * Checks if ProviderCreditReversalList is set
387
+ *
388
+ * @return bool true if ProviderCreditReversalList property is set
389
+ */
390
+ public function isSetProviderCreditReversalList()
391
+ {
392
+ return !is_null($this->_fields['ProviderCreditReversalList']['FieldValue']);
393
+
394
+ }
395
 
396
  }
397
  ?>
lib/OffAmazonPaymentsService/Model/ReverseProviderCreditRequest.php ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ReverseProviderCreditRequest
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>SellerId: string</li>
33
+ * <li>AmazonProviderCreditId: string</li>
34
+ * <li>CreditReversalReferenceId: string</li>
35
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
36
+ * <li>CreditReversalNote: string</li>
37
+ *
38
+ * </ul>
39
+ */
40
+ class OffAmazonPaymentsService_Model_ReverseProviderCreditRequest extends OffAmazonPaymentsService_Model
41
+ {
42
+
43
+ /**
44
+ * Construct new OffAmazonPaymentsService_Model_ReverseProviderCreditRequest
45
+ *
46
+ * @param mixed $data DOMElement or Associative Array to construct from.
47
+ *
48
+ * Valid properties:
49
+ * <ul>
50
+ *
51
+ * <li>SellerId: string</li>
52
+ * <li>AmazonProviderCreditId: string</li>
53
+ * <li>CreditReversalReferenceId: string</li>
54
+ * <li>CreditReversalAmount: OffAmazonPaymentsService_Model_Price</li>
55
+ * <li>CreditReversalNote: string</li>
56
+ *
57
+ * </ul>
58
+ */
59
+ public function __construct($data = null)
60
+ {
61
+ $this->_fields = array (
62
+ 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'),
63
+ 'AmazonProviderCreditId' => array('FieldValue' => null, 'FieldType' => 'string'),
64
+ 'CreditReversalReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'),
65
+
66
+ 'CreditReversalAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'),
67
+
68
+ 'CreditReversalNote' => array('FieldValue' => null, 'FieldType' => 'string'),
69
+ );
70
+ parent::__construct($data);
71
+ }
72
+
73
+ /**
74
+ * Gets the value of the SellerId property.
75
+ *
76
+ * @return string SellerId
77
+ */
78
+ public function getSellerId()
79
+ {
80
+ return $this->_fields['SellerId']['FieldValue'];
81
+ }
82
+
83
+ /**
84
+ * Sets the value of the SellerId property.
85
+ *
86
+ * @param string SellerId
87
+ * @return this instance
88
+ */
89
+ public function setSellerId($value)
90
+ {
91
+ $this->_fields['SellerId']['FieldValue'] = $value;
92
+ return $this;
93
+ }
94
+
95
+ /**
96
+ * Sets the value of the SellerId and returns this instance
97
+ *
98
+ * @param string $value SellerId
99
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditRequest instance
100
+ */
101
+ public function withSellerId($value)
102
+ {
103
+ $this->setSellerId($value);
104
+ return $this;
105
+ }
106
+
107
+
108
+ /**
109
+ * Checks if SellerId is set
110
+ *
111
+ * @return bool true if SellerId is set
112
+ */
113
+ public function isSetSellerId()
114
+ {
115
+ return !is_null($this->_fields['SellerId']['FieldValue']);
116
+ }
117
+
118
+ /**
119
+ * Gets the value of the AmazonProviderCreditId property.
120
+ *
121
+ * @return string AmazonProviderCreditId
122
+ */
123
+ public function getAmazonProviderCreditId()
124
+ {
125
+ return $this->_fields['AmazonProviderCreditId']['FieldValue'];
126
+ }
127
+
128
+ /**
129
+ * Sets the value of the AmazonProviderCreditId property.
130
+ *
131
+ * @param string AmazonProviderCreditId
132
+ * @return this instance
133
+ */
134
+ public function setAmazonProviderCreditId($value)
135
+ {
136
+ $this->_fields['AmazonProviderCreditId']['FieldValue'] = $value;
137
+ return $this;
138
+ }
139
+
140
+ /**
141
+ * Sets the value of the AmazonProviderCreditId and returns this instance
142
+ *
143
+ * @param string $value AmazonProviderCreditId
144
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditRequest instance
145
+ */
146
+ public function withAmazonProviderCreditId($value)
147
+ {
148
+ $this->setAmazonProviderCreditId($value);
149
+ return $this;
150
+ }
151
+
152
+
153
+ /**
154
+ * Checks if AmazonProviderCreditId is set
155
+ *
156
+ * @return bool true if AmazonProviderCreditId is set
157
+ */
158
+ public function isSetAmazonProviderCreditId()
159
+ {
160
+ return !is_null($this->_fields['AmazonProviderCreditId']['FieldValue']);
161
+ }
162
+
163
+ /**
164
+ * Gets the value of the CreditReversalReferenceId property.
165
+ *
166
+ * @return string CreditReversalReferenceId
167
+ */
168
+ public function getCreditReversalReferenceId()
169
+ {
170
+ return $this->_fields['CreditReversalReferenceId']['FieldValue'];
171
+ }
172
+
173
+ /**
174
+ * Sets the value of the CreditReversalReferenceId property.
175
+ *
176
+ * @param string CreditReversalReferenceId
177
+ * @return this instance
178
+ */
179
+ public function setCreditReversalReferenceId($value)
180
+ {
181
+ $this->_fields['CreditReversalReferenceId']['FieldValue'] = $value;
182
+ return $this;
183
+ }
184
+
185
+ /**
186
+ * Sets the value of the CreditReversalReferenceId and returns this instance
187
+ *
188
+ * @param string $value CreditReversalReferenceId
189
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditRequest instance
190
+ */
191
+ public function withCreditReversalReferenceId($value)
192
+ {
193
+ $this->setCreditReversalReferenceId($value);
194
+ return $this;
195
+ }
196
+
197
+
198
+ /**
199
+ * Checks if CreditReversalReferenceId is set
200
+ *
201
+ * @return bool true if CreditReversalReferenceId is set
202
+ */
203
+ public function isSetCreditReversalReferenceId()
204
+ {
205
+ return !is_null($this->_fields['CreditReversalReferenceId']['FieldValue']);
206
+ }
207
+
208
+ /**
209
+ * Gets the value of the CreditReversalAmount.
210
+ *
211
+ * @return Price CreditReversalAmount
212
+ */
213
+ public function getCreditReversalAmount()
214
+ {
215
+ return $this->_fields['CreditReversalAmount']['FieldValue'];
216
+ }
217
+
218
+ /**
219
+ * Sets the value of the CreditReversalAmount.
220
+ *
221
+ * @param Price CreditReversalAmount
222
+ * @return void
223
+ */
224
+ public function setCreditReversalAmount($value)
225
+ {
226
+ $this->_fields['CreditReversalAmount']['FieldValue'] = $value;
227
+ return;
228
+ }
229
+
230
+ /**
231
+ * Sets the value of the CreditReversalAmount and returns this instance
232
+ *
233
+ * @param Price $value CreditReversalAmount
234
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditRequest instance
235
+ */
236
+ public function withCreditReversalAmount($value)
237
+ {
238
+ $this->setCreditReversalAmount($value);
239
+ return $this;
240
+ }
241
+
242
+
243
+ /**
244
+ * Checks if CreditReversalAmount is set
245
+ *
246
+ * @return bool true if CreditReversalAmount property is set
247
+ */
248
+ public function isSetCreditReversalAmount()
249
+ {
250
+ return !is_null($this->_fields['CreditReversalAmount']['FieldValue']);
251
+
252
+ }
253
+
254
+ /**
255
+ * Gets the value of the CreditReversalNote property.
256
+ *
257
+ * @return string CreditReversalNote
258
+ */
259
+ public function getCreditReversalNote()
260
+ {
261
+ return $this->_fields['CreditReversalNote']['FieldValue'];
262
+ }
263
+
264
+ /**
265
+ * Sets the value of the CreditReversalNote property.
266
+ *
267
+ * @param string CreditReversalNote
268
+ * @return this instance
269
+ */
270
+ public function setCreditReversalNote($value)
271
+ {
272
+ $this->_fields['CreditReversalNote']['FieldValue'] = $value;
273
+ return $this;
274
+ }
275
+
276
+ /**
277
+ * Sets the value of the CreditReversalNote and returns this instance
278
+ *
279
+ * @param string $value CreditReversalNote
280
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditRequest instance
281
+ */
282
+ public function withCreditReversalNote($value)
283
+ {
284
+ $this->setCreditReversalNote($value);
285
+ return $this;
286
+ }
287
+
288
+
289
+ /**
290
+ * Checks if CreditReversalNote is set
291
+ *
292
+ * @return bool true if CreditReversalNote is set
293
+ */
294
+ public function isSetCreditReversalNote()
295
+ {
296
+ return !is_null($this->_fields['CreditReversalNote']['FieldValue']);
297
+ }
298
+
299
+
300
+
301
+
302
+ }
lib/OffAmazonPaymentsService/Model/ReverseProviderCreditResponse.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ReverseProviderCreditResponse
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ReverseProviderCreditResult: OffAmazonPaymentsService_Model_ReverseProviderCreditResult</li>
33
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
34
+ *
35
+ * </ul>
36
+ */
37
+ class OffAmazonPaymentsService_Model_ReverseProviderCreditResponse extends OffAmazonPaymentsService_Model
38
+ {
39
+
40
+ /**
41
+ * Construct new OffAmazonPaymentsService_Model_ReverseProviderCreditResponse
42
+ *
43
+ * @param mixed $data DOMElement or Associative Array to construct from.
44
+ *
45
+ * Valid properties:
46
+ * <ul>
47
+ *
48
+ * <li>ReverseProviderCreditResult: OffAmazonPaymentsService_Model_ReverseProviderCreditResult</li>
49
+ * <li>ResponseMetadata: OffAmazonPaymentsService_Model_ResponseMetadata</li>
50
+ *
51
+ * </ul>
52
+ */
53
+ public function __construct($data = null)
54
+ {
55
+ $this->_fields = array (
56
+
57
+ 'ReverseProviderCreditResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ReverseProviderCreditResult'),
58
+
59
+
60
+ 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'),
61
+
62
+ );
63
+ parent::__construct($data);
64
+ }
65
+
66
+
67
+ /**
68
+ * Construct OffAmazonPaymentsService_Model_ReverseProviderCreditResponse from XML string
69
+ *
70
+ * @param string $xml XML string to construct from
71
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResponse
72
+ */
73
+ public static function fromXML($xml)
74
+ {
75
+ $dom = new DOMDocument();
76
+ $dom->loadXML($xml);
77
+ $xpath = new DOMXPath($dom);
78
+ $xpath->registerNamespace('a', 'http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01');
79
+ $response = $xpath->query('//a:ReverseProviderCreditResponse');
80
+ if ($response->length == 1) {
81
+ return new OffAmazonPaymentsService_Model_ReverseProviderCreditResponse(($response->item(0)));
82
+ } else {
83
+ throw new Exception ("Unable to construct OffAmazonPaymentsService_Model_ReverseProviderCreditResponse from provided XML.
84
+ Make sure that ReverseProviderCreditResponse is a root element");
85
+ }
86
+
87
+ }
88
+
89
+ /**
90
+ * Gets the value of the ReverseProviderCreditResult.
91
+ *
92
+ * @return ReverseProviderCreditResult ReverseProviderCreditResult
93
+ */
94
+ public function getReverseProviderCreditResult()
95
+ {
96
+ return $this->_fields['ReverseProviderCreditResult']['FieldValue'];
97
+ }
98
+
99
+ /**
100
+ * Sets the value of the ReverseProviderCreditResult.
101
+ *
102
+ * @param ReverseProviderCreditResult ReverseProviderCreditResult
103
+ * @return void
104
+ */
105
+ public function setReverseProviderCreditResult($value)
106
+ {
107
+ $this->_fields['ReverseProviderCreditResult']['FieldValue'] = $value;
108
+ return;
109
+ }
110
+
111
+ /**
112
+ * Sets the value of the ReverseProviderCreditResult and returns this instance
113
+ *
114
+ * @param ReverseProviderCreditResult $value ReverseProviderCreditResult
115
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResponse instance
116
+ */
117
+ public function withReverseProviderCreditResult($value)
118
+ {
119
+ $this->setReverseProviderCreditResult($value);
120
+ return $this;
121
+ }
122
+
123
+
124
+ /**
125
+ * Checks if ReverseProviderCreditResult is set
126
+ *
127
+ * @return bool true if ReverseProviderCreditResult property is set
128
+ */
129
+ public function isSetReverseProviderCreditResult()
130
+ {
131
+ return !is_null($this->_fields['ReverseProviderCreditResult']['FieldValue']);
132
+
133
+ }
134
+
135
+ /**
136
+ * Gets the value of the ResponseMetadata.
137
+ *
138
+ * @return ResponseMetadata ResponseMetadata
139
+ */
140
+ public function getResponseMetadata()
141
+ {
142
+ return $this->_fields['ResponseMetadata']['FieldValue'];
143
+ }
144
+
145
+ /**
146
+ * Sets the value of the ResponseMetadata.
147
+ *
148
+ * @param ResponseMetadata ResponseMetadata
149
+ * @return void
150
+ */
151
+ public function setResponseMetadata($value)
152
+ {
153
+ $this->_fields['ResponseMetadata']['FieldValue'] = $value;
154
+ return;
155
+ }
156
+
157
+ /**
158
+ * Sets the value of the ResponseMetadata and returns this instance
159
+ *
160
+ * @param ResponseMetadata $value ResponseMetadata
161
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResponse instance
162
+ */
163
+ public function withResponseMetadata($value)
164
+ {
165
+ $this->setResponseMetadata($value);
166
+ return $this;
167
+ }
168
+
169
+
170
+ /**
171
+ * Checks if ResponseMetadata is set
172
+ *
173
+ * @return bool true if ResponseMetadata property is set
174
+ */
175
+ public function isSetResponseMetadata()
176
+ {
177
+ return !is_null($this->_fields['ResponseMetadata']['FieldValue']);
178
+
179
+ }
180
+
181
+
182
+
183
+ /**
184
+ * XML Representation for this object
185
+ *
186
+ * @return string XML for this object
187
+ */
188
+ public function toXML()
189
+ {
190
+ $xml = "";
191
+ $xml .= "<ReverseProviderCreditResponse xmlns=\"http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01\">";
192
+ $xml .= $this->_toXMLFragment();
193
+ $xml .= "</ReverseProviderCreditResponse>";
194
+ return $xml;
195
+ }
196
+
197
+ private $_responseHeaderMetadata = null;
198
+
199
+ public function getResponseHeaderMetadata() {
200
+ return $this->_responseHeaderMetadata;
201
+ }
202
+
203
+ public function setResponseHeaderMetadata($responseHeaderMetadata) {
204
+ return $this->_responseHeaderMetadata = $responseHeaderMetadata;
205
+ }
206
+
207
+ }
lib/OffAmazonPaymentsService/Model/ReverseProviderCreditResult.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*******************************************************************************
4
+ * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ *
7
+ * You may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at:
9
+ * http://aws.amazon.com/apache2.0
10
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ * CONDITIONS OF ANY KIND, either express or implied. See the License
12
+ * for the
13
+ * specific language governing permissions and limitations under the
14
+ * License.
15
+ * *****************************************************************************
16
+ */
17
+
18
+
19
+ /**
20
+ * @see OffAmazonPaymentsService_Model
21
+ */
22
+ require_once 'OffAmazonPaymentsService/Model.php';
23
+
24
+
25
+
26
+ /**
27
+ * OffAmazonPaymentsService_Model_ReverseProviderCreditResult
28
+ *
29
+ * Properties:
30
+ * <ul>
31
+ *
32
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsService_Model_ProviderCreditReversalDetails</li>
33
+ *
34
+ * </ul>
35
+ */
36
+ class OffAmazonPaymentsService_Model_ReverseProviderCreditResult extends OffAmazonPaymentsService_Model
37
+ {
38
+
39
+ /**
40
+ * Construct new OffAmazonPaymentsService_Model_ReverseProviderCreditResult
41
+ *
42
+ * @param mixed $data DOMElement or Associative Array to construct from.
43
+ *
44
+ * Valid properties:
45
+ * <ul>
46
+ *
47
+ * <li>ProviderCreditReversalDetails: OffAmazonPaymentsService_Model_ProviderCreditReversalDetails</li>
48
+ *
49
+ * </ul>
50
+ */
51
+ public function __construct($data = null)
52
+ {
53
+ $this->_fields = array (
54
+
55
+ 'ProviderCreditReversalDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ProviderCreditReversalDetails'),
56
+
57
+ );
58
+ parent::__construct($data);
59
+ }
60
+
61
+ /**
62
+ * Gets the value of the ProviderCreditReversalDetails.
63
+ *
64
+ * @return ProviderCreditReversalDetails ProviderCreditReversalDetails
65
+ */
66
+ public function getProviderCreditReversalDetails()
67
+ {
68
+ return $this->_fields['ProviderCreditReversalDetails']['FieldValue'];
69
+ }
70
+
71
+ /**
72
+ * Sets the value of the ProviderCreditReversalDetails.
73
+ *
74
+ * @param ProviderCreditReversalDetails ProviderCreditReversalDetails
75
+ * @return void
76
+ */
77
+ public function setProviderCreditReversalDetails($value)
78
+ {
79
+ $this->_fields['ProviderCreditReversalDetails']['FieldValue'] = $value;
80
+ return;
81
+ }
82
+
83
+ /**
84
+ * Sets the value of the ProviderCreditReversalDetails and returns this instance
85
+ *
86
+ * @param ProviderCreditReversalDetails $value ProviderCreditReversalDetails
87
+ * @return OffAmazonPaymentsService_Model_ReverseProviderCreditResult instance
88
+ */
89
+ public function withProviderCreditReversalDetails($value)
90
+ {
91
+ $this->setProviderCreditReversalDetails($value);
92
+ return $this;
93
+ }
94
+
95
+
96
+ /**
97
+ * Checks if ProviderCreditReversalDetails is set
98
+ *
99
+ * @return bool true if ProviderCreditReversalDetails property is set
100
+ */
101
+ public function isSetProviderCreditReversalDetails()
102
+ {
103
+ return !is_null($this->_fields['ProviderCreditReversalDetails']['FieldValue']);
104
+
105
+ }
106
+
107
+
108
+
109
+
110
+ }
lib/OffAmazonPaymentsService/RegionSpecificProperties.php CHANGED
@@ -52,7 +52,7 @@ class OffAmazonPaymentsService_RegionSpecificProperties
52
  'us' => 'na'
53
  );
54
 
55
- const WIDGET_FORMAT_STRING = '%s/OffAmazonPayments/%s%s/js/Widgets.js?sellerId=%s';
56
  const SERVICE_FORMAT_STRING = '%s/OffAmazonPayments%s/%s';
57
 
58
  /**
@@ -70,8 +70,7 @@ class OffAmazonPaymentsService_RegionSpecificProperties
70
  return sprintf(self::WIDGET_FORMAT_STRING,
71
  $this->_getWidgetHostFor($region, $overrideUrl),
72
  $this->_getWidgetRegionFor($region),
73
- $this->_getWidgetEnvironmentFor($environment),
74
- urlencode($merchantId));
75
  }
76
 
77
  /**
@@ -193,9 +192,13 @@ class OffAmazonPaymentsService_RegionSpecificProperties
193
  *
194
  * @return string postfix for widget url string
195
  */
196
- private function _getWidgetEnvironmentFor($environment)
197
  {
198
- return ( $this->_isSandbox($environment) ? '/sandbox' : '');
 
 
 
 
199
  }
200
 
201
  /**
@@ -224,4 +227,4 @@ class OffAmazonPaymentsService_RegionSpecificProperties
224
  }
225
  }
226
 
227
- ?>
52
  'us' => 'na'
53
  );
54
 
55
+ const WIDGET_FORMAT_STRING = '%s/OffAmazonPayments/%s%s/js/Widgets.js';
56
  const SERVICE_FORMAT_STRING = '%s/OffAmazonPayments%s/%s';
57
 
58
  /**
70
  return sprintf(self::WIDGET_FORMAT_STRING,
71
  $this->_getWidgetHostFor($region, $overrideUrl),
72
  $this->_getWidgetRegionFor($region),
73
+ $this->_getWidgetEnvironmentFor($environment, $region));
 
74
  }
75
 
76
  /**
192
  *
193
  * @return string postfix for widget url string
194
  */
195
+ private function _getWidgetEnvironmentFor($environment, $region)
196
  {
197
+ if(strcasecmp($region, 'us') != 0 && strcasecmp($region, 'na') != 0) {
198
+ return ( $this->_isSandbox($environment) ? '/sandbox/lpa' : '/lpa');
199
+ } else {
200
+ return ( $this->_isSandbox($environment) ? '/sandbox' : '');
201
+ }
202
  }
203
 
204
  /**
227
  }
228
  }
229
 
230
+ ?>
package.xml CHANGED
@@ -1,22 +1,23 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Creativestyle_AmazonPayments</name>
4
- <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-nd/4.0/">Creative Commons Attribution-NoDerivatives 4.0 International</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Integration of your Magento shop with Pay with Amazon service</summary>
10
- <description>This extension provides an official integration of your Magento store with Pay with Amazon service. It helps your customers shop quickly, safely and securely. Your customers can pay on your website without re-entering their payment and address details. All Amazon transactions are protected by Amazon's A-to-z Guarantee.</description>
11
- <notes>ADDED: pagination for the log grid&#xD;
12
- ADDED: Magento Order ID data to the SetOrderReferenceDetails call&#xD;
13
- FIXED: date formatting on the log grid&#xD;
14
- FIXED: cart redirection issue when an exception is thrown during placing the order&#xD;
15
- </notes>
 
16
  <authors><author><name>creativestyle GmbH</name><user>creativestyle</user><email>amazon@creativestyle.de</email></author></authors>
17
- <date>2014-05-22</date>
18
- <time>22:29:42</time>
19
- <contents><target name="magecommunity"><dir name="Creativestyle"><dir name="AmazonPayments"><dir name="Block"><dir name="Adminhtml"><dir name="Debug"><dir name="Section"><file name="Table.php" hash="f6947e99e982164a220e3d82fa0f988f"/></dir><file name="Section.php" hash="a249d2fedeaa5e485e40ffaeeb0335c6"/></dir><file name="Debug.php" hash="cc798f2987cc0dffc755a88988b74912"/><file name="Info.php" hash="be764b1856eccc2b3070a1ea4cfe57f7"/><file name="IpnUrl.php" hash="dc185fbffc8851d0031769e9a623ddda"/><dir name="Log"><file name="Abstract.php" hash="02887066c2d6973141dff769b385d8fa"/><dir name="Api"><file name="Grid.php" hash="8d072ba9ce4be99222c03a26680d51eb"/><file name="View.php" hash="eb30544643fa9571a454a763111d0113"/></dir><file name="Api.php" hash="5ea0736c83de5feb01df0a3ec4db4d80"/><dir name="Exception"><file name="Grid.php" hash="3c3decb0a90638d5e2b1617426ec9437"/><file name="View.php" hash="cae17d2a2d5716e8dde1c6662397131e"/></dir><file name="Exception.php" hash="c35dafcaf89ca709394341394862f4cf"/><dir name="Ipn"><file name="Grid.php" hash="74bb51ab562b09d42bd9ced6d6609ae1"/><file name="View.php" hash="6ab63414642658e95258a73a143e6955"/></dir><file name="Ipn.php" hash="a2225b081ccb354bfe94b4a646b0d521"/><dir name="View"><file name="Abstract.php" hash="0a4c977a1f89622148bdc6acc037fc1f"/></dir></dir><dir name="Renderer"><file name="Timestamp.php" hash="190325613c20e2cf97adc28950658e99"/></dir><dir name="Sales"><file name="Order.php" hash="45a5ee919501a2bf26160d38dafccd44"/></dir></dir><dir name="Advanced"><file name="Abstract.php" hash="766b11b0d18fa51235f3260ee32063c1"/><file name="Button.php" hash="0f41939d7617b56c81b40c6d9ddc90ad"/><dir name="Checkout"><file name="Notice.php" hash="748f6a287310299450ca2ecea6031f20"/><file name="SandboxToolbox.php" hash="d70a1ab225c6da26a5aa196d2201471e"/></dir><file name="Checkout.php" hash="5381d2a932c0c513b2b91f9d603c7afa"/><file name="Head.php" hash="cd9c6b29241ed7d0c66d3263671805c6"/><file name="Js.php" hash="ccb6a0a742175a5c3a018127b3b60bb0"/><dir name="Payment"><file name="Info.php" hash="27509728d9e4ff5e2a3a8bacefcbb15a"/></dir></dir></dir><file name="Exception.php" hash="ca655a29842b38dd2ebf438208a6c70c"/><dir name="Helper"><file name="Data.php" hash="2e4f192a5cba4730a6d667598050408f"/><file name="Debug.php" hash="7e99e99d3f73c9c0199e409f83220157"/></dir><dir name="Model"><dir name="Api"><file name="Abstract.php" hash="5a6fc7325d9d09d358fa28afebf55f85"/><file name="Advanced.php" hash="38eae8140209083bdbca004767c3c8fd"/><file name="Ipn.php" hash="7796776a38fe90b9805cbd88094a773d"/></dir><file name="Checkout.php" hash="3982b9be43dabbb8f668024932fda9b7"/><file name="Config.php" hash="f52aadf6b1d324ede3b323ec3a8fba12"/><dir name="Log"><file name="Collection.php" hash="13d71847c4e164af18636a3fe5bf975b"/></dir><file name="Logger.php" hash="59d976108e72ef6921459a33f5bef3a7"/><dir name="Lookup"><file name="Abstract.php" hash="443bbef12f4e7c896e54cf0b7463e04e"/><dir name="Design"><dir name="Button"><file name="Color.php" hash="70be7e5eb00b9410aacf5968229a2b93"/><file name="Size.php" hash="6ae57e89caed0edfc9f7a64895b04f57"/></dir></dir><file name="Frequency.php" hash="5115fb39b48781e5e97f9b62414a72cc"/><file name="IpnActive.php" hash="b73000f5bfc1e26b80911e125e9eec46"/><file name="PaymentAction.php" hash="6d0c15996ec3caf112d88e07ea703bb4"/><file name="Region.php" hash="8f5cc8ab970aa165e16085368b320f89"/></dir><file name="Manager.php" hash="3124ad729c36b39216b9dda2439ef4da"/><file name="Observer.php" hash="0dac6a040e00c696dd543b724a1b1956"/><dir name="Payment"><file name="Abstract.php" hash="5667d8b7b4eae1f3b29e8fc6c043b9ce"/><dir name="Advanced"><file name="Abstract.php" hash="8dea8285fb69ca5a0173537a8c6cd447"/><file name="Sandbox.php" hash="a1509cd32ad92e6e6d3a8f348be1d3bb"/></dir><file name="Advanced.php" hash="72006ba9aaa96486f6d7505814ffaf54"/></dir><dir name="Service"><file name="Quote.php" hash="3f83d1e1b1c6e19e0e23cb1a8c8b41f5"/></dir><file name="Simulator.php" hash="a29334c00456217b80a455931278594a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DebugController.php" hash="28e0ddedf23912140158d100339bdbe8"/><file name="DocumentationController.php" hash="4e214386e032b2e513dda5a26344fd87"/><dir name="Log"><file name="ApiController.php" hash="e0a9181f57223d3ba722982572c1d003"/><file name="ExceptionController.php" hash="5daaa04ec6479396edfb1f62910f4ad3"/><file name="IpnController.php" hash="f00870c68a6b18d460c59d0b76d4a67d"/></dir><file name="OrderController.php" hash="1293b8aa3851f09b7559306e37a6a6ea"/></dir><dir name="Advanced"><file name="CheckoutController.php" hash="bdc6a4fd4b3b3906acc901294cae98ea"/><file name="IpnController.php" hash="0d8a52a891d493870dd1081f9a407170"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="703e659e10fe9ae212549c148bff12a8"/><file name="config.xml" hash="e837464385b9a529daf294f11f63f4f5"/><file name="system.xml" hash="97ff587dd614091ca67e808a34a572d1"/></dir><dir name="sql"><dir name="amazonpayments_setup"><file name="mysql4-install-1.0.0.php" hash="d4681b9a39905cc9e9dcc660688dea85"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="amazonpayments.xml" hash="4bc12228bba39bd925ed129d7cf64258"/></dir><dir name="template"><dir name="creativestyle"><dir name="amazonpayments"><dir name="advanced"><file name="documentation.phtml" hash="af3ae6ebce4712dd8fb972bef508ca55"/><dir name="log"><dir name="api"><file name="view.phtml" hash="92e2a91aa6f25e20fe8e89bad751e8cf"/></dir><dir name="exception"><file name="view.phtml" hash="c5d01f6de86e47d4da5dfabd60b1b382"/></dir><file name="js.phtml" hash="eb1d2098440a0bac2a6f5b959afa3693"/><dir name="notification"><file name="view.phtml" hash="31d893106f7c7c7f94f05d5cafa36440"/></dir></dir><dir name="payment"><file name="info.phtml" hash="200af8569ab7792e7f16c5f4a93c6897"/><dir name="pdf"><file name="info.phtml" hash="1fb213f3fcc3aeecaa6305c07cff3b73"/></dir></dir></dir><dir name="debug"><dir name="section"><file name="table.phtml" hash="f4bb8e35b3608cf0639407a3461c3717"/></dir><file name="section.phtml" hash="1472da0e9f07b5583a02e327483d4d75"/></dir><file name="debug.phtml" hash="9748d4fe92986f36ad47ae5b61fc4883"/><file name="info.phtml" hash="9206d48b9e8433216cf9f24c7b2ceef4"/><file name="init.phtml" hash="ba9d53045077e63b4e6c25c6b7bb685c"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="amazonpayments.xml" hash="49548b6cc0415d167599844256dae0c5"/></dir><dir name="template"><dir name="creativestyle"><dir name="amazonpayments"><dir name="advanced"><dir name="button"><file name="js.phtml" hash="1304236a9c1e2c27156d1ab8982853ad"/><file name="onepage.phtml" hash="f3ccc6387c7069adb7250399845f7cc1"/><file name="tooltip.phtml" hash="9d5ba8ad73fb30e53d117e9bc9950fa4"/></dir><file name="button.phtml" hash="0f858abbda354cadb3c24d3342c95614"/><dir name="checkout"><file name="capture_notice.phtml" hash="f9c75cd05a596d0a16c55f0169b4ee6c"/><file name="js.phtml" hash="a9d8610006bcc78a03fc6a796b358851"/><dir name="review"><file name="button.phtml" hash="1312572385c9ff653d283bb0c3f47b1b"/></dir><file name="sandbox_toolbox.phtml" hash="ff639266f99827e3ec3a9e8305bd7eb7"/><file name="shipping_method.phtml" hash="8a8c97b4eb2a7c8cfc8248bd499b95eb"/></dir><file name="checkout.phtml" hash="883f7b57f16ea47e53cc225f1fe7154b"/><file name="head.phtml" hash="c303821e8f08b69ff92ea2052fbb6e1d"/><dir name="payment"><file name="info.phtml" hash="3631896707e596d9675f526a7d021617"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creativestyle_AmazonPayments.xml" hash="3d30f68b24829494a2a66164eba0e5f7"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Creativestyle_AmazonPayments.csv" hash="a2326e00888a7b1710cc2e2e30c10de4"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="ad694ba24051f779698d483bc32d9b75"/></dir></dir></dir><dir name="en_GB"><file name="Creativestyle_AmazonPayments.csv" hash="c072c953b397a47958680d3d1494c1fd"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="1a933579acb1fbb3d78ae47ca990521b"/></dir></dir></dir><dir name="de_DE"><file name="Creativestyle_AmazonPayments.csv" hash="6595025c8f8082e00e1d511fb96b4cc6"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="4879ccbfbea101548700da52b058bd0b"/></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="creativestyle"><file name="apa_checkout.min.js" hash="4ec99d34529c62c6ede62c2abfc08748"/><file name="apa_sandbox_toolbox.min.js" hash="43db69188712b5b4665b586fc70f39de"/><dir name="vendors"><file name="prism.js" hash="c700de3d980f7ef1e056dc5400acfd44"/></dir></dir></dir></target><target name="magelib"><dir name="OffAmazonPayments"><file name="Model.php" hash="0225c0c8424f0adbc296c916f2ec5564"/></dir><dir name="OffAmazonPaymentsNotifications"><file name="Client.php" hash="a14396aeb164fa4f75e125424c7d6f11"/><dir name="Impl"><file name="IpnNotificationParser.php" hash="fcad418dc58a93e87b854e4067f1e24d"/><file name="Message.php" hash="24eba6f6478bfeb4c78f467b3548db70"/><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="40da2086a2e95bee962542b082305516"/></dir><file name="Interface.php" hash="effe919508aab0c2aa1e585d2783c4e6"/><file name="InvalidMessageException.php" hash="2edda9cd6cc0c059846c4858cedfcd66"/><dir name="Model"><file name="AuthorizationDetails.php" hash="10d60426742051b703a41e7334e6d0e5"/><file name="AuthorizationNotification.php" hash="d09b3025a97d8d09e11184a0e9cd1b33"/><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="2b15b96cbbdea6405660d9d40e70a2ae"/><file name="CaptureNotification.php" hash="4e4b9569160ca6907a36aebdb7811c69"/><file name="IdList.php" hash="2907bdba4b5a534f535c026c40e6d6cc"/><file name="IpnNotificationMetadata.php" hash="58674fca7aa30eea82cb4cba17dec04e"/><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="ec2aa50bf6a4ecff1caa17e0acfa6197"/><file name="OrderReferenceStatus.php" hash="e29870a166b75c6d90955a08e0dfe048"/><file name="OrderTotal.php" hash="4141b92ed1bdeb9cfa4c13837df41221"/><file name="Price.php" hash="d94b947bb989fb974e076f2727a0dceb"/><file name="RefundDetails.php" hash="723adeaa0260a16234dd0aa32aa6bfc4"/><file name="RefundNotification.php" hash="05af342e659bf63b7914eccadd5f3787"/><file name="SellerBillingAgreementAttributes.php" hash="79572632ec2c776fb6a7e96554d7291a"/><file name="SellerOrderAttributes.php" hash="aa6f71cb667d2efb50cc336603b6029c"/><file name="SnsNotificationMetadata.php" hash="e4555834c3286a2d49fadd3cd5d0343a"/><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="9d547ccf092e213b046e20759d4b93d5"/><file name="Environments.php" hash="d84e7322b3394033b427f91be0a0abdb"/><file name="Exception.php" hash="dd85e54cfa5783c7ef7b1f93ca3995b2"/><file name="Interface.php" hash="e3569b47274add9e0856788758088f14"/><file name="MerchantValues.php" hash="5604c6d25b4a98b502c58e4530908ad8"/><dir name="Model"><file name="Address.php" hash="3b3c00f4b50a4a6f42da15701343ce91"/><file name="AuthorizationDetails.php" hash="a1f54e42588da34ff3fdd9a0141faff1"/><file name="AuthorizeOnBillingAgreementRequest.php" hash="fcb797660fa5c9cde02c4d482ec69f79"/><file name="AuthorizeOnBillingAgreementResponse.php" hash="c641d4e41db304d6f8f4136ea5d2f500"/><file name="AuthorizeOnBillingAgreementResult.php" hash="7b10d0dc68e7cbf18681abb4e600cca4"/><file name="AuthorizeRequest.php" hash="059b66a093aada5a3d110d3841aa3428"/><file name="AuthorizeResponse.php" hash="fb396a94285cacc3eb0fb798a0895466"/><file name="AuthorizeResult.php" hash="0c8f0581538ebba22a5dac5287c0fcc9"/><file name="BillingAgreementAttributes.php" hash="fe9c760e12c3db71125412ada5a65ec2"/><file name="BillingAgreementDetails.php" hash="8253567a3210422084d6532c906af45f"/><file name="BillingAgreementLimits.php" hash="974d1252d7b914169203acdfa6e7082b"/><file name="BillingAgreementStatus.php" hash="002b0516c52264ea95847ea840d68545"/><file name="Buyer.php" hash="83759bcb729cdd8718cdb80182d9a237"/><file name="CancelOrderReferenceRequest.php" hash="31ff8229a20eba00e28760aa96bad8ce"/><file name="CancelOrderReferenceResponse.php" hash="4d6bc1d4818d81fd5b5820510b608275"/><file name="CancelOrderReferenceResult.php" hash="32013170a09bccf0aac178a7acb56a30"/><file name="CaptureDetails.php" hash="20fa1b4aa2953894fb14cf70364a4812"/><file name="CaptureRequest.php" hash="05c0096dfbc361cd6bd8cf5b3934f72f"/><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="d023c86555d1a57d94276f13cc84156f"/><file name="GetOrderReferenceDetailsResponse.php" hash="3ea19407068d478f6c2b077bf8489a74"/><file name="GetOrderReferenceDetailsResult.php" hash="51bc2cd9a665edfb00cec970fc1fd328"/><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="108de3defa0a629644fb683a7faf99a8"/><file name="OrderReferenceDetails.php" hash="d60537bb56dc782e4e48a0c9b9a4b943"/><file name="OrderReferenceStatus.php" hash="04459e930111cf70c989196440f6400f"/><file name="OrderTotal.php" hash="6fda4ce95b066f960eebe41731717925"/><file name="Price.php" hash="ea1d5a6e473542f5b0cb8ed1e70436bd"/><file name="RefundDetails.php" hash="c80e14e042b7143a320df67c9a5b8cab"/><file name="RefundRequest.php" hash="bf957fcbcb414581753dc3c703bf24b6"/><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="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="ca87227ca87a9f7062e6eb6a99ef086b"/><file name="RegionSpecificProperties.php" hash="41ba34ed2f60b329d6e0c21b3b1934ca"/><file name="Regions.php" hash="a544d12c6321899770c039426e063cce"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="creativestyle"><dir name="css"><file name="amazonpayments.css" hash="a1f07a48b8de6d1fa9391a4eed2f12be"/><file name="amazonpayments-highlight.css" hash="f6daf03c989ac56ad436300b5520f0df"/></dir><dir name="images"><file name="amazon-payments-advanced-creativestyle-logo.png" hash="bb507d0085dab135ac313b8068515620"/><file name="amazon-payments-advanced-creativestyle-header-logo.png" hash="1f17fc7a61f8aaf929000d1d87f7d943"/><file name="amazon-payments-advanced-creativestyle-header-logo-white.png" hash="4ce4ba0d8d210a26caa380217804e200"/><file name="amazon-payments-advanced-header.png" hash="60f587870fbdb1242368c8c3b553bd8c"/><file name="amazon-payments-advanced-section.png" hash="8bc620f345eb46c920c51875d4cfad7c"/><file name="logo_a-glyph_16.png" hash="44a3f5f0013cab34d26653eb48b989fc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="creativestyle"><dir name="css"><file name="amazonpayments.css" hash="1131acb6ef67392165ac6cd262e88516"/></dir><dir name="images"><file name="amazon-loading-large.gif" hash="5f6d83bf2b69ab73c7e48ec9b66d54db"/><file name="logo_a-glyph_1x.png" hash="5d44ca86985afbb2a47b9265053a456e"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>dom</name><min></min><max></max></extension><extension><name>curl</name><min></min><max></max></extension></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Creativestyle_AmazonPayments</name>
4
+ <version>1.2.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-nd/4.0/">Creative Commons Attribution-NoDerivatives 4.0 International</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Integration of your Magento shop with Login and Pay with Amazon service</summary>
10
+ <description>This extension provides an official integration of your Magento store with Login and Pay with Amazon service. It helps your customers shop quickly, safely and securely. Your customers can pay on your website without re-entering their payment and address details. All Amazon transactions are protected by Amazon's A-to-z Guarantee.</description>
11
+ <notes>ADDED: Login with Amazon feature&#xD;
12
+ ADDED: Amazon Payments acount validation button&#xD;
13
+ UPDATED: Amazon SDK librayr to 1.0.11&#xD;
14
+ FIXED: payment cancelling issue in mutistore installations&#xD;
15
+ FIXED: permanently disabled "Place Order" button issues&#xD;
16
+ FIXED: clean orderReferendeId from the session data after successful order</notes>
17
  <authors><author><name>creativestyle GmbH</name><user>creativestyle</user><email>amazon@creativestyle.de</email></author></authors>
18
+ <date>2014-09-12</date>
19
+ <time>15:23:37</time>
20
+ <contents><target name="magecommunity"><dir name="Creativestyle"><dir name="AmazonPayments"><dir name="Block"><file name="Abstract.php" hash="a8879b92a7537e5c443f3488a22787fe"/><dir name="Adminhtml"><file name="CredentialsValidator.php" hash="177b2bf5c1efb6b4cc262422fbcbb9f6"/><dir name="Debug"><dir name="Section"><file name="Table.php" hash="f6947e99e982164a220e3d82fa0f988f"/></dir><file name="Section.php" hash="a249d2fedeaa5e485e40ffaeeb0335c6"/></dir><file name="Debug.php" hash="cc798f2987cc0dffc755a88988b74912"/><file name="Info.php" hash="be764b1856eccc2b3070a1ea4cfe57f7"/><file name="IpnUrl.php" hash="dc185fbffc8851d0031769e9a623ddda"/><dir name="Log"><file name="Abstract.php" hash="02887066c2d6973141dff769b385d8fa"/><dir name="Api"><file name="Grid.php" hash="8d072ba9ce4be99222c03a26680d51eb"/><file name="View.php" hash="eb30544643fa9571a454a763111d0113"/></dir><file name="Api.php" hash="5ea0736c83de5feb01df0a3ec4db4d80"/><dir name="Exception"><file name="Grid.php" hash="3c3decb0a90638d5e2b1617426ec9437"/><file name="View.php" hash="cae17d2a2d5716e8dde1c6662397131e"/></dir><file name="Exception.php" hash="c35dafcaf89ca709394341394862f4cf"/><dir name="Ipn"><file name="Grid.php" hash="74bb51ab562b09d42bd9ced6d6609ae1"/><file name="View.php" hash="6ab63414642658e95258a73a143e6955"/></dir><file name="Ipn.php" hash="a2225b081ccb354bfe94b4a646b0d521"/><dir name="View"><file name="Abstract.php" hash="0a4c977a1f89622148bdc6acc037fc1f"/></dir></dir><dir name="Renderer"><file name="Timestamp.php" hash="190325613c20e2cf97adc28950658e99"/></dir><dir name="Sales"><file name="Order.php" hash="45a5ee919501a2bf26160d38dafccd44"/></dir></dir><dir name="Button"><file name="Js.php" hash="16b7b49b8c16da0a783104acc3a2b7d2"/></dir><dir name="Checkout"><file name="Abstract.php" hash="db5cf0b3d9dd37ad4552987b9df5e09c"/><file name="Js.php" hash="6b11c39cebfa006231f6663684d5642d"/><file name="Notice.php" hash="3bd2869322fac80a80436f8e2daa8d70"/><file name="SandboxToolbox.php" hash="047b1bfde3f5469195b9a7ccfee3f16d"/></dir><file name="Checkout.php" hash="816cc1159d70d8defb7c162ca5ae1b15"/><file name="Head.php" hash="3a0e8a708cff9b769b68dcd48dbac274"/><dir name="Login"><file name="Abstract.php" hash="b84dfbbe66bbee39a547d33e856b4a8d"/><dir name="Account"><file name="Confirm.php" hash="ae8123a65a717a0046aaf1d9dc21f878"/><file name="Update.php" hash="8fdadae9294b17fbb0989f8d0e2016a4"/></dir><file name="Button.php" hash="bad55de20f480d53a15ddedd551ff6dd"/><file name="Head.php" hash="8e2f097d5c170aba4c1f11973463181a"/><file name="Logout.php" hash="79701fe73b6ad3e32b5f75367dd8bcd0"/></dir><dir name="Onepage"><file name="Button.php" hash="b122db0163e8580f42679f13a3a45726"/></dir><dir name="Pay"><file name="Abstract.php" hash="2e96e1d4a1a0e2c74cee40a46a75241c"/><file name="Button.php" hash="b76cbc47c91b88ceb9fc1fde609fa2dc"/></dir><dir name="Payment"><file name="Info.php" hash="c6285a5688834b456765317d3471bf2a"/></dir></dir><file name="Exception.php" hash="ca655a29842b38dd2ebf438208a6c70c"/><dir name="Helper"><file name="Data.php" hash="5fc92f1d286aa898a751249f3674b005"/><file name="Debug.php" hash="7e99e99d3f73c9c0199e409f83220157"/></dir><dir name="Model"><dir name="Api"><file name="Abstract.php" hash="1814fcd0d61599f15d808d9c2990ebe4"/><file name="Advanced.php" hash="f07d08dc5ca8fa80d2684a7726496a6e"/><file name="Ipn.php" hash="7796776a38fe90b9805cbd88094a773d"/><file name="Login.php" hash="1d3ed64e3d7e10128780bf07fb334867"/></dir><file name="Checkout.php" hash="5aabd463b8e45f9390a7719d7c730c8d"/><file name="Config.php" hash="0669bb9fa9bfbf38a2b99ace8e750efd"/><dir name="Log"><file name="Collection.php" hash="13d71847c4e164af18636a3fe5bf975b"/></dir><file name="Logger.php" hash="0821a7d8ddeea993fe3ad9495ef6f9d9"/><dir name="Lookup"><file name="Abstract.php" hash="443bbef12f4e7c896e54cf0b7463e04e"/><dir name="Design"><dir name="Button"><dir name="Color"><file name="LoginPay.php" hash="e9a469e82c7805782cf7694c4d50af7a"/></dir><file name="Color.php" hash="81a33471dfefb27897f7b1ff19749671"/><dir name="Size"><file name="LoginPay.php" hash="6cdf3d3633617994783a38f30add86fe"/></dir><file name="Size.php" hash="7c73a97a0fa3f4c6a73b838c0594ad5c"/><dir name="Type"><file name="Login.php" hash="44e852189b0305bbe4cc38848316d4e6"/><file name="Pay.php" hash="5e6f65d1e355ed265787b28b12c6e7a6"/></dir></dir></dir><file name="Frequency.php" hash="5115fb39b48781e5e97f9b62414a72cc"/><file name="IpnActive.php" hash="b73000f5bfc1e26b80911e125e9eec46"/><file name="PaymentAction.php" hash="6d0c15996ec3caf112d88e07ea703bb4"/><file name="Region.php" hash="8f5cc8ab970aa165e16085368b320f89"/></dir><file name="Manager.php" hash="3deaebb7cc0d613c63470d866d7aafb7"/><file name="Observer.php" hash="6f550935cc3dd943a26c37bf245f50c0"/><dir name="Payment"><file name="Abstract.php" hash="5667d8b7b4eae1f3b29e8fc6c043b9ce"/><dir name="Advanced"><file name="Abstract.php" hash="6943beca59bb6c341a43c0e9c62a43ea"/><file name="Sandbox.php" hash="a1509cd32ad92e6e6d3a8f348be1d3bb"/></dir><file name="Advanced.php" hash="72006ba9aaa96486f6d7505814ffaf54"/></dir><dir name="Service"><file name="Login.php" hash="3ba988940839a636e6b42070db99e41e"/><file name="Quote.php" hash="3f83d1e1b1c6e19e0e23cb1a8c8b41f5"/></dir><file name="Simulator.php" hash="be19c4b71f46f3251455c497aeb407f6"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="DataPolling"><file name="Cron.php" hash="c3d3009775702bee14da3695f0d41f68"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="DebugController.php" hash="28e0ddedf23912140158d100339bdbe8"/><file name="DocumentationController.php" hash="4e214386e032b2e513dda5a26344fd87"/><dir name="Log"><file name="ApiController.php" hash="e0a9181f57223d3ba722982572c1d003"/><file name="ExceptionController.php" hash="5daaa04ec6479396edfb1f62910f4ad3"/><file name="IpnController.php" hash="f00870c68a6b18d460c59d0b76d4a67d"/></dir><file name="OrderController.php" hash="1293b8aa3851f09b7559306e37a6a6ea"/><file name="SystemController.php" hash="52c60fa39dba8582b4ca81c2f065dbc5"/></dir><dir name="Advanced"><file name="CheckoutController.php" hash="4b0f052d67439041bf68a6b7229ee59a"/><file name="IpnController.php" hash="0d8a52a891d493870dd1081f9a407170"/><file name="LoginController.php" hash="11181ead4f32e18ad8d7bf533d9772be"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2dc1b70997469f8f0cd6a80eff845842"/><file name="config.xml" hash="0a38517debe489b341c90110abf0affb"/><file name="system.xml" hash="3be7846b3d5059cbfd89735136041f14"/></dir><dir name="sql"><dir name="amazonpayments_setup"><file name="mysql4-install-1.0.0.php" hash="d4681b9a39905cc9e9dcc660688dea85"/><file name="mysql4-upgrade-1.1.6-1.2.0.php" hash="27f8e108bac4268d3c17e812b413dbbc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="amazonpayments.xml" hash="4bc12228bba39bd925ed129d7cf64258"/></dir><dir name="template"><dir name="creativestyle"><dir name="amazonpayments"><dir name="advanced"><file name="documentation.phtml" hash="af3ae6ebce4712dd8fb972bef508ca55"/><dir name="log"><dir name="api"><file name="view.phtml" hash="92e2a91aa6f25e20fe8e89bad751e8cf"/></dir><dir name="exception"><file name="view.phtml" hash="c5d01f6de86e47d4da5dfabd60b1b382"/></dir><file name="js.phtml" hash="eb1d2098440a0bac2a6f5b959afa3693"/><dir name="notification"><file name="view.phtml" hash="31d893106f7c7c7f94f05d5cafa36440"/></dir></dir></dir><dir name="debug"><dir name="section"><file name="table.phtml" hash="f4bb8e35b3608cf0639407a3461c3717"/></dir><file name="section.phtml" hash="1472da0e9f07b5583a02e327483d4d75"/></dir><file name="debug.phtml" hash="9748d4fe92986f36ad47ae5b61fc4883"/><file name="info.phtml" hash="8f58e70d3d5974c60d182450b424e521"/><file name="init.phtml" hash="ba9d53045077e63b4e6c25c6b7bb685c"/><dir name="payment"><file name="info.phtml" hash="200af8569ab7792e7f16c5f4a93c6897"/><dir name="pdf"><file name="info.phtml" hash="1fb213f3fcc3aeecaa6305c07cff3b73"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="amazonpayments.xml" hash="683fa1da68978a02ffc529ac88c86e15"/></dir><dir name="template"><dir name="creativestyle"><dir name="amazonpayments"><dir name="button"><file name="js.phtml" hash="ff2502a96e1edfe14c2777efb738ef21"/><file name="tooltip.phtml" hash="6e430b0cba211ae63f69df86d943f9ee"/></dir><dir name="checkout"><file name="capture_notice.phtml" hash="f9c75cd05a596d0a16c55f0169b4ee6c"/><file name="js.phtml" hash="5c22f4a314540a18ba6cb723a5b2b50a"/><dir name="review"><file name="button.phtml" hash="1312572385c9ff653d283bb0c3f47b1b"/></dir><file name="sandbox_toolbox.phtml" hash="ff639266f99827e3ec3a9e8305bd7eb7"/><file name="shipping_method.phtml" hash="8a8c97b4eb2a7c8cfc8248bd499b95eb"/></dir><file name="checkout.phtml" hash="e7d8ea4a616e1fd3a6cff46ba5d6cc8f"/><file name="head.phtml" hash="271adf18a0fa0da90dce2d0f5c6ef4d7"/><dir name="login"><dir name="button"><file name="account_login.phtml" hash="0ce9b9d891af3f6c5b1c83a17d311e6b"/></dir><file name="button.phtml" hash="b5d66280337ecc895ae9a2bc48c469e4"/><dir name="form"><file name="account_confirm.phtml" hash="02d1af632182725463280f6029bb2199"/><file name="account_update.phtml" hash="64fdc50df3b3c49384d5d50a1da82d4d"/></dir><file name="head.phtml" hash="dfe0af795b7075a22cf2b0865e94df61"/><file name="logout.phtml" hash="066465552b22eb23867e641fba7f7f96"/></dir><dir name="onepage"><file name="button.phtml" hash="95e053ca57f36df23180af93b77a6557"/></dir><dir name="pay"><file name="button.phtml" hash="dfcccab45794c81d2d3ca52f709019d4"/></dir><dir name="payment"><file name="info.phtml" hash="3631896707e596d9675f526a7d021617"/><dir name="pdf"><file name="info.phtml" hash="69549bf3340c19d62f42a556f13e8a1e"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creativestyle_AmazonPayments.xml" hash="3d30f68b24829494a2a66164eba0e5f7"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Creativestyle_AmazonPayments.csv" hash="a780e88a08115114758a289f66f53bdf"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="ad694ba24051f779698d483bc32d9b75"/></dir></dir></dir><dir name="en_GB"><file name="Creativestyle_AmazonPayments.csv" hash="301bd063d8ce0960df11c67ce00c6d6d"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="1a933579acb1fbb3d78ae47ca990521b"/></dir></dir></dir><dir name="de_DE"><file name="Creativestyle_AmazonPayments.csv" hash="40f937748a69d0772c6856f7b7df547c"/><dir name="template"><dir name="email"><file name="amazon_payments_failed.html" hash="4879ccbfbea101548700da52b058bd0b"/></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="creativestyle"><file name="apa_checkout.min.js" hash="bd42d7af59abf9c70a4d9ce7718d8b9b"/><file name="apa_sandbox_toolbox.min.js" hash="43db69188712b5b4665b586fc70f39de"/><dir name="vendors"><file name="prism.js" hash="c700de3d980f7ef1e056dc5400acfd44"/></dir></dir></dir></target><target name="magelib"><dir name="OffAmazonPayments"><file name="Model.php" hash="0225c0c8424f0adbc296c916f2ec5564"/></dir><dir name="OffAmazonPaymentsNotifications"><file name="Client.php" hash="0ab53a8a0a0c069f13e1de3731eaebde"/><dir name="Impl"><file name="Certificate.php" hash="ee7d6dd611bdeaab422da1316936fe99"/><file name="IpnNotificationParser.php" hash="fcad418dc58a93e87b854e4067f1e24d"/><file name="Message.php" hash="24eba6f6478bfeb4c78f467b3548db70"/><file name="OpenSslVerifySignature.php" hash="224f133d41bbbb8510b722e1c083393e"/><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="InvalidCertificateException.php" hash="41bd42da2146c9c6263ddabefd9bfa62"/><file name="InvalidMessageException.php" hash="2edda9cd6cc0c059846c4858cedfcd66"/><dir name="Model"><file name="AuthorizationDetails.php" hash="843711e02fb56fffcdfb6afcf097e373"/><file name="AuthorizationNotification.php" hash="d09b3025a97d8d09e11184a0e9cd1b33"/><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="ec2aa50bf6a4ecff1caa17e0acfa6197"/><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="05af342e659bf63b7914eccadd5f3787"/><file name="SellerBillingAgreementAttributes.php" hash="79572632ec2c776fb6a7e96554d7291a"/><file name="SellerOrderAttributes.php" hash="aa6f71cb667d2efb50cc336603b6029c"/><file name="SnsNotificationMetadata.php" hash="e4555834c3286a2d49fadd3cd5d0343a"/><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="410f8748cea48700c1f0e28f3af76fa4"/><file name="Environments.php" hash="d84e7322b3394033b427f91be0a0abdb"/><file name="Exception.php" hash="dd85e54cfa5783c7ef7b1f93ca3995b2"/><file name="Interface.php" hash="b0d2b9acda872f079afe324a95579ec8"/><file name="MerchantValues.php" hash="5604c6d25b4a98b502c58e4530908ad8"/><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="d023c86555d1a57d94276f13cc84156f"/><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="108de3defa0a629644fb683a7faf99a8"/><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="ca87227ca87a9f7062e6eb6a99ef086b"/><file name="RegionSpecificProperties.php" hash="905c79c0cce777749182263f7cab5e65"/><file name="Regions.php" hash="a544d12c6321899770c039426e063cce"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="creativestyle"><dir name="css"><file name="amazonpayments.css" hash="a1f07a48b8de6d1fa9391a4eed2f12be"/><file name="amazonpayments-highlight.css" hash="f6daf03c989ac56ad436300b5520f0df"/></dir><dir name="images"><file name="amazon-payments-advanced-creativestyle-logo.png" hash="bb507d0085dab135ac313b8068515620"/><file name="amazon-payments-advanced-creativestyle-header-logo.png" hash="1f17fc7a61f8aaf929000d1d87f7d943"/><file name="amazon-payments-advanced-creativestyle-header-logo-white.png" hash="4ce4ba0d8d210a26caa380217804e200"/><file name="amazon-payments-advanced-header.png" hash="60f587870fbdb1242368c8c3b553bd8c"/><file name="amazon-payments-advanced-section.png" hash="8bc620f345eb46c920c51875d4cfad7c"/><file name="logo_a-glyph_16.png" hash="44a3f5f0013cab34d26653eb48b989fc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="creativestyle"><dir name="css"><file name="amazonpayments.css" hash="7e6876f4813601da6ea1e001c0b16fa2"/></dir><dir name="images"><file name="amazon-loading-large.gif" hash="5f6d83bf2b69ab73c7e48ec9b66d54db"/><file name="logo_a-glyph_1x.png" hash="5d44ca86985afbb2a47b9265053a456e"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>dom</name><min/><max/></extension><extension><name>curl</name><min/><max/></extension></required></dependencies>
23
  </package>
skin/frontend/base/default/creativestyle/css/amazonpayments.css CHANGED
@@ -47,10 +47,11 @@
47
  .pay-with-amazon-onepage-shortcut p img {
48
  display: none;
49
  }
50
- .buttonWidget img {
51
  cursor: pointer;
52
  }
53
- .checkout-onepage-index .buttonWidget {
 
54
  margin-bottom: 15px;
55
  text-align: right;
56
  }
@@ -139,3 +140,21 @@ ol.apa.desktop-layout {
139
  .desktop-layout #apa-shipping {
140
  margin-right: 16px;
141
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  .pay-with-amazon-onepage-shortcut p img {
48
  display: none;
49
  }
50
+ .payButtonWidget img {
51
  cursor: pointer;
52
  }
53
+ .checkout-onepage-index .loginButtonWidget,
54
+ .checkout-onepage-index .payButtonWidget {
55
  margin-bottom: 15px;
56
  text-align: right;
57
  }
140
  .desktop-layout #apa-shipping {
141
  margin-right: 16px;
142
  }
143
+
144
+ .amazon-login {
145
+ padding-top: 27px;
146
+ }
147
+
148
+ .amazon-login.position-before {
149
+ padding-top: 0 !important;
150
+ padding-bottom: 27px;
151
+ }
152
+
153
+ .amazon-login .content {
154
+ min-height: 100px;
155
+ }
156
+
157
+ .buttons-set button.cancel span {
158
+ border-color:#406a83;
159
+ background:#618499;
160
+ }