@hmcts/ccpay-web-component 5.0.1-beta150 → 5.0.1-beta153
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.
- package/bundles/hmcts-ccpay-web-component.umd.js +30 -26
- package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
- package/esm2015/lib/components/case-transactions/case-transactions.component.js +15 -20
- package/esm2015/lib/components/pba-payment/pba-payment.component.js +7 -2
- package/esm2015/lib/services/payment-view/payment-view.service.js +7 -4
- package/esm5/lib/components/case-transactions/case-transactions.component.js +15 -20
- package/esm5/lib/components/pba-payment/pba-payment.component.js +7 -2
- package/esm5/lib/services/payment-view/payment-view.service.js +7 -4
- package/fesm2015/hmcts-ccpay-web-component.js +26 -23
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +26 -23
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _throw } from 'rxjs/observable/throw';
|
|
2
|
-
import { v4 } from 'uuid';
|
|
3
2
|
import { BehaviorSubject } from 'rxjs';
|
|
4
3
|
import { HttpClient, HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
5
4
|
import { catchError } from 'rxjs/operators';
|
|
@@ -1135,7 +1134,9 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1135
1134
|
function (serviceRef, body) {
|
|
1136
1135
|
/** @type {?} */
|
|
1137
1136
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/card-payments";
|
|
1138
|
-
|
|
1137
|
+
/** @type {?} */
|
|
1138
|
+
var rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');
|
|
1139
|
+
body['return-url'] = rurl + "/payment";
|
|
1139
1140
|
return this.https.post(url, body).pipe(catchError(this.errorHandlerService.handleError));
|
|
1140
1141
|
};
|
|
1141
1142
|
/**
|
|
@@ -1149,7 +1150,9 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1149
1150
|
* @return {?}
|
|
1150
1151
|
*/
|
|
1151
1152
|
function (serviceRef, body) {
|
|
1152
|
-
|
|
1153
|
+
/** @type {?} */
|
|
1154
|
+
var randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');
|
|
1155
|
+
body['idempotency_key'] = randomKey;
|
|
1153
1156
|
/** @type {?} */
|
|
1154
1157
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/pba-payments";
|
|
1155
1158
|
return this.https.post(url, body);
|
|
@@ -3967,17 +3970,13 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
3967
3970
|
}
|
|
3968
3971
|
}));
|
|
3969
3972
|
}
|
|
3970
|
-
|
|
3971
|
-
if (
|
|
3972
|
-
_this.orderStatus =
|
|
3973
|
+
// this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
3974
|
+
if (paymentGroup.service_request_status === 'Paid') {
|
|
3975
|
+
_this.orderStatus = paymentGroup.service_request_status;
|
|
3973
3976
|
_this.orderAddBtnEnable = false;
|
|
3974
3977
|
}
|
|
3975
|
-
else if (
|
|
3976
|
-
_this.orderStatus =
|
|
3977
|
-
_this.orderAddBtnEnable = true;
|
|
3978
|
-
}
|
|
3979
|
-
else {
|
|
3980
|
-
_this.orderStatus = 'Not paid';
|
|
3978
|
+
else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {
|
|
3979
|
+
_this.orderStatus = paymentGroup.service_request_status;
|
|
3981
3980
|
_this.orderAddBtnEnable = true;
|
|
3982
3981
|
}
|
|
3983
3982
|
//this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']
|
|
@@ -4067,18 +4066,17 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
4067
4066
|
}));
|
|
4068
4067
|
}
|
|
4069
4068
|
}
|
|
4069
|
+
_this.orderStatus = orderDetail.service_request_status;
|
|
4070
4070
|
}));
|
|
4071
|
-
this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
4071
|
+
//this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
4072
4072
|
// this.orderRef = orderReferenceObj.orderRefId;
|
|
4073
|
-
if (this.orderPendingPayments <= 0.00) {
|
|
4074
|
-
|
|
4075
|
-
}
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
this.orderStatus = 'Not paid';
|
|
4081
|
-
}
|
|
4073
|
+
// if (this.orderPendingPayments <= 0.00) {
|
|
4074
|
+
// this.orderStatus = 'Paid';
|
|
4075
|
+
// } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
|
|
4076
|
+
// this.orderStatus = 'Partially paid'
|
|
4077
|
+
// } else {
|
|
4078
|
+
// this.orderStatus = 'Not paid'
|
|
4079
|
+
// }
|
|
4082
4080
|
if (this.cpoDetails !== null) {
|
|
4083
4081
|
this.orderParty = this.cpoDetails['responsibleParty'];
|
|
4084
4082
|
this.orderCreated = this.cpoDetails['createdTimestamp'];
|
|
@@ -10868,7 +10866,12 @@ var PbaPaymentComponent = /** @class */ (function () {
|
|
|
10868
10866
|
* @return {?}
|
|
10869
10867
|
*/
|
|
10870
10868
|
function (r) {
|
|
10871
|
-
|
|
10869
|
+
try {
|
|
10870
|
+
_this.pbaAccountrPaymentResult = JSON.parse(r);
|
|
10871
|
+
}
|
|
10872
|
+
catch (e) {
|
|
10873
|
+
_this.pbaAccountrPaymentResult = r;
|
|
10874
|
+
}
|
|
10872
10875
|
_this.isPBAAccountPaymentSuccess = true;
|
|
10873
10876
|
}), (/**
|
|
10874
10877
|
* @param {?} e
|