@hmcts/ccpay-web-component 6.0.0-beta6 → 6.0.0-beta8
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 +28 -4
- 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/payment-lib.component.js +5 -1
- package/esm2015/lib/payment-lib.service.js +16 -1
- package/esm2015/lib/services/payment-view/payment-view.service.js +4 -1
- package/esm5/lib/payment-lib.component.js +5 -1
- package/esm5/lib/payment-lib.service.js +23 -1
- package/esm5/lib/services/payment-view/payment-view.service.js +4 -1
- package/fesm2015/hmcts-ccpay-web-component.js +18 -0
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +25 -0
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/hmcts-ccpay-web-component.metadata.json +1 -1
- package/lib/payment-lib.component.d.ts +1 -0
- package/lib/payment-lib.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _throw } from 'rxjs/observable/throw';
|
|
2
|
+
import { v4 } from 'uuid';
|
|
2
3
|
import { BehaviorSubject } from 'rxjs';
|
|
3
4
|
import { HttpClient, HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
4
5
|
import { catchError } from 'rxjs/operators';
|
|
@@ -83,6 +84,26 @@ var PaymentLibService = /** @class */ (function () {
|
|
|
83
84
|
function () {
|
|
84
85
|
return this.REFUNDS_API_ROOT;
|
|
85
86
|
};
|
|
87
|
+
/**
|
|
88
|
+
* @param {?} currentEnvironment
|
|
89
|
+
* @return {?}
|
|
90
|
+
*/
|
|
91
|
+
PaymentLibService.prototype.setCurrentEnv = /**
|
|
92
|
+
* @param {?} currentEnvironment
|
|
93
|
+
* @return {?}
|
|
94
|
+
*/
|
|
95
|
+
function (currentEnvironment) {
|
|
96
|
+
this.CURRENTENV = currentEnvironment;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* @return {?}
|
|
100
|
+
*/
|
|
101
|
+
PaymentLibService.prototype.getCurrentEnv = /**
|
|
102
|
+
* @return {?}
|
|
103
|
+
*/
|
|
104
|
+
function () {
|
|
105
|
+
return this.CURRENTENV;
|
|
106
|
+
};
|
|
86
107
|
PaymentLibService.decorators = [
|
|
87
108
|
{ type: Injectable, args: [{
|
|
88
109
|
providedIn: 'root'
|
|
@@ -538,6 +559,7 @@ var PaymentLibComponent = /** @class */ (function () {
|
|
|
538
559
|
this.paymentLibService.setApiRootUrl(this.API_ROOT);
|
|
539
560
|
this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);
|
|
540
561
|
this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);
|
|
562
|
+
this.paymentLibService.setCurrentEnv(this.CURRENTENV);
|
|
541
563
|
if (this.LOGGEDINUSERROLES.length > 0) {
|
|
542
564
|
this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);
|
|
543
565
|
}
|
|
@@ -580,6 +602,7 @@ var PaymentLibComponent = /** @class */ (function () {
|
|
|
580
602
|
API_ROOT: [{ type: Input, args: ['API_ROOT',] }],
|
|
581
603
|
BULKSCAN_API_ROOT: [{ type: Input, args: ['BULKSCAN_API_ROOT',] }],
|
|
582
604
|
REFUNDS_API_ROOT: [{ type: Input, args: ['REFUNDS_API_ROOT',] }],
|
|
605
|
+
CURRENTENV: [{ type: Input, args: ['CURRENTENV',] }],
|
|
583
606
|
CCD_CASE_NUMBER: [{ type: Input, args: ['CCD_CASE_NUMBER',] }],
|
|
584
607
|
EXC_REFERENCE: [{ type: Input, args: ['EXC_REFERENCE',] }],
|
|
585
608
|
PAYMENT_METHOD: [{ type: Input, args: ['PAYMENT_METHOD',] }],
|
|
@@ -1077,6 +1100,7 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1077
1100
|
function (serviceRef, body) {
|
|
1078
1101
|
/** @type {?} */
|
|
1079
1102
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/card-payments";
|
|
1103
|
+
body['return-url'] = "https://paybubble." + this.paymentLibService.CURRENTENV + ".platform.hmcts.net/payment";
|
|
1080
1104
|
return this.https.post(url, body).pipe(catchError(this.errorHandlerService.handleError));
|
|
1081
1105
|
};
|
|
1082
1106
|
/**
|
|
@@ -1090,6 +1114,7 @@ var PaymentViewService = /** @class */ (function () {
|
|
|
1090
1114
|
* @return {?}
|
|
1091
1115
|
*/
|
|
1092
1116
|
function (serviceRef, body) {
|
|
1117
|
+
body['idempotency_key'] = v4();
|
|
1093
1118
|
/** @type {?} */
|
|
1094
1119
|
var url = this.paymentLibService.API_ROOT + "/service-request/" + serviceRef + "/pba-payments";
|
|
1095
1120
|
return this.https.post(url, body);
|