@dsivd/prestations-ng 14.5.15 → 15.0.0-beta1
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/dsivd-prestations-ng.umd.js +18 -49
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v15.0.0-beta1.tgz +0 -0
- package/esm2015/sdk-epayment/sdk-epayment.component.js +10 -39
- package/esm2015/sdk-epayment/sdk-epayment.service.js +12 -7
- package/fesm2015/dsivd-prestations-ng.js +18 -44
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/package.json +1 -1
- package/sdk-epayment/sdk-epayment.component.d.ts +3 -13
- package/sdk-epayment/sdk-epayment.service.d.ts +2 -5
- package/dsivd-prestations-ng-v14.5.15.tgz +0 -0
- package/esm2015/sdk-epayment/model/EPaymentRequest.js +0 -3
- package/sdk-epayment/model/EPaymentRequest.d.ts +0 -5
|
@@ -11348,12 +11348,6 @@
|
|
|
11348
11348
|
}]
|
|
11349
11349
|
}] });
|
|
11350
11350
|
|
|
11351
|
-
var EPaymentRequest = /** @class */ (function () {
|
|
11352
|
-
function EPaymentRequest() {
|
|
11353
|
-
}
|
|
11354
|
-
return EPaymentRequest;
|
|
11355
|
-
}());
|
|
11356
|
-
|
|
11357
11351
|
var EPaymentService = /** @class */ (function () {
|
|
11358
11352
|
function EPaymentService(http, growlService) {
|
|
11359
11353
|
this.http = http;
|
|
@@ -11364,14 +11358,19 @@
|
|
|
11364
11358
|
* en vue du passage sur la plateforme de paiement électronique.
|
|
11365
11359
|
*
|
|
11366
11360
|
* @param ref La référence de la demande en cours
|
|
11367
|
-
* @param req Les paramètres de préparation
|
|
11368
11361
|
* @param baseUrl L'url de base (optionnelle)
|
|
11369
|
-
* @returns
|
|
11362
|
+
* @returns la page de paiement sur laquelle rediriger l'utilisateur
|
|
11370
11363
|
*/
|
|
11371
|
-
EPaymentService.prototype.createPendingPayment = function (ref,
|
|
11364
|
+
EPaymentService.prototype.createPendingPayment = function (ref, baseUrl) {
|
|
11372
11365
|
var _this = this;
|
|
11373
|
-
|
|
11374
|
-
|
|
11366
|
+
return this.http
|
|
11367
|
+
.post(baseUrl + "epayment/prepare/" + ref, null, {
|
|
11368
|
+
responseType: 'text'
|
|
11369
|
+
})
|
|
11370
|
+
.pipe(operators.catchError(function (err) {
|
|
11371
|
+
_this.cancelPendingPayment(ref, baseUrl);
|
|
11372
|
+
throw new Error();
|
|
11373
|
+
}));
|
|
11375
11374
|
};
|
|
11376
11375
|
EPaymentService.prototype.cancelPendingPayment = function (ref, baseUrl) {
|
|
11377
11376
|
var _this = this;
|
|
@@ -11433,20 +11432,14 @@
|
|
|
11433
11432
|
* Déclenche le processus de paiement électronique. Le paiement est d'abord préparé avec GesDem, puis on navigue
|
|
11434
11433
|
* vers la plateforme de paiement.
|
|
11435
11434
|
*
|
|
11436
|
-
* @param
|
|
11437
|
-
* @param prenom Le prénom du payeur
|
|
11438
|
-
* @param nom Le nom de famille du payeur
|
|
11439
|
-
* @param adresse L'adresse postale du payeur
|
|
11435
|
+
* @param reference La référence de la demande en cours
|
|
11440
11436
|
*/
|
|
11441
|
-
SdkEpaymentComponent.prototype.payNow = function (
|
|
11442
|
-
var _this = this;
|
|
11443
|
-
var req = new EPaymentRequest();
|
|
11444
|
-
req.firstName = prenom;
|
|
11445
|
-
req.lastName = nom;
|
|
11446
|
-
req.address = adresse;
|
|
11437
|
+
SdkEpaymentComponent.prototype.payNow = function (reference) {
|
|
11447
11438
|
this.ePaymentService
|
|
11448
|
-
.createPendingPayment(
|
|
11449
|
-
.subscribe(function (
|
|
11439
|
+
.createPendingPayment(reference, this.baseUrl)
|
|
11440
|
+
.subscribe(function (redirectUrl) {
|
|
11441
|
+
window.location.href = redirectUrl;
|
|
11442
|
+
});
|
|
11450
11443
|
};
|
|
11451
11444
|
SdkEpaymentComponent.prototype.handleFailure = function () {
|
|
11452
11445
|
var _this = this;
|
|
@@ -11464,31 +11457,10 @@
|
|
|
11464
11457
|
});
|
|
11465
11458
|
this.modalDisplayed = true;
|
|
11466
11459
|
};
|
|
11467
|
-
/**
|
|
11468
|
-
* Prépare et soumet le formulaire HTML permettant de naviguer vers la plateforme de paiement électronique.
|
|
11469
|
-
*
|
|
11470
|
-
* @param param Objet retourné par GesDem contenant tous les paramètres nécessaires à la plateforme.
|
|
11471
|
-
*/
|
|
11472
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11473
|
-
SdkEpaymentComponent.prototype.jumpToPlatform = function (param) {
|
|
11474
|
-
var _this = this;
|
|
11475
|
-
// Assembler les champs du formulaire à soumettre à la plateforme
|
|
11476
|
-
Object.keys(param).forEach(function (key) {
|
|
11477
|
-
var input = document.createElement('input');
|
|
11478
|
-
input.type = 'hidden';
|
|
11479
|
-
input.name = key.toUpperCase();
|
|
11480
|
-
input.value = param[key];
|
|
11481
|
-
_this.ePaymentForm.nativeElement.appendChild(input);
|
|
11482
|
-
});
|
|
11483
|
-
// Remplissage du formulaire
|
|
11484
|
-
this.ePaymentForm.nativeElement.setAttribute('action', param.postFinanceUrl);
|
|
11485
|
-
// Soumettre le formulaire
|
|
11486
|
-
this.ePaymentForm.nativeElement.submit();
|
|
11487
|
-
};
|
|
11488
11460
|
return SdkEpaymentComponent;
|
|
11489
11461
|
}());
|
|
11490
11462
|
SdkEpaymentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SdkEpaymentComponent, deps: [{ token: EPaymentService }, { token: i1__namespace$1.ActivatedRoute }, { token: GesdemHandlerService }, { token: GesdemEventService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11491
|
-
SdkEpaymentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SdkEpaymentComponent, selector: "epayment-form", inputs: { baseUrl: "baseUrl" },
|
|
11463
|
+
SdkEpaymentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SdkEpaymentComponent, selector: "epayment-form", inputs: { baseUrl: "baseUrl" }, ngImport: i0__namespace, template: "<foehn-modal\n [isModalVisible]=\"this.modalDisplayed\"\n [modalBodyText]=\"this.platformFailureMessage\"\n modalHeaderText=\"Le paiement n'a pu \u00EAtre effectu\u00E9\"\n modalFooterText=\"L'Administration Cantonale Vaudoise\"\n (click)=\"this.modalDisplayed = false\"\n></foehn-modal>\n", styles: [""], components: [{ type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "modalFooterText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }] });
|
|
11492
11464
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SdkEpaymentComponent, decorators: [{
|
|
11493
11465
|
type: i0.Component,
|
|
11494
11466
|
args: [{
|
|
@@ -11497,10 +11469,7 @@
|
|
|
11497
11469
|
templateUrl: './sdk-epayment.component.html',
|
|
11498
11470
|
styleUrls: ['./sdk-epayment.component.css']
|
|
11499
11471
|
}]
|
|
11500
|
-
}], ctorParameters: function () { return [{ type: EPaymentService }, { type: i1__namespace$1.ActivatedRoute }, { type: GesdemHandlerService }, { type: GesdemEventService }]; }, propDecorators: {
|
|
11501
|
-
type: i0.ViewChild,
|
|
11502
|
-
args: ['ePaymentForm', { static: true }]
|
|
11503
|
-
}], baseUrl: [{
|
|
11472
|
+
}], ctorParameters: function () { return [{ type: EPaymentService }, { type: i1__namespace$1.ActivatedRoute }, { type: GesdemHandlerService }, { type: GesdemEventService }]; }, propDecorators: { baseUrl: [{
|
|
11504
11473
|
type: i0.Input
|
|
11505
11474
|
}] } });
|
|
11506
11475
|
|