@hmcts/ccpay-web-component 5.0.7-beta44 → 5.0.7-beta45

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.
@@ -2938,13 +2938,17 @@
2938
2938
  * @return {?}
2939
2939
  */function (payment) {
2940
2940
  _this.paymentObj = payment;
2941
- return _this.notificationService.getNotificationInstructionType(_this.paymentObj.channel, _this.paymentObj.method);
2941
+ _this.paymentObj.reference = paymentReference;
2942
2942
  }), ( /**
2943
2943
  * @param {?} error
2944
2944
  * @return {?}
2945
- */function (error) {
2945
+ */function (error) { }));
2946
+ if (this.paymentObj != undefined && this.paymentObj != null && this.paymentObj.reference == paymentReference) {
2947
+ return this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
2948
+ }
2949
+ else {
2946
2950
  return 'Template';
2947
- }));
2951
+ }
2948
2952
  }
2949
2953
  else {
2950
2954
  return this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
@@ -8987,21 +8991,23 @@
8987
8991
  */
8988
8992
  function (paymentReference, payment) {
8989
8993
  var _this = this;
8990
- console.log('Hitting payment app');
8991
- if (payment == undefined || payment == null || (paymentReference != undefined && paymentReference != null && payment.reference != paymentReference)) {
8994
+ if (payment == undefined || payment == null || payment.reference != paymentReference) {
8992
8995
  this.paymentViewService.getPaymentDetails(paymentReference).subscribe(( /**
8993
8996
  * @param {?} payment
8994
8997
  * @return {?}
8995
8998
  */function (payment) {
8996
- console.log('Payment Object received: ' + JSON.stringify(payment));
8997
8999
  _this.paymentObj = payment;
8998
- return _this.notificationService.getNotificationInstructionType(_this.paymentObj.channel, _this.paymentObj.method);
9000
+ _this.paymentObj.reference = paymentReference;
8999
9001
  }), ( /**
9000
9002
  * @param {?} error
9001
9003
  * @return {?}
9002
- */function (error) {
9004
+ */function (error) { }));
9005
+ if (this.paymentObj != undefined && this.paymentObj != null && this.paymentObj.reference == paymentReference) {
9006
+ return this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
9007
+ }
9008
+ else {
9003
9009
  return 'Template';
9004
- }));
9010
+ }
9005
9011
  }
9006
9012
  else {
9007
9013
  return this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
@@ -10702,13 +10708,17 @@
10702
10708
  * @return {?}
10703
10709
  */function (payment) {
10704
10710
  _this.paymentObj = payment;
10705
- return _this.notificationService.getNotificationInstructionType(_this.paymentObj.channel, _this.paymentObj.method);
10711
+ _this.paymentObj.reference = paymentReference;
10706
10712
  }), ( /**
10707
10713
  * @param {?} error
10708
10714
  * @return {?}
10709
- */function (error) {
10715
+ */function (error) { }));
10716
+ if (this.paymentObj != undefined && this.paymentObj != null && this.paymentObj.reference == paymentReference) {
10717
+ return this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
10718
+ }
10719
+ else {
10710
10720
  return 'Template';
10711
- }));
10721
+ }
10712
10722
  }
10713
10723
  else {
10714
10724
  return this.notificationService.getNotificationInstructionType(payment.channel, payment.method);