@hmcts/ccpay-web-component 4.0.1-beta24 → 4.0.1-beta25

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.
@@ -8686,31 +8686,36 @@ var PbaPaymentComponent = /** @class */ (function () {
8686
8686
  this.isPBAAccountNotExist = false;
8687
8687
  this.isPBAServerError = false;
8688
8688
  this.isPBAAccountPaymentSuccess = false;
8689
- /** @type {?} */
8690
- var requestBody = new IserviceRequestPbaPayment(this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef);
8691
- this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)
8692
- .subscribe((/**
8693
- * @param {?} r
8694
- * @return {?}
8695
- */
8696
- function (r) {
8697
- _this.pbaAccountrPaymentResult = JSON.parse(r).data;
8698
- _this.isPBAAccountPaymentSuccess = true;
8699
- }), (/**
8700
- * @param {?} e
8701
- * @return {?}
8702
- */
8703
- function (e) {
8704
- if (e.status == '402') {
8705
- _this.isInSufficiantFund = true;
8706
- }
8707
- else if (e.status == '410' || e.status == '412') {
8708
- _this.isPBAAccountNotExist = true;
8709
- }
8710
- else {
8711
- _this.isPBAServerError = true;
8712
- }
8713
- }));
8689
+ if (this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1) {
8690
+ /** @type {?} */
8691
+ var requestBody = new IserviceRequestPbaPayment(this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef);
8692
+ this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)
8693
+ .subscribe((/**
8694
+ * @param {?} r
8695
+ * @return {?}
8696
+ */
8697
+ function (r) {
8698
+ _this.pbaAccountrPaymentResult = JSON.parse(r).data;
8699
+ _this.isPBAAccountPaymentSuccess = true;
8700
+ }), (/**
8701
+ * @param {?} e
8702
+ * @return {?}
8703
+ */
8704
+ function (e) {
8705
+ if (e.status == '402') {
8706
+ _this.isInSufficiantFund = true;
8707
+ }
8708
+ else if (e.status == '410' || e.status == '412') {
8709
+ _this.isPBAAccountNotExist = true;
8710
+ }
8711
+ else {
8712
+ _this.isPBAServerError = true;
8713
+ }
8714
+ }));
8715
+ }
8716
+ else {
8717
+ this.isPBAServerError = true;
8718
+ }
8714
8719
  };
8715
8720
  /**
8716
8721
  * @return {?}