strapi-plugin-payone-provider 1.0.1 → 1.1.2

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.
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
-
3
- const BankIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill={color} />
6
- <path d="M12 6l-1.5 3L7 8.5l2.5 2.5L8 14l4-2.5L16 14l-1.5-3L18 8.5l-3.5.5L12 6z" fill={color} />
7
- </svg>
8
- );
9
-
10
- export default BankIcon;
1
+ import React from 'react';
2
+
3
+ const BankIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill={color} />
6
+ <path d="M12 6l-1.5 3L7 8.5l2.5 2.5L8 14l4-2.5L16 14l-1.5-3L18 8.5l-3.5.5L12 6z" fill={color} />
7
+ </svg>
8
+ );
9
+
10
+ export default BankIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const ChevronDownIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default ChevronDownIcon;
1
+ import React from 'react';
2
+
3
+ const ChevronDownIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default ChevronDownIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const ChevronUpIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default ChevronUpIcon;
1
+ import React from 'react';
2
+
3
+ const ChevronUpIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default ChevronUpIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const CreditCardIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default CreditCardIcon;
1
+ import React from 'react';
2
+
3
+ const CreditCardIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default CreditCardIcon;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
-
3
- const ErrorIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill={color} />
6
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z" fill={color} />
7
- </svg>
8
- );
9
-
10
- export default ErrorIcon;
1
+ import React from 'react';
2
+
3
+ const ErrorIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill={color} />
6
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z" fill={color} />
7
+ </svg>
8
+ );
9
+
10
+ export default ErrorIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const InfoIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default InfoIcon;
1
+ import React from 'react';
2
+
3
+ const InfoIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default InfoIcon;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
-
3
- const PaymentIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M2 8h20v12H2V8zm2 2v8h16V10H4z" fill={color} />
6
- <path d="M2 4h20v2H2V4z" fill={color} />
7
- </svg>
8
- );
9
-
10
- export default PaymentIcon;
1
+ import React from 'react';
2
+
3
+ const PaymentIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M2 8h20v12H2V8zm2 2v8h16V10H4z" fill={color} />
6
+ <path d="M2 4h20v2H2V4z" fill={color} />
7
+ </svg>
8
+ );
9
+
10
+ export default PaymentIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const PendingIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M12.5 7H11V13L16.25 16.15L17 14.92L12.5 12.25V7Z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default PendingIcon;
1
+ import React from 'react';
2
+
3
+ const PendingIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M12.5 7H11V13L16.25 16.15L17 14.92L12.5 12.25V7Z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default PendingIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const PersonIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default PersonIcon;
1
+ import React from 'react';
2
+
3
+ const PersonIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default PersonIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const SuccessIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default SuccessIcon;
1
+ import React from 'react';
2
+
3
+ const SuccessIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default SuccessIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- const WalletIcon = ({ size = 16, color = 'currentColor' }) => (
4
- <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72zM20 9v6h-7V9h7zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2H5z" fill={color} />
6
- </svg>
7
- );
8
-
9
- export default WalletIcon;
1
+ import React from 'react';
2
+
3
+ const WalletIcon = ({ size = 16, color = 'currentColor' }) => (
4
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72zM20 9v6h-7V9h7zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2H5z" fill={color} />
6
+ </svg>
7
+ );
8
+
9
+ export default WalletIcon;
@@ -1,11 +1,11 @@
1
- export { default as PaymentIcon } from './PaymentIcon';
2
- export { default as PersonIcon } from './PersonIcon';
3
- export { default as CreditCardIcon } from './CreditCardIcon';
4
- export { default as BankIcon } from './BankIcon';
5
- export { default as WalletIcon } from './WalletIcon';
6
- export { default as ErrorIcon } from './ErrorIcon';
7
- export { default as SuccessIcon } from './SuccessIcon';
8
- export { default as PendingIcon } from './PendingIcon';
9
- export { default as InfoIcon } from './InfoIcon';
10
- export { default as ChevronDownIcon } from './ChevronDownIcon';
11
- export { default as ChevronUpIcon } from './ChevronUpIcon';
1
+ export { default as PaymentIcon } from './PaymentIcon';
2
+ export { default as PersonIcon } from './PersonIcon';
3
+ export { default as CreditCardIcon } from './CreditCardIcon';
4
+ export { default as BankIcon } from './BankIcon';
5
+ export { default as WalletIcon } from './WalletIcon';
6
+ export { default as ErrorIcon } from './ErrorIcon';
7
+ export { default as SuccessIcon } from './SuccessIcon';
8
+ export { default as PendingIcon } from './PendingIcon';
9
+ export { default as InfoIcon } from './InfoIcon';
10
+ export { default as ChevronDownIcon } from './ChevronDownIcon';
11
+ export { default as ChevronUpIcon } from './ChevronUpIcon';
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import { useNotification, useFetchClient } from "@strapi/helper-plugin";
2
+ import { useNotification } from "@strapi/helper-plugin";
3
3
  import {
4
4
  Layout,
5
5
  HeaderLayout,
@@ -21,7 +21,6 @@ import PaymentActionsPanel from "./components/PaymentActionsPanel";
21
21
 
22
22
  const App = () => {
23
23
  const toggleNotification = useNotification();
24
- const { get, put } = useFetchClient();
25
24
 
26
25
  const [settings, setSettings] = useState({
27
26
  aid: "",
@@ -89,8 +88,8 @@ const App = () => {
89
88
  const loadSettings = async () => {
90
89
  setIsLoading(true);
91
90
  try {
92
- const { data } = await get(`/payone-provider/settings`);
93
- if (data?.data) setSettings(data.data);
91
+ const response = await payoneRequests.getSettings();
92
+ if (response?.data) setSettings(response.data);
94
93
  } catch (error) {
95
94
  toggleNotification({
96
95
  type: "warning",
@@ -108,7 +107,7 @@ const App = () => {
108
107
  const handleSave = async () => {
109
108
  setIsSaving(true);
110
109
  try {
111
- await put(`/payone-provider/settings`, settings);
110
+ await payoneRequests.updateSettings(settings);
112
111
  toggleNotification({
113
112
  type: "success",
114
113
  message: "Settings saved successfully"
@@ -1,16 +1,16 @@
1
- export const formatTransactionData = (data) => {
2
- const formattedData = [];
3
- if (!data || typeof data !== "object") return formattedData;
4
-
5
- for (const [key, value] of Object.entries(data)) {
6
- if (value !== null && value !== undefined) {
7
- formattedData.push({
8
- key:
9
- key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, " $1"),
10
- value: typeof value === "object" ? JSON.stringify(value) : String(value)
11
- });
12
- }
13
- }
14
-
15
- return formattedData;
1
+ export const formatTransactionData = (data) => {
2
+ const formattedData = [];
3
+ if (!data || typeof data !== "object") return formattedData;
4
+
5
+ for (const [key, value] of Object.entries(data)) {
6
+ if (value !== null && value !== undefined) {
7
+ formattedData.push({
8
+ key:
9
+ key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, " $1"),
10
+ value: typeof value === "object" ? JSON.stringify(value) : String(value)
11
+ });
12
+ }
13
+ }
14
+
15
+ return formattedData;
16
16
  };
@@ -1,5 +1,9 @@
1
1
  import pluginPkg from "../../package.json";
2
2
 
3
- const pluginId = pluginPkg.name.replace(/^@strapi\/plugin-/i, "");
3
+ // Extract plugin ID from package name
4
+ // Package name: 'strapi-plugin-payone-provider'
5
+ // Plugin ID should be: 'strapi-plugin-payone-provider' (matches package name)
6
+ const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
4
7
 
5
- export default pluginId;
8
+ // Keep the full name including -provider suffix
9
+ export default `strapi-plugin-${pluginId}`;
package/package.json CHANGED
@@ -1,20 +1,15 @@
1
1
  {
2
2
  "name": "strapi-plugin-payone-provider",
3
- "version": "1.0.1",
3
+ "version": "1.1.2",
4
4
  "description": "Strapi plugin for Payone payment gateway integration",
5
5
  "license": "MIT",
6
- "author": {
7
- "name": "Strapi Payone Provider Developer"
8
- },
9
6
  "maintainers": [
10
7
  {
11
- "name": "Strapi Payone Provider Developer"
8
+ "name": "NewProWeb Community",
9
+ "email": "abror.abdullaev@newproweb.com"
12
10
  }
13
11
  ],
14
12
  "dependencies": {
15
- "@strapi/design-system": "^1.6.3",
16
- "@strapi/helper-plugin": "^4.6.0",
17
- "@strapi/icons": "^1.6.3",
18
13
  "axios": "^1.6.2",
19
14
  "prop-types": "^15.7.2"
20
15
  },
@@ -25,15 +20,26 @@
25
20
  "styled-components": "^5.3.6"
26
21
  },
27
22
  "peerDependencies": {
23
+ "@strapi/strapi": "^4.0",
28
24
  "react": "^17.0.0 || ^18.0.0",
29
25
  "react-dom": "^17.0.0 || ^18.0.0",
30
26
  "react-router-dom": "^5.2.0",
31
27
  "styled-components": "^5.2.1"
32
28
  },
33
29
  "engines": {
34
- "node": ">=18.0.0 <=20.x.x",
30
+ "node": ">=18.0.0",
35
31
  "npm": ">=6.0.0"
36
32
  },
33
+ "authors": [
34
+ {
35
+ "name": "NewProWeb <Aliev Davlatbek>",
36
+ "email": "mamurjonov.davlatbek@newproweb.com"
37
+ },
38
+ {
39
+ "name": "Akromjon Rahimjonov",
40
+ "email": "akromjon.rahimjonov@newproweb.com"
41
+ }
42
+ ],
37
43
  "strapi": {
38
44
  "name": "strapi-plugin-payone-provider",
39
45
  "description": "Integrates Strapi Payone payment gateway with Strapi",
@@ -5,7 +5,7 @@ module.exports = async ({ strapi }) => {
5
5
  const pluginStore = strapi.store({
6
6
  environment: "",
7
7
  type: "plugin",
8
- name: "payone-provider"
8
+ name: "strapi-plugin-payone-provider"
9
9
  });
10
10
 
11
11
  // Initialize default settings if not already set
@@ -4,7 +4,7 @@ module.exports = ({ strapi }) => ({
4
4
  async getSettings(ctx) {
5
5
  try {
6
6
  const settings = await strapi
7
- .plugin("payone-provider")
7
+ .plugin("strapi-plugin-payone-provider")
8
8
  .service("payone")
9
9
  .getSettings();
10
10
 
@@ -23,7 +23,7 @@ module.exports = ({ strapi }) => ({
23
23
  const { body } = ctx.request;
24
24
 
25
25
  const currentSettings = await strapi
26
- .plugin("payone-provider")
26
+ .plugin("strapi-plugin-payone-provider")
27
27
  .service("payone")
28
28
  .getSettings();
29
29
 
@@ -32,7 +32,7 @@ module.exports = ({ strapi }) => ({
32
32
  }
33
33
 
34
34
  const settings = await strapi
35
- .plugin("payone-provider")
35
+ .plugin("strapi-plugin-payone-provider")
36
36
  .service("payone")
37
37
  .updateSettings(body);
38
38
 
@@ -50,7 +50,7 @@ module.exports = ({ strapi }) => ({
50
50
  try {
51
51
  const params = ctx.request.body;
52
52
  const result = await strapi
53
- .plugin("payone-provider")
53
+ .plugin("strapi-plugin-payone-provider")
54
54
  .service("payone")
55
55
  .preauthorization(params);
56
56
 
@@ -66,7 +66,7 @@ module.exports = ({ strapi }) => ({
66
66
  strapi.log.info("Payone authorization controller called with:", params);
67
67
 
68
68
  const result = await strapi
69
- .plugin("payone-provider")
69
+ .plugin("strapi-plugin-payone-provider")
70
70
  .service("payone")
71
71
  .authorization(params);
72
72
 
@@ -81,7 +81,7 @@ module.exports = ({ strapi }) => ({
81
81
  try {
82
82
  const params = ctx.request.body;
83
83
  const result = await strapi
84
- .plugin("payone-provider")
84
+ .plugin("strapi-plugin-payone-provider")
85
85
  .service("payone")
86
86
  .capture(params);
87
87
 
@@ -95,7 +95,7 @@ module.exports = ({ strapi }) => ({
95
95
  try {
96
96
  const params = ctx.request.body;
97
97
  const result = await strapi
98
- .plugin("payone-provider")
98
+ .plugin("strapi-plugin-payone-provider")
99
99
  .service("payone")
100
100
  .refund(params);
101
101
 
@@ -109,7 +109,7 @@ module.exports = ({ strapi }) => ({
109
109
  try {
110
110
  const filters = ctx.query || {};
111
111
  const history = await strapi
112
- .plugin("payone-provider")
112
+ .plugin("strapi-plugin-payone-provider")
113
113
  .service("payone")
114
114
  .getTransactionHistory(filters);
115
115
 
@@ -122,7 +122,7 @@ module.exports = ({ strapi }) => ({
122
122
  async testConnection(ctx) {
123
123
  try {
124
124
  const result = await strapi
125
- .plugin("payone-provider")
125
+ .plugin("strapi-plugin-payone-provider")
126
126
  .service("payone")
127
127
  .testConnection();
128
128
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  module.exports = {
4
- isSuperAdmin: require("./isSuperAdmin"),
5
- isAuth: require("./isAuth")
4
+ "is-auth": require("./is-auth"),
5
+ "is-super-admin": require("./isSuperAdmin")
6
6
  };
@@ -15,7 +15,7 @@ module.exports = async (ctx, config, { strapi }) => {
15
15
  return true;
16
16
  }
17
17
  } catch (e) {
18
- strapi.log.warn("payone-provider isAuth policy error:", e.message);
18
+ strapi.log.warn("strapi-plugin-payone-provider isAuth policy error:", e.message);
19
19
  }
20
20
  }
21
21
 
@@ -36,7 +36,6 @@ module.exports = {
36
36
  policies: ["admin::isAuthenticatedAdmin"]
37
37
  }
38
38
  },
39
-
40
39
  {
41
40
  method: "POST",
42
41
  path: "/preauthorization",
@@ -71,6 +70,7 @@ module.exports = {
71
70
  }
72
71
  ]
73
72
  },
73
+
74
74
  "content-api": {
75
75
  type: "content-api",
76
76
  routes: [
@@ -79,7 +79,7 @@ module.exports = {
79
79
  path: "/preauthorization",
80
80
  handler: "payone.preauthorization",
81
81
  config: {
82
- policies: ["plugin::payone-provider.isAuth"],
82
+ policies: ["plugin::strapi-plugin-payone-provider.is-auth"],
83
83
  auth: false
84
84
  }
85
85
  },
@@ -88,7 +88,7 @@ module.exports = {
88
88
  path: "/authorization",
89
89
  handler: "payone.authorization",
90
90
  config: {
91
- policies: ["plugin::payone-provider.isAuth"],
91
+ policies: ["plugin::strapi-plugin-payone-provider.is-auth"],
92
92
  auth: false
93
93
  }
94
94
  },
@@ -97,7 +97,7 @@ module.exports = {
97
97
  path: "/capture",
98
98
  handler: "payone.capture",
99
99
  config: {
100
- policies: ["plugin::payone-provider.isAuth"],
100
+ policies: ["plugin::strapi-plugin-payone-provider.is-auth"],
101
101
  auth: false
102
102
  }
103
103
  },
@@ -106,7 +106,7 @@ module.exports = {
106
106
  path: "/refund",
107
107
  handler: "payone.refund",
108
108
  config: {
109
- policies: ["plugin::payone-provider.isAuth"],
109
+ policies: ["plugin::strapi-plugin-payone-provider.is-auth"],
110
110
  auth: false
111
111
  }
112
112
  },
@@ -115,7 +115,7 @@ module.exports = {
115
115
  path: "/test-connection",
116
116
  handler: "payone.testConnection",
117
117
  config: {
118
- policies: ["plugin::payone-provider.isAuth"],
118
+ policies: ["plugin::strapi-plugin-payone-provider.is-auth"],
119
119
  auth: false
120
120
  }
121
121
  }
@@ -66,7 +66,7 @@ module.exports = ({ strapi }) => ({
66
66
  const pluginStore = strapi.store({
67
67
  environment: "",
68
68
  type: "plugin",
69
- name: "payone-provider"
69
+ name: "strapi-plugin-payone-provider"
70
70
  });
71
71
  return await pluginStore.get({ key: "settings" });
72
72
  },
@@ -75,7 +75,7 @@ module.exports = ({ strapi }) => ({
75
75
  const pluginStore = strapi.store({
76
76
  environment: "",
77
77
  type: "plugin",
78
- name: "payone-provider"
78
+ name: "strapi-plugin-payone-provider"
79
79
  });
80
80
  await pluginStore.set({
81
81
  key: "settings",
@@ -350,7 +350,7 @@ module.exports = ({ strapi }) => ({
350
350
  const pluginStore = strapi.store({
351
351
  environment: "",
352
352
  type: "plugin",
353
- name: "payone-provider"
353
+ name: "strapi-plugin-payone-provider"
354
354
  });
355
355
 
356
356
  let transactionHistory =
@@ -400,7 +400,7 @@ module.exports = ({ strapi }) => ({
400
400
  const pluginStore = strapi.store({
401
401
  environment: "",
402
402
  type: "plugin",
403
- name: "payone-provider"
403
+ name: "strapi-plugin-payone-provider"
404
404
  });
405
405
 
406
406
  let transactionHistory =