All files / src/app/shared/components/payment/payment-paypal payment-paypal.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 1333x                                                                                                                                                                                                                                                                        
<div class="row">
  <div [class.pt-2]="adapterType === 'Messages' || pageType === 'cart'">
    <!-- PayPal Button, Messages, Google Pay and Apple Pay container -->
    @if (adapterType !== 'CardFields') {
      <div [id]="paypalComponentContainerId"></div>
    } @else {
      <!-- PayPal Card Fields containers -->
      <div class="card_container">
        <div class="row form-group">
          <!-- Render error message for card fields -->
          @if (renderError$ | async; as errorMessageKey) {
            <div class="col-12">
              <div class="alert alert-danger" role="alert">
                <span [ishServerHtml]="errorMessageKey | translate"></span>
              </div>
            </div>
          }
 
          <div class="col-form-label col-md-4" id="card-name-field-container-label">
            {{ 'checkout.credit_card.holder.label' | translate }}
          </div>
          <div class="col-md-6 fix-height" id="card-name-field-container"></div>
          <div class="offset-md-4">
            <small
              class="validation-error hide-validation-error"
              labelId="card-name-field-container-label"
              [ishPaypalError]="nameFieldError$ | async"
            >
              {{ 'checkout.credit_card.holder.error.invalid' | translate }}
            </small>
          </div>
        </div>
 
        <div class="row form-group">
          <div class="col-form-label col-md-4" id="card-number-field-container-label">
            {{ 'checkout.credit_card.number.label' | translate }}
            <span aria-hidden="true" class="required">*</span>
          </div>
          <div class="col-md-6 fix-height" id="card-number-field-container"></div>
          <div class="offset-md-4">
            <small
              class="validation-error hide-validation-error"
              labelId="card-number-field-container-label"
              [ishPaypalError]="numberFieldError$ | async"
            >
              {{ 'checkout.credit_card.number.error.default' | translate }}
            </small>
          </div>
        </div>
 
        <div class="row form-group">
          <div class="col-form-label col-md-4" id="card-expiry-field-container-label">
            {{ 'checkout.credit_card.expiration_date.label' | translate }}
            <span class="required">*</span>
          </div>
          <div class="col-md-8">
            <div class="row">
              <div class="pe-0 col-4 fix-height" id="card-expiry-field-container"></div>
            </div>
            <small
              class="validation-error hide-validation-error"
              labelId="card-expiry-field-container-label"
              [ishPaypalError]="expiryFieldError$ | async"
            >
              {{ 'checkout.credit_card.expiry_date.invalid.error' | translate }}
            </small>
          </div>
        </div>
 
        <div class="row form-group">
          <div class="col-form-label col-md-4" id="card-cvv-field-container-label">
            {{ 'checkout.payment.paypal.credit_card.cvc.label' | translate }}
            <span aria-hidden="true" class="required">*</span>
          </div>
          <div class="col-md-8">
            <div class="row">
              <div class="pe-0 col-4 fix-height" id="card-cvv-field-container"></div>
              <div class="ps-0 col-auto">
                <ng-template #CVCHelp>
                  <span [innerHTML]="'checkout.credit_card.cvc.popover.content' | translate"></span>
                </ng-template>
                <button
                  class="btn btn-link"
                  placement="auto"
                  type="button"
                  [attr.aria-label]="'checkout.payment.paypal.credit_card.cvc.popover.title' | translate"
                  [ngbPopover]="CVCHelp"
                  [popoverTitle]="'checkout.payment.paypal.credit_card.cvc.popover.title' | translate"
                >
                  <i class="bi bi-question-circle"></i>
                </button>
              </div>
              <small
                class="validation-error hide-validation-error"
                labelId="card-cvv-field-container-label"
                [ishPaypalError]="cvvFieldError$ | async"
              >
                {{ 'checkout.credit_card.cvc_cvv.error.default' | translate }}
              </small>
            </div>
          </div>
        </div>
      </div>
 
      <div class="row">
        <div class="offset-md-4 col-md-8">
          <button
            class="btn btn-primary"
            id="card-field-submit-button"
            type="button"
            [attr.aria-label]="'checkout.button.continue.label.aria_label' | translate"
            [disabled]="loadingIframe$ | async"
          >
            @if ((loadingIframe$ | async) === true) {
              <i class="bi bi-arrow-clockwise spin-icon"></i>
            }
            {{ 'checkout.button.continue.label' | translate }}
          </button>
 
          <button
            class="btn btn-secondary"
            id="card-field-cancel-button"
            type="button"
            [attr.aria-label]="'checkout.cancel.button.label.aria_label' | translate"
          >
            {{ 'checkout.cancel.button.label' | translate }}
          </button>
        </div>
      </div>
    }
  </div>
</div>