From 41b1295f9e583476ee5366ecd6298ef5d4c8972f Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Wed, 13 Jan 2021 17:29:48 +0100 Subject: [PATCH] Move mollie code ( srvice ) uit farmmapslib halen ( is open source ), naar farmmaps --- .../common/src/fm/common-service.module.ts | 4 +-- projects/common/src/fm/common.module.ts | 7 +---- .../src/fm/models/mollie.payment.request.ts | 16 ----------- .../src/fm/models/mollie.payment.response.ts | 19 ------------- .../common/src/fm/services/mollie.service.ts | 27 ------------------- 5 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 projects/common/src/fm/models/mollie.payment.request.ts delete mode 100644 projects/common/src/fm/models/mollie.payment.response.ts delete mode 100644 projects/common/src/fm/services/mollie.service.ts diff --git a/projects/common/src/fm/common-service.module.ts b/projects/common/src/fm/common-service.module.ts index 78f4827..7a340be 100644 --- a/projects/common/src/fm/common-service.module.ts +++ b/projects/common/src/fm/common-service.module.ts @@ -31,7 +31,6 @@ import { StateSerializerService } from './services/state-serializer.service'; import { PackageService } from './services/package.service'; import { PackagePreloadStrategy } from './services/package-preload-strategy.service'; import { SenmlService } from './services/senml-service'; -import { MollieService } from './services/mollie.service'; export { FolderService, @@ -54,8 +53,7 @@ export { SchemaService, PackageService, SenmlService, - PackagePreloadStrategy, - MollieService + PackagePreloadStrategy }; @NgModule({ diff --git a/projects/common/src/fm/common.module.ts b/projects/common/src/fm/common.module.ts index 334b47f..bd08884 100644 --- a/projects/common/src/fm/common.module.ts +++ b/projects/common/src/fm/common.module.ts @@ -56,8 +56,6 @@ import { SecureOAuthStorage} from './shared/secureOAuthStorage'; import { GradientComponent } from './components/gradient/gradient.component'; import { GradientSelectComponent } from './components/gradient-select/gradient-select.component'; import { AppMenuComponent } from './components/app-menu/app-menu.component'; -import { IMolliePaymentRequest, MolliePaymentRequest } from './models/mollie.payment.request'; -import { IMolliePaymentResponse } from './models/mollie.payment.response'; export { SafePipe, @@ -98,10 +96,7 @@ export { ISenMLItem, IDataLayer, IColor, - IGradientstop, - IMolliePaymentRequest, - MolliePaymentRequest, - IMolliePaymentResponse + IGradientstop }; @NgModule({ diff --git a/projects/common/src/fm/models/mollie.payment.request.ts b/projects/common/src/fm/models/mollie.payment.request.ts deleted file mode 100644 index 7e7761c..0000000 --- a/projects/common/src/fm/models/mollie.payment.request.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IItem } from "./item"; - -export interface IMolliePaymentRequest { - templatePackageItem?: IItem, - redirectUrl?: string, - locale?: string, - } - - export class MolliePaymentRequest implements IMolliePaymentRequest { - public templatePackageItem?: IItem; - public redirectUrl?: string; - public locale?: string; - - constructor() { - } - } \ No newline at end of file diff --git a/projects/common/src/fm/models/mollie.payment.response.ts b/projects/common/src/fm/models/mollie.payment.response.ts deleted file mode 100644 index 7db9dfc..0000000 --- a/projects/common/src/fm/models/mollie.payment.response.ts +++ /dev/null @@ -1,19 +0,0 @@ - -export interface IMolliePaymentResponse { - createdAt?: Date, - expiresAt?: Date, - currency?: string, - amount?: string, - checkoutUrl?: string, - } - - export class MolliePaymentResponse implements IMolliePaymentResponse { - public createdAt?: Date; - public expiresAt?: Date; - public currency?: string; - public amount?: string; - public checkoutUrl?: string; - - constructor() { - } - } \ No newline at end of file diff --git a/projects/common/src/fm/services/mollie.service.ts b/projects/common/src/fm/services/mollie.service.ts deleted file mode 100644 index 5b38b21..0000000 --- a/projects/common/src/fm/services/mollie.service.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from "@angular/common/http"; -import { AppConfig } from "../shared/app.config"; -import { Observable } from 'rxjs'; -import { IMolliePaymentResponse } from '../models/mollie.payment.response'; -import { IMolliePaymentRequest } from '../models/mollie.payment.request'; - -@Injectable({ - providedIn: 'root', -}) - -export class MollieService { - constructor( - public httpClient: HttpClient, - public appConfig: AppConfig) { - } - - ApiEndpoint() { - return this.appConfig.getConfig("apiEndPoint"); - } - - createMolliePayment(paymentRequest: IMolliePaymentRequest): Observable { - return this.httpClient.post( - `${this.ApiEndpoint()}/api/v1/payments/create`, - paymentRequest); - } -} \ No newline at end of file