di.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License").
  7. * You may not use this file except in compliance with the License.
  8. * A copy of the License is located at
  9. *
  10. * http://aws.amazon.com/apache2.0
  11. *
  12. * or in the "license" file accompanying this file. This file is distributed
  13. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  14. * express or implied. See the License for the specific language governing
  15. * permissions and limitations under the License.
  16. */
  17. -->
  18. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  19. <preference for="Amazon\Core\Client\ClientFactoryInterface" type="Amazon\Core\Client\ClientFactory" />
  20. <preference for="Amazon\Core\Api\Data\AmazonNameInterface" type="Amazon\Core\Domain\AmazonName" />
  21. <preference for="Amazon\Core\Api\Data\AmazonCustomerInterface" type="Amazon\Core\Domain\AmazonCustomer" />
  22. <preference for="Amazon\Core\Api\Data\AmazonAddressInterface" type="Amazon\Core\Domain\AmazonAddress" />
  23. <preference for="AmazonPay\ClientInterface" type="Amazon\Core\Client\Client" />
  24. <type name="Amazon\Core\Client\Client">
  25. <arguments>
  26. <argument name="config" xsi:type="array" />
  27. </arguments>
  28. </type>
  29. <type name="Amazon\Core\Helper\Data">
  30. <arguments>
  31. <argument name="storeManager" xsi:type="object">Magento\Store\Model\StoreManagerInterface\Proxy</argument>
  32. <argument name="clientIpHelper" xsi:type="object">Amazon\Core\Helper\ClientIp\Proxy</argument>
  33. </arguments>
  34. </type>
  35. <type name="Amazon\Core\Domain\AmazonNameFactory">
  36. <arguments>
  37. <argument name="nameDecoratorPool" xsi:type="array">
  38. <item name="JP" xsi:type="string">Amazon\Core\Domain\AmazonNameDecoratorJp</item>
  39. </argument>
  40. </arguments>
  41. </type>
  42. <type name="Amazon\Core\Domain\AmazonAddressFactory">
  43. <arguments>
  44. <argument name="addressDecoratorPool" xsi:type="array">
  45. <item name="DE" xsi:type="string">Amazon\Core\Domain\AmazonAddressDecoratorDe</item>
  46. <item name="AT" xsi:type="string">Amazon\Core\Domain\AmazonAddressDecoratorDe</item>
  47. <item name="JP" xsi:type="string">Amazon\Core\Domain\AmazonAddressDecoratorJp</item>
  48. </argument>
  49. </arguments>
  50. </type>
  51. <virtualType name="Amazon_Core_RemoteAddressWithAdditionalIpHeaders" type="Magento\Framework\HTTP\PhpEnvironment\RemoteAddress">
  52. <arguments>
  53. <argument name="alternativeHeaders" xsi:type="array">
  54. <item name="x-forwarded-for" xsi:type="string">HTTP_X_FORWARDED_FOR</item>
  55. <item name="x-real-ip" xsi:type="string">HTTP_X_REAL_IP</item>
  56. </argument>
  57. </arguments>
  58. </virtualType>
  59. <type name="Amazon\Core\Helper\ClientIp">
  60. <arguments>
  61. <argument name="remoteAddress" xsi:type="object">Amazon_Core_RemoteAddressWithAdditionalIpHeaders</argument>
  62. </arguments>
  63. </type>
  64. <type name="Amazon\Core\Logger\Logger">
  65. <arguments>
  66. <argument name="name" xsi:type="string">amazonClientLogger</argument>
  67. <argument name="handlers" xsi:type="array">
  68. <item name="debug" xsi:type="object">Amazon\Core\Logger\Handler\Client</item>
  69. </argument>
  70. </arguments>
  71. </type>
  72. <type name="Amazon\Core\Client\ClientFactory">
  73. <arguments>
  74. <argument name="logger" xsi:type="object">Amazon\Core\Logger\Logger</argument>
  75. </arguments>
  76. </type>
  77. <type name="Amazon\Core\Helper\CategoryExclusion">
  78. <arguments>
  79. <argument name="checkoutSession" xsi:type="object">Magento\Checkout\Model\Session\Proxy</argument>
  80. </arguments>
  81. </type>
  82. <type name="Magento\Checkout\CustomerData\Cart">
  83. <plugin name="amazon_core_cart_section" type="Amazon\Core\Plugin\CartSection" />
  84. </type>
  85. <type name="Magento\Config\Model\Config\TypePool">
  86. <arguments>
  87. <argument name="sensitive" xsi:type="array">
  88. <item name="payment/amazon_payments/simplepath/privatekey" xsi:type="string">1</item>
  89. <item name="payment/amazon_payment/client_secret" xsi:type="string">1</item>
  90. <item name="payment/amazon_payment/secret_key" xsi:type="string">1</item>
  91. <item name="payment/amazon_payment/credentials_json" xsi:type="string">1</item>
  92. </argument>
  93. <argument name="environment" xsi:type="array">
  94. <item name="payment/amazon_payments/simplepath/publickey" xsi:type="string">1</item>
  95. <item name="payment/amazon_payments/simplepath/privatekey" xsi:type="string">1</item>
  96. <item name="payment/amazon_payment/merchant_id" xsi:type="string">1</item>
  97. <item name="payment/amazon_payment/client_id" xsi:type="string">1</item>
  98. <item name="payment/amazon_payment/client_secret" xsi:type="string">1</item>
  99. <item name="payment/amazon_payment/access_key" xsi:type="string">1</item>
  100. <item name="payment/amazon_payment/secret_key" xsi:type="string">1</item>
  101. <item name="payment/amazon_payment/sandbox" xsi:type="string">1</item>
  102. </argument>
  103. </arguments>
  104. </type>
  105. </config>