Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## v1.4.3

Fixed

- Failed to get the process key during custom application initialization

## v1.4.2

- Support for payment methods `in3`, `alma`, `payconiq`
Expand Down
5 changes: 0 additions & 5 deletions application/custom-application-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const config = {
labelAllLocales: [],
permissions: [PERMISSIONS.Manage],
},
headers: {
csp: {
'connect-src': ['*.euope-west1.gcp.commercetoolsr.app'],
},
},
};

export default config;
2 changes: 1 addition & 1 deletion application/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shopmacher-mollie-application",
"version": "1.4.2",
"version": "1.4.3",
"description": "Integration application between commercetools and mollie payment service provider",
"private": true,
"scripts": {
Expand Down
34 changes: 27 additions & 7 deletions application/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
// Make sure to import the helper functions from the `ssr` entry point.
import { entryPointUriPathToPermissionKeys } from '@commercetools-frontend/application-shell/ssr';

export const entryPointUriPath = process.env.ENTRY_POINT_URI_PATH ?? 'mollie';
declare global {
interface Window {
app?: {
[key: string]: string;
entryPointUriPath: string;
};
}
}

const getConfig = (processKey: string, windowKey: string) => {
return typeof window === 'undefined'
? process.env[processKey]
: window.app?.[windowKey];
};

export const entryPointUriPath =
getConfig('ENTRY_POINT_URI_PATH', 'entryPointUriPath') ?? 'mollie';

export const PERMISSIONS = entryPointUriPathToPermissionKeys(entryPointUriPath);
export const CLOUD_IDENTIFIER = process.env.CLOUD_IDENTIFIER ?? 'gcp-eu';
export const CUSTOM_APPLICATION_ID = process.env.CUSTOM_APPLICATION_ID ?? '';
export const CLOUD_IDENTIFIER =
getConfig('CLOUD_IDENTIFIER', 'cloudIdentifier') ?? 'gcp-eu';
export const CUSTOM_APPLICATION_ID =
getConfig('CUSTOM_APPLICATION_ID', 'customApplicationId') ?? '';
export const APPLICATION_URL =
process.env.APPLICATION_URL ?? 'https://mollie.app';
getConfig('APPLICATION_URL', 'applicationUrl') ?? 'https://your-app-url.com';

export const OBJECT_CONTAINER_NAME = 'sctm-app-methods';
export const EXTENSION_KEY = 'sctm-payment-create-update-extension';
export const EXTENSION_URL_PATH = '/processor';
export const APPLICATION_URL_PATH = '/application/methods';
export const USER_AGENT = {
name: 'ShopmacherMollieCommercetoolsConnector/1.4.2',
version: '1.4.2',
libraryName: 'ShopmacherMollieCommercetoolsConnector/1.4.2',
name: 'ShopmacherMollieCommercetoolsConnector/1.4.3',
version: '1.4.3',
libraryName: 'ShopmacherMollieCommercetoolsConnector/1.4.3',
contactEmail: 'info@mollie.com',
};
6 changes: 3 additions & 3 deletions processor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion processor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "shopmacher-mollie-processor",
"description": "Integration between commercetools and mollie payment service provider",
"version": "1.4.2",
"version": "1.4.3",
"main": "index.js",
"private": true,
"scripts": {
Expand Down
Loading