@hmcts/ccpay-web-component 6.0.0-beta14 → 6.0.0-beta15

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