Skip to content

Commit

Permalink
fix: send $async_reset command for payment after authenticate
Browse files Browse the repository at this point in the history
fix: getting payment intent status on confirm card payment
test: should reset async payment after authenticate
chore: update rollup, babel, webpack
chore: add eslint
  • Loading branch information
awwit committed Jan 22, 2024
1 parent d018da4 commit a78613c
Show file tree
Hide file tree
Showing 11 changed files with 15,504 additions and 19,657 deletions.
13 changes: 11 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime"]
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
[
"@babel/plugin-syntax-import-attributes",
{ "deprecatedAssertSyntax": true }
],
"@babel/plugin-transform-runtime"
]
}
46 changes: 46 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"root": true,
"parser": "@babel/eslint-parser",
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"requireConfigFile": false,
"sourceType": "module",
"ecmaVersion": 2021
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"es2021": true
},
"rules": {
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
},
"overrides": [
{
"files": [
"*.test.js",
"test/**/*.{js,cjs}",
"mocks/**/*.js"
],
"plugins": ["jest"],
"extends": [
"plugin:react/recommended",
"plugin:jest/recommended"
],
"env": {
"node": true,
"jest/globals": true
},
"rules": {
"n/no-unpublished-require": "off"
}
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"files.watcherExclude": {
"**/dist/*": true
},
"search.exclude": {
"**/dist/*": true
}
}
4 changes: 4 additions & 0 deletions mocks/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ const mockPayment = {
return {
id: 'paypal_order_id',
};

case 'stripe':
return { id: 'stripe' };

default:
throw new Error(`Unknown gateway: ${gateway}`);
}
Expand Down
Loading

0 comments on commit a78613c

Please sign in to comment.