amazon-payment-widget.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!--
  2. /**
  3. * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License").
  6. * You may not use this file except in compliance with the License.
  7. * A copy of the License is located at
  8. *
  9. * http://aws.amazon.com/apache2.0
  10. *
  11. * or in the "license" file accompanying this file. This file is distributed
  12. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied. See the License for the specific language governing
  14. * permissions and limitations under the License.
  15. */
  16. -->
  17. <!-- ko if: (isPwaVisible) -->
  18. <!-- ko if: (isAmazonAccountLoggedIn) -->
  19. <div class="payment-method amazon-payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
  20. <div class="payment-method-title field choice">
  21. <input type="radio"
  22. name="payment[method]"
  23. class="radio"
  24. data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
  25. <label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
  26. </div>
  27. <div class="payment-method-content">
  28. <!-- ko foreach: getRegion('messages') -->
  29. <!-- ko template: getTemplate() --><!-- /ko -->
  30. <!--/ko-->
  31. <div class="amazon-widget-container">
  32. <div id="walletWidgetDiv" class="amazon-widget amazon-widget--payment" data-bind="afterRender: initPaymentWidget"></div>
  33. </div>
  34. <div class="checkout-agreements-block">
  35. <!-- ko foreach: $parent.getRegion('before-place-order') -->
  36. <!-- ko template: getTemplate() --><!-- /ko -->
  37. <!--/ko-->
  38. </div>
  39. <div class="actions-toolbar">
  40. <div class="primary">
  41. <button class="action primary checkout"
  42. type="submit"
  43. data-bind="
  44. click: placeOrder,
  45. attr: {title: $t('Place Order')},
  46. css: {disabled: isPlaceOrderDisabled()},
  47. enable: (getCode() == isChecked())
  48. "
  49. disabled>
  50. <span data-bind="i18n: 'Place Order'"></span>
  51. </button>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <!--/ko-->
  57. <!--/ko-->