@hmcts/ccpay-web-component 5.0.2-beta69 → 5.0.2-beta70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1741,6 +1741,20 @@ var PaymentViewComponent = /** @class */ (function () {
1741
1741
  function (error) { return _this.errorMessage = error; }));
1742
1742
  }
1743
1743
  };
1744
+ /**
1745
+ * @param {?} paymentgrp
1746
+ * @return {?}
1747
+ */
1748
+ PaymentViewComponent.prototype.goToPaymentViewComponent = /**
1749
+ * @param {?} paymentgrp
1750
+ * @return {?}
1751
+ */
1752
+ function (paymentgrp) {
1753
+ this.paymentLibComponent.paymentMethod = paymentgrp.payments[0].method;
1754
+ this.paymentLibComponent.paymentGroupReference = paymentgrp.payment_group_reference;
1755
+ this.paymentLibComponent.paymentReference = paymentgrp.payments[0].reference;
1756
+ this.paymentLibComponent.viewName = 'payment-view';
1757
+ };
1744
1758
  /**
1745
1759
  * @param {?} paymentgrp
1746
1760
  * @return {?}
@@ -4086,11 +4100,16 @@ var CaseTransactionsComponent = /** @class */ (function () {
4086
4100
  }));
4087
4101
  }
4088
4102
  if (paymentGroup.payments) {
4103
+ /** @type {?} */
4104
+ var isFeeOverPaymentExist_1 = _this.overPaymentAmount === 0;
4089
4105
  paymentGroup.payments.forEach((/**
4090
4106
  * @param {?} payment
4091
4107
  * @return {?}
4092
4108
  */
4093
4109
  function (payment) {
4110
+ if (isFeeOverPaymentExist_1) {
4111
+ _this.overPaymentAmount = _this.overPaymentAmount + payment.over_payment;
4112
+ }
4094
4113
  if (payment.status.toUpperCase() === 'SUCCESS') {
4095
4114
  _this.orderTotalPayments = _this.orderTotalPayments + payment.amount;
4096
4115
  }