-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processor initial config and Create Payment authorisation API implementation #3
Changes from 5 commits
628f63c
79ad77b
263f27a
043e4ae
3a64d5a
c7050b5
46e0a6d
6145e91
0bebe40
7727e2b
2b3b9ee
4fb312b
4d468d8
3ebf3e0
5676a37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add a new VITE env for session api url or region?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @koonweiteo-commercetools this file was just for testing purposes and we used it only locally, at some point we will remove this file entirelly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR, I am trying to focus only on Processor implementation, I will create another PR for Enabler changes. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,6 @@ | |
"noUnusedParameters": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will be better to set strict: true so that we can ensure stronger guarantees of program correctness. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree @koonweiteo-commercetools , but if that requiere to spend some time lets first try to deploy so we have a running connector and checkout can continue with the development of the integration and then this can be fixed. |
||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["lib", "decs.d.ts"] | ||
"include": [ | ||
"src", "decs.d.ts"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Server configuration | ||
NODE_ENV=development | ||
SERVER_HOST=0.0.0.0 | ||
SERVER_PORT=8080 | ||
|
||
# CoCo credentials | ||
CTP_AUTH_URL=https://auth.[region].commercetools.com | ||
CTP_API_URL=https://api.[region].commercetools.com | ||
CTP_CLIENT_ID=[CoCo-client-id] | ||
CTP_CLIENT_SECRET=[CoCo-client-secret] | ||
CTP_PROJECT_KEY=[CoCo-project-key] | ||
CTP_SESSION_URL=[CoCo-session-url] | ||
prateek-ct marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Merchant website | ||
SELLER_RETURN_URL=[Merchant-website-return-url] | ||
SELLER_SEND_NOTIFICATION_ENABLED=[true/false] | ||
SELLER_NOTIFICATION_URL=[Merchant-website-return-url] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"jest": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/typescript", | ||
"prettier", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "import", "jest", "prettier", "unused-imports"], | ||
"rules": { | ||
"no-redeclare": ["warn"], | ||
"no-console": ["error"], | ||
"no-unused-vars": "off", | ||
"no-irregular-whitespace": "warn", | ||
"no-duplicate-imports": "off", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"vars": "all", | ||
"varsIgnorePattern": "^_", | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": ["warn"], | ||
"import/no-duplicates": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
coverage | ||
node_modules | ||
pnpm-lock.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
arrowParens: 'always', | ||
bracketSameLine: true, | ||
bracketSpacing: true, | ||
printWidth: 120, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Payment Integration template Processor | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
|
||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running this locally with npm run dev it cant find this file. we will need to change this to :
/src/main.ts
for it to start in dev