hpp-form.html 3.88 KB
Newer Older
rikterbeek's avatar
rikterbeek committed
1 2
<!--
/**
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *                       ######
 *                       ######
 * ############    ####( ######  #####. ######  ############   ############
 * #############  #####( ######  #####. ######  #############  #############
 *        ######  #####( ######  #####. ######  #####  ######  #####  ######
 * ###### ######  #####( ######  #####. ######  #####  #####   #####  ######
 * ###### ######  #####( ######  #####. ######  #####          #####  ######
 * #############  #############  #############  #############  #####  ######
 *  ############   ############  #############   ############  #####  ######
 *                                      ######
 *                               #############
 *                               ############
 *
 * Adyen Payment module (https://www.adyen.com/)
 *
 * Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
 * See LICENSE.txt for license details.
 *
 * Author: Adyen <magento@adyen.com>
rikterbeek's avatar
rikterbeek committed
22 23
 */
-->
24

25
<!-- ko foreach: getAdyenHppPaymentMethods() -->
26
    <div class="payment-method" data-bind="css: {'_active': (brandCode == $parent.isBrandCodeChecked())}">
27
        <div class="payment-method-title field choice">
28

29 30 31
            <input type="radio"
                   name="payment[method]"
                   class="radio"
32 33
                   data-bind="attr: {'id': 'adyen_' + brandCode}, value: 'adyen_' + brandCode, checked: brandCode == $parent.isBrandCodeChecked, click: $parent.selectPaymentMethodBrandCode"/>
            <label data-bind="attr: {'for': 'adyen_' + brandCode}" class="label">
34 35 36

                <!-- ko if: name.icon -->
                <img data-bind="attr: {
37 38 39
                            'src': icon.url,
                            'width': icon.url,
                            'height': icon.height
40 41 42
                            }">
                <!--/ko-->

43
                <span data-bind="text: name"></span>
44 45 46 47 48 49 50 51
            </label>
        </div>
        <div class="payment-method-content">

            <div class="payment-method-billing-address">
                <!-- ko foreach: $parents[1].getRegion($parent.getBillingAddressFormName()) -->
                <!-- ko template: getTemplate() --><!-- /ko -->
                <!--/ko-->
52 53
            </div>

54 55 56 57
            <form class="form" data-role="adyen-hpp-form" action="#" method="post" data-bind="mageInit: { 'validation':[]}, attr: {id: 'payment_form_' + $parent.getCode() + '_' + brandCode}">
                <fieldset class="fieldset" data-bind='attr: {id: "payment_fieldset_" + $parent.getCode() + "_" + brandCode}'>
                    <div data-bind='attr: {id: "adyen-alternative-payment-container-" + brandCode}'
                         afterRender="renderCheckoutComponent()"></div>
58
                </fieldset>
59 60


61 62 63 64
                <div class="checkout-agreements-block">
                    <!-- ko foreach: $parents[1].getRegion('before-place-order') -->
                    <!-- ko template: getTemplate() --><!-- /ko -->
                    <!--/ko-->
65 66
                </div>

67
                <div>
68
                    <span class="message message-error error hpp-message" data-bind="attr: {id: 'messages-' + brandCode}"></span>
69
                </div>
70

71 72 73 74 75 76
                <div class="actions-toolbar">
                    <div class="primary">
                        <button class="action primary checkout"
                                type="submit"
                                data-bind="
                                    click: $parent.continueToAdyenBrandCode,
77
                                    enable: placeOrderAllowed() && (brandCode == $parent.isBrandCodeChecked()),
78 79 80 81
                                    css: {disabled: !$parent.isPlaceOrderActionAllowed()}"
                                disabled>
                            <span data-bind="text: $t('Place Order')"></span>
                        </button>
82
                    </div>
83
                </div>
84
            </form>
85
        </div>
rikterbeek's avatar
rikterbeek committed
86
    </div>
87
<!--/ko-->