@hmcts/ccpay-web-component 5.0.1-beta149 → 5.0.1-beta151

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.
@@ -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
- body['return-url'] = this.paymentLibService.CARDPAYMENTRETURNURL + "/payment";
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
- body['idempotency_key'] = v4();
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);