@hmcts/ccpay-web-component 6.0.0-beta14 → 6.0.0-beta17
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';
|
|
@@ -1100,7 +1099,9 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1100
1099
|
function (serviceRef, body) {
|
|
1101
1100
|
/** @type {?} */
|
|
1102
1101
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/card-payments";
|
|
1103
|
-
|
|
1102
|
+
/** @type {?} */
|
|
1103
|
+
var rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');
|
|
1104
|
+
body['return-url'] = rurl + "/payment";
|
|
1104
1105
|
return this.https.post(url, body).pipe(catchError(this.errorHandlerService.handleError));
|
|
1105
1106
|
};
|
|
1106
1107
|
/**
|
|
@@ -1114,7 +1115,9 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1114
1115
|
* @return {?}
|
|
1115
1116
|
*/
|
|
1116
1117
|
function (serviceRef, body) {
|
|
1117
|
-
|
|
1118
|
+
/** @type {?} */
|
|
1119
|
+
var randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');
|
|
1120
|
+
body['idempotency_key'] = randomKey;
|
|
1118
1121
|
/** @type {?} */
|
|
1119
1122
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/pba-payments";
|
|
1120
1123
|
return this.https.post(url, body);
|
|
@@ -3480,17 +3483,13 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
3480
3483
|
}
|
|
3481
3484
|
}));
|
|
3482
3485
|
}
|
|
3483
|
-
|
|
3484
|
-
if (
|
|
3485
|
-
_this.orderStatus =
|
|
3486
|
+
// this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
3487
|
+
if (paymentGroup.service_request_status === 'Paid') {
|
|
3488
|
+
_this.orderStatus = paymentGroup.service_request_status;
|
|
3486
3489
|
_this.orderAddBtnEnable = false;
|
|
3487
3490
|
}
|
|
3488
|
-
else if (
|
|
3489
|
-
_this.orderStatus =
|
|
3490
|
-
_this.orderAddBtnEnable = true;
|
|
3491
|
-
}
|
|
3492
|
-
else {
|
|
3493
|
-
_this.orderStatus = 'Not paid';
|
|
3491
|
+
else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {
|
|
3492
|
+
_this.orderStatus = paymentGroup.service_request_status;
|
|
3494
3493
|
_this.orderAddBtnEnable = true;
|
|
3495
3494
|
}
|
|
3496
3495
|
//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']
|
|
@@ -3580,18 +3579,17 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
3580
3579
|
}));
|
|
3581
3580
|
}
|
|
3582
3581
|
}
|
|
3582
|
+
_this.orderStatus = orderDetail.service_request_status;
|
|
3583
3583
|
}));
|
|
3584
|
-
this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
3584
|
+
//this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
|
|
3585
3585
|
// this.orderRef = orderReferenceObj.orderRefId;
|
|
3586
|
-
if (this.orderPendingPayments <= 0.00) {
|
|
3587
|
-
|
|
3588
|
-
}
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
this.orderStatus = 'Not paid';
|
|
3594
|
-
}
|
|
3586
|
+
// if (this.orderPendingPayments <= 0.00) {
|
|
3587
|
+
// this.orderStatus = 'Paid';
|
|
3588
|
+
// } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
|
|
3589
|
+
// this.orderStatus = 'Partially paid'
|
|
3590
|
+
// } else {
|
|
3591
|
+
// this.orderStatus = 'Not paid'
|
|
3592
|
+
// }
|
|
3595
3593
|
if (this.cpoDetails !== null) {
|
|
3596
3594
|
this.orderParty = this.cpoDetails['responsibleParty'];
|
|
3597
3595
|
this.orderCreated = this.cpoDetails['createdTimestamp'];
|
|
@@ -9620,7 +9618,12 @@ var PbaPaymentComponent = /** @class */ (function () {
|
|
|
9620
9618
|
* @return {?}
|
|
9621
9619
|
*/
|
|
9622
9620
|
function (r) {
|
|
9623
|
-
|
|
9621
|
+
try {
|
|
9622
|
+
_this.pbaAccountrPaymentResult = JSON.parse(r);
|
|
9623
|
+
}
|
|
9624
|
+
catch (e) {
|
|
9625
|
+
_this.pbaAccountrPaymentResult = r;
|
|
9626
|
+
}
|
|
9624
9627
|
_this.isPBAAccountPaymentSuccess = true;
|
|
9625
9628
|
}), (/**
|
|
9626
9629
|
* @param {?} e
|