diff --git a/src/Resources/Schema/admin-api/create-support-request.json b/src/Resources/Schema/AdminApi/create-support-request.json similarity index 98% rename from src/Resources/Schema/admin-api/create-support-request.json rename to src/Resources/Schema/AdminApi/create-support-request.json index 0e3c62418..e207d4662 100644 --- a/src/Resources/Schema/admin-api/create-support-request.json +++ b/src/Resources/Schema/AdminApi/create-support-request.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/support/request": { + "/_action/mollie/support/request": { "post": { "summary": "Submit Support Request to Mollie", "description": "Submits a support request to Mollie.", diff --git a/src/Resources/Schema/admin-api/order-payment-url.json b/src/Resources/Schema/AdminApi/order-payment-url.json similarity index 96% rename from src/Resources/Schema/admin-api/order-payment-url.json rename to src/Resources/Schema/AdminApi/order-payment-url.json index 6e3514b25..87928fa96 100644 --- a/src/Resources/Schema/admin-api/order-payment-url.json +++ b/src/Resources/Schema/AdminApi/order-payment-url.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/order/payment-url": { + "/_action/mollie/order/payment-url": { "post": { "summary": "Generate Mollie Order Payment URL", "description": "Creates a payment URL for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/payment-method-update.json b/src/Resources/Schema/AdminApi/payment-method-update.json similarity index 96% rename from src/Resources/Schema/admin-api/payment-method-update.json rename to src/Resources/Schema/AdminApi/payment-method-update.json index bf0abf253..842ef37eb 100644 --- a/src/Resources/Schema/admin-api/payment-method-update.json +++ b/src/Resources/Schema/AdminApi/payment-method-update.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/payment-method/update-methods": { + "/_action/mollie/payment-method/update-methods": { "get": { "summary": "Update Mollie Payment Methods", "description": "Updates the payment methods for Mollie.", diff --git a/src/Resources/Schema/admin-api/refund-list.json b/src/Resources/Schema/AdminApi/refund-list.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-list.json rename to src/Resources/Schema/AdminApi/refund-list.json index 74d55dfc0..6b042069d 100644 --- a/src/Resources/Schema/admin-api/refund-list.json +++ b/src/Resources/Schema/AdminApi/refund-list.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund/list": { + "/_action/mollie/refund/list": { "post": { "summary": "List Refund Items for Mollie Order", "description": "Retrieves a list of refund items for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-manager-data.json b/src/Resources/Schema/AdminApi/refund-manager-data.json similarity index 99% rename from src/Resources/Schema/admin-api/refund-manager-data.json rename to src/Resources/Schema/AdminApi/refund-manager-data.json index a683ca367..0fbc45c01 100644 --- a/src/Resources/Schema/admin-api/refund-manager-data.json +++ b/src/Resources/Schema/AdminApi/refund-manager-data.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund-manager/data": { + "/_action/mollie/refund-manager/data": { "post": { "summary": "Get Refund Manager Data", "description": "Retrieves refund manager data for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-order-get.json b/src/Resources/Schema/AdminApi/refund-order-get.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-order-get.json rename to src/Resources/Schema/AdminApi/refund-order-get.json index 154124670..2104d0161 100644 --- a/src/Resources/Schema/admin-api/refund-order-get.json +++ b/src/Resources/Schema/AdminApi/refund-order-get.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/refund/order": { + "/mollie/refund/order": { "post": { "summary": "Process Refund for Mollie Order", "description": "Processes a refund for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-order-post.json b/src/Resources/Schema/AdminApi/refund-order-post.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-order-post.json rename to src/Resources/Schema/AdminApi/refund-order-post.json index 2292a4dfb..9be6966cb 100644 --- a/src/Resources/Schema/admin-api/refund-order-post.json +++ b/src/Resources/Schema/AdminApi/refund-order-post.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund": { + "/_action/mollie/refund": { "post": { "summary": "Process Refund for Mollie Order", "description": "Processes a refund for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-total.json b/src/Resources/Schema/AdminApi/refund-total.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-total.json rename to src/Resources/Schema/AdminApi/refund-total.json index e5c13cf50..3f149af2e 100644 --- a/src/Resources/Schema/admin-api/refund-total.json +++ b/src/Resources/Schema/AdminApi/refund-total.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund/total": { + "/_action/mollie/refund/total": { "post": { "summary": "Get Total Refund Information", "description": "Retrieves the total refund information for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/ship-order-operational.json b/src/Resources/Schema/AdminApi/ship-order-operational.json similarity index 99% rename from src/Resources/Schema/admin-api/ship-order-operational.json rename to src/Resources/Schema/AdminApi/ship-order-operational.json index eb9630fd7..521728467 100644 --- a/src/Resources/Schema/admin-api/ship-order-operational.json +++ b/src/Resources/Schema/AdminApi/ship-order-operational.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/ship/order": { + "/mollie/ship/order": { "post": { "summary": "Ship Order via Mollie", "description": "Ships an order via Mollie with tracking information.", diff --git a/src/Resources/Schema/admin-api/shipping-status.json b/src/Resources/Schema/AdminApi/shipping-status.json similarity index 98% rename from src/Resources/Schema/admin-api/shipping-status.json rename to src/Resources/Schema/AdminApi/shipping-status.json index e0ebace1a..8648a0f77 100644 --- a/src/Resources/Schema/admin-api/shipping-status.json +++ b/src/Resources/Schema/AdminApi/shipping-status.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/ship/status": { + "/_action/mollie/ship/status": { "post": { "summary": "Retrieve Mollie Order Shipping Status", "description": "Retrieves the shipping status for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/shipping-total.json b/src/Resources/Schema/AdminApi/shipping-total.json similarity index 98% rename from src/Resources/Schema/admin-api/shipping-total.json rename to src/Resources/Schema/AdminApi/shipping-total.json index 749163ed8..fa79f801d 100644 --- a/src/Resources/Schema/admin-api/shipping-total.json +++ b/src/Resources/Schema/AdminApi/shipping-total.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/ship/total": { + "/_action/mollie/ship/total": { "post": { "summary": "Retrieve Total Shipping Information", "description": "Retrieves the total shipping information for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/subscription-cancel.json b/src/Resources/Schema/AdminApi/subscription-cancel.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-cancel.json rename to src/Resources/Schema/AdminApi/subscription-cancel.json index d606df49f..7bcbbe327 100644 --- a/src/Resources/Schema/admin-api/subscription-cancel.json +++ b/src/Resources/Schema/AdminApi/subscription-cancel.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/cancel": { + "/_action/mollie/subscriptions/cancel": { "post": { "summary": "Cancel Mollie Subscription", "description": "Cancels a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-pause.json b/src/Resources/Schema/AdminApi/subscription-pause.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-pause.json rename to src/Resources/Schema/AdminApi/subscription-pause.json index e204776fc..11c82964f 100644 --- a/src/Resources/Schema/admin-api/subscription-pause.json +++ b/src/Resources/Schema/AdminApi/subscription-pause.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/pause": { + "/_action/mollie/subscriptions/pause": { "post": { "summary": "Pause Mollie Subscription", "description": "Pauses a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-resume.json b/src/Resources/Schema/AdminApi/subscription-resume.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-resume.json rename to src/Resources/Schema/AdminApi/subscription-resume.json index 6e2b7f74a..48db5e6dc 100644 --- a/src/Resources/Schema/admin-api/subscription-resume.json +++ b/src/Resources/Schema/AdminApi/subscription-resume.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/resume": { + "/_action/mollie/subscriptions/resume": { "post": { "summary": "Resume Mollie Subscription", "description": "Resumes a paused subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-skip.json b/src/Resources/Schema/AdminApi/subscription-skip.json similarity index 98% rename from src/Resources/Schema/admin-api/subscription-skip.json rename to src/Resources/Schema/AdminApi/subscription-skip.json index c3ce1284d..ec0f7b22e 100644 --- a/src/Resources/Schema/admin-api/subscription-skip.json +++ b/src/Resources/Schema/AdminApi/subscription-skip.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/skip": { + "/_action/mollie/subscriptions/skip": { "post": { "summary": "Skip Mollie Subscription", "description": "Skips the next scheduled payment for a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/webhook-mandate-update.json b/src/Resources/Schema/AdminApi/webhook-mandate-update.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-mandate-update.json rename to src/Resources/Schema/AdminApi/webhook-mandate-update.json index 993b4b374..987e78bee 100644 --- a/src/Resources/Schema/admin-api/webhook-mandate-update.json +++ b/src/Resources/Schema/AdminApi/webhook-mandate-update.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}/mandate/update": { + "/mollie/webhook/subscription/{swSubscriptionId}/mandate/update": { "get": { "summary": "Handle Mollie Subscription Mandate Update Webhook Notification (GET)", "operationId": "handleMollieSubscriptionMandateUpdateWebhookGet", diff --git a/src/Resources/Schema/admin-api/webhook-subscription-action.json b/src/Resources/Schema/AdminApi/webhook-subscription-action.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-subscription-action.json rename to src/Resources/Schema/AdminApi/webhook-subscription-action.json index c7746e808..047f8ca1a 100644 --- a/src/Resources/Schema/admin-api/webhook-subscription-action.json +++ b/src/Resources/Schema/AdminApi/webhook-subscription-action.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}": { + "/mollie/webhook/subscription/{swSubscriptionId}": { "get": { "summary": "Handle Mollie Subscription Webhook Notification (GET)", "operationId": "handleMollieSubscriptionWebhookGet", diff --git a/src/Resources/Schema/admin-api/webhook-subscription-renew.json b/src/Resources/Schema/AdminApi/webhook-subscription-renew.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-subscription-renew.json rename to src/Resources/Schema/AdminApi/webhook-subscription-renew.json index e5160a559..78ea7744a 100644 --- a/src/Resources/Schema/admin-api/webhook-subscription-renew.json +++ b/src/Resources/Schema/AdminApi/webhook-subscription-renew.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}/renew": { + "/mollie/webhook/subscription/{swSubscriptionId}/renew": { "get": { "summary": "Handle Mollie Subscription Renewal Webhook Notification (GET)", "operationId": "handleMollieSubscriptionRenewalWebhookGet", diff --git a/src/Resources/Schema/admin-api/weebhook-action.json b/src/Resources/Schema/AdminApi/weebhook-action.json similarity index 97% rename from src/Resources/Schema/admin-api/weebhook-action.json rename to src/Resources/Schema/AdminApi/weebhook-action.json index d20da001f..ec828ad05 100644 --- a/src/Resources/Schema/admin-api/weebhook-action.json +++ b/src/Resources/Schema/AdminApi/weebhook-action.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/{swTransactionId}": { + "/mollie/webhook/{swTransactionId}": { "post": { "summary": "Handle Mollie Webhook Notification", "description": "Handles incoming webhook notifications from Mollie.", diff --git a/src/Resources/Schema/store-api/apple-pay-add-product.json b/src/Resources/Schema/StoreApi/apple-pay-add-product.json similarity index 97% rename from src/Resources/Schema/store-api/apple-pay-add-product.json rename to src/Resources/Schema/StoreApi/apple-pay-add-product.json index ca80e0c7c..635981ed8 100644 --- a/src/Resources/Schema/store-api/apple-pay-add-product.json +++ b/src/Resources/Schema/StoreApi/apple-pay-add-product.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/add-product": { + "/mollie/applepay/add-product": { "post": { "summary": "Add Product for Apple Pay", "operationId": "addProductForApplePay", diff --git a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json b/src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json similarity index 96% rename from src/Resources/Schema/store-api/apple-pay-create-payment-session.json rename to src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json index ef748d7b8..12c653209 100644 --- a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json +++ b/src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/validate/createPaymentSession": { + "/mollie/applepay/validate/createPaymentSession": { "post": { "summary": "Validate and Create Apple Pay Payment Session", "operationId": "validateAndCreateApplePayPaymentSession", diff --git a/src/Resources/Schema/store-api/apple-pay-enabled.json b/src/Resources/Schema/StoreApi/apple-pay-enabled.json similarity index 95% rename from src/Resources/Schema/store-api/apple-pay-enabled.json rename to src/Resources/Schema/StoreApi/apple-pay-enabled.json index 1db5a417d..baad29697 100644 --- a/src/Resources/Schema/store-api/apple-pay-enabled.json +++ b/src/Resources/Schema/StoreApi/apple-pay-enabled.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/enabled": { + "/mollie/applepay/enabled": { "get": { "summary": "Check Apple Pay Integration Enabled Status", "operationId": "checkApplePayEnabled", diff --git a/src/Resources/Schema/store-api/apple-pay-get-by-id.json b/src/Resources/Schema/StoreApi/apple-pay-get-by-id.json similarity index 96% rename from src/Resources/Schema/store-api/apple-pay-get-by-id.json rename to src/Resources/Schema/StoreApi/apple-pay-get-by-id.json index c072d1663..1ced331b3 100644 --- a/src/Resources/Schema/store-api/apple-pay-get-by-id.json +++ b/src/Resources/Schema/StoreApi/apple-pay-get-by-id.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/id": { + "/mollie/applepay/id": { "get": { "summary": "Retrieve Apple Pay ID", "operationId": "retrieveApplePayId", diff --git a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json b/src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json similarity index 98% rename from src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json rename to src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json index fee4050e4..c06af0694 100644 --- a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json +++ b/src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/shipping-methods": { + "/mollie/applepay/shipping-methods": { "post": { "summary": "Retrieve Apple Pay Shipping Methods", "operationId": "retrieveApplePayShippingMethods", diff --git a/src/Resources/Schema/store-api/apple-pay-pay.json b/src/Resources/Schema/StoreApi/apple-pay-pay.json similarity index 99% rename from src/Resources/Schema/store-api/apple-pay-pay.json rename to src/Resources/Schema/StoreApi/apple-pay-pay.json index bc2e54eb7..d8d229676 100644 --- a/src/Resources/Schema/store-api/apple-pay-pay.json +++ b/src/Resources/Schema/StoreApi/apple-pay-pay.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/pay": { + "/mollie/applepay/pay": { "post": { "summary": "Initiate Apple Pay Payment", "operationId": "initiateApplePayPayment", diff --git a/src/Resources/Schema/store-api/apple-pay-restore-cart.json b/src/Resources/Schema/StoreApi/apple-pay-restore-cart.json similarity index 95% rename from src/Resources/Schema/store-api/apple-pay-restore-cart.json rename to src/Resources/Schema/StoreApi/apple-pay-restore-cart.json index f343e3e9f..650e073ae 100644 --- a/src/Resources/Schema/store-api/apple-pay-restore-cart.json +++ b/src/Resources/Schema/StoreApi/apple-pay-restore-cart.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/restore-cart": { + "/mollie/applepay/restore-cart": { "post": { "summary": "Restore Apple Pay Cart", "operationId": "restoreApplePayCart", diff --git a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json b/src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json similarity index 97% rename from src/Resources/Schema/store-api/apple-pay-set-shipping-method.json rename to src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json index c198ae4d8..866c8f653 100644 --- a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json +++ b/src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/shipping-method": { + "/mollie/applepay/shipping-method": { "post": { "summary": "Select Apple Pay Shipping Method", "operationId": "selectApplePayShippingMethod", diff --git a/src/Resources/Schema/StoreApi/credit-card-get-mandates.json b/src/Resources/Schema/StoreApi/credit-card-get-mandates.json new file mode 100644 index 000000000..2085d2978 --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-get-mandates.json @@ -0,0 +1,109 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie API", + "description": "API for Mollie payment integration.", + "version": "1.0.0" + }, + "paths": { + "/mollie/mandates/{customerId}": { + "get": { + "summary": "Get Customer Mandates", + "description": "Retrieves a list of mandates for the specified customer.", + "operationId": "getCustomerMandates", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer whose mandates are being retrieved." + } + ], + "responses": { + "200": { + "description": "A list of customer mandates.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mandate" + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "CreditCardDetailStruct": { + "type": "object", + "properties": { + "cardNumber": { + "type": "string" + }, + "expiryDate": { + "type": "string" + } + } + }, + "mandate": { + "type": "object", + "properties": { + "resource": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "mode": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "method": { + "type": "string", + "nullable": true + }, + "details": { + "$ref": "#/components/schemas/CreditCardDetailStruct" + }, + "customerId": { + "type": "string", + "nullable": true + }, + "mandateReference": { + "type": "string", + "nullable": true + }, + "signatureDate": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "beingUsedForSubscription": { + "type": "boolean" + } + }, + "required": [ + "details", + "beingUsedForSubscription" + ] + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json b/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json new file mode 100644 index 000000000..6b34d3216 --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json @@ -0,0 +1,56 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Mandate Revoke Endpoint", + "description": "Endpoint to revoke a Mollie mandate.", + "version": "1.0.0" + }, + "paths": { + "/mollie/mandate/revoke/{customerId}/{mandateId}": { + "post": { + "summary": "Revoke Mollie Mandate", + "operationId": "revokeMollieMandate", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The mandate ID." + } + ], + "responses": { + "200": { + "description": "Response indicating the mandate revocation was successful.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if revoking the mandate was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-save-card-token.json b/src/Resources/Schema/StoreApi/credit-card-save-card-token.json new file mode 100644 index 000000000..d493560ca --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-save-card-token.json @@ -0,0 +1,73 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Credit Card Store Token Endpoint", + "description": "Endpoint to store a Mollie credit card token.", + "version": "1.0.0" + }, + "paths": { + "/mollie/creditcard/store-token/{customerId}/{cardToken}": { + "post": { + "summary": "Store Mollie Credit Card Token", + "operationId": "storeMollieCreditCardToken", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "cardToken", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The credit card token." + } + ], + "requestBody": { + "description": "Optional body with a boolean key `shouldSaveCardDetail`.", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "shouldSaveCardDetail": { + "type": "boolean", + "description": "Indicates whether to save card details." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response indicating success or failure.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if storing the token was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json b/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json new file mode 100644 index 000000000..8fac0967d --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json @@ -0,0 +1,56 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Credit Card Store Mandate ID Endpoint", + "description": "Endpoint to store a Mollie credit card mandate ID.", + "version": "1.0.0" + }, + "paths": { + "/mollie/creditcard/store-mandate-id/{customerId}/{mandateId}": { + "post": { + "summary": "Store Mollie Credit Card Mandate ID", + "operationId": "storeMollieCreditCardMandateId", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The mandate ID." + } + ], + "responses": { + "200": { + "description": "Response indicating success or failure.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if storing the mandate ID was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/pos-checkout.json b/src/Resources/Schema/StoreApi/pos-checkout.json similarity index 100% rename from src/Resources/Schema/store-api/pos-checkout.json rename to src/Resources/Schema/StoreApi/pos-checkout.json diff --git a/src/Resources/Schema/store-api/pos-status-action.json b/src/Resources/Schema/StoreApi/pos-status-action.json similarity index 100% rename from src/Resources/Schema/store-api/pos-status-action.json rename to src/Resources/Schema/StoreApi/pos-status-action.json diff --git a/src/Resources/Schema/store-api/pos-store-terminal.json b/src/Resources/Schema/StoreApi/pos-store-terminal.json similarity index 100% rename from src/Resources/Schema/store-api/pos-store-terminal.json rename to src/Resources/Schema/StoreApi/pos-store-terminal.json diff --git a/src/Resources/Schema/store-api/retry-payment.json b/src/Resources/Schema/StoreApi/retry-payment.json similarity index 100% rename from src/Resources/Schema/store-api/retry-payment.json rename to src/Resources/Schema/StoreApi/retry-payment.json diff --git a/src/Resources/Schema/store-api/return.json b/src/Resources/Schema/StoreApi/return.json similarity index 100% rename from src/Resources/Schema/store-api/return.json rename to src/Resources/Schema/StoreApi/return.json diff --git a/src/Resources/Schema/store-api/webhook-received.json b/src/Resources/Schema/StoreApi/webhook-received.json similarity index 100% rename from src/Resources/Schema/store-api/webhook-received.json rename to src/Resources/Schema/StoreApi/webhook-received.json diff --git a/src/Resources/Schema/store-api/webhook-subscription-received.json b/src/Resources/Schema/StoreApi/webhook-subscription-received.json similarity index 100% rename from src/Resources/Schema/store-api/webhook-subscription-received.json rename to src/Resources/Schema/StoreApi/webhook-subscription-received.json diff --git a/src/Resources/Schema/store-api/credit-card-store-card-token.json b/src/Resources/Schema/store-api/credit-card-store-card-token.json deleted file mode 100644 index 07e14d60c..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-card-token.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Store Card Token Endpoint", - "description": "Endpoint to store the card token for a customer.", - "version": "1.0.0" - }, - "paths": { - "/mollie/components/store-card-token/{customerId}/{cardToken}": { - "get": { - "summary": "Store Card Token", - "operationId": "storeCardToken", - "parameters": [ - { - "name": "customerId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the customer." - }, - { - "name": "cardToken", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The card token." - } - ], - "responses": { - "200": { - "description": "Success response indicating the card token was stored.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates if the operation was successful." - }, - "customerId": { - "type": "string", - "description": "The ID of the customer." - }, - "result": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of serialized exceptions, if any." - } - }, - "required": ["success", "customerId", "result"] - }, - "example": { - "success": true, - "customerId": "customer123", - "result": ["Exception1", "Exception2"] - } - } - } - } - } - } - } - } -} diff --git a/src/Resources/Schema/store-api/credit-card-store-mandate-id.json b/src/Resources/Schema/store-api/credit-card-store-mandate-id.json deleted file mode 100644 index 6840745c5..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-mandate-id.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Store Mandate ID Endpoint", - "description": "Endpoint to store the mandate ID for a customer.", - "version": "1.0.0" - }, - "paths": { - "/mollie/components/store-mandate-id/{customerId}/{mandateId}": { - "get": { - "summary": "Store Mandate ID", - "operationId": "storeMandateId", - "parameters": [ - { - "name": "customerId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the customer." - }, - { - "name": "mandateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the mandate." - } - ], - "responses": { - "200": { - "description": "Success response indicating the mandate ID was stored.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates if the operation was successful." - }, - "customerId": { - "type": "string", - "description": "The ID of the customer." - }, - "result": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of serialized exceptions, if any." - } - }, - "required": ["success", "customerId", "result"] - }, - "example": { - "success": true, - "customerId": "customer123", - "result": ["Exception1", "Exception2"] - } - } - } - } - } - } - } - } -} diff --git a/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json b/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json deleted file mode 100644 index 82b6337d2..000000000 --- a/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Revoke Mandate Endpoint", - "description": "Endpoint to revoke the mandate for a customer.", - "version": "1.0.0" - }, - "paths": { - "/mollie/components/revoke-mandate/{customerId}/{mandateId}": { - "get": { - "summary": "Revoke Mandate", - "operationId": "revokeMandate", - "parameters": [ - { - "name": "customerId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the customer." - }, - { - "name": "mandateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the mandate." - } - ], - "responses": { - "200": { - "description": "Success response indicating the mandate was revoked.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates if the operation was successful." - }, - "customerId": { - "type": "string", - "description": "The ID of the customer." - }, - "mandateId": { - "type": "string", - "description": "The ID of the mandate." - }, - "result": { - "type": "string", - "description": "The result of the operation, including any errors." - } - }, - "required": ["success", "customerId", "mandateId", "result"] - }, - "example": { - "success": true, - "customerId": "customer123", - "mandateId": "mandate456", - "result": "Error details or success message" - } - } - } - } - } - } - } - } -} diff --git a/src/Resources/Schema/store-api/ideal-store-issuer.json b/src/Resources/Schema/store-api/ideal-store-issuer.json deleted file mode 100644 index 9b4ee4690..000000000 --- a/src/Resources/Schema/store-api/ideal-store-issuer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Store iDEAL Issuer Endpoint", - "description": "Endpoint to store the iDEAL issuer for a customer.", - "version": "1.0.0" - }, - "paths": { - "/mollie/ideal/store-issuer/{customerId}/{issuerId}": { - "get": { - "summary": "Store iDEAL Issuer", - "operationId": "storeIdealIssuer", - "parameters": [ - { - "name": "customerId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the customer." - }, - { - "name": "issuerId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the iDEAL issuer." - } - ], - "responses": { - "200": { - "description": "Success response indicating the iDEAL issuer was stored.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates if the operation was successful." - }, - "customerId": { - "type": "string", - "description": "The ID of the customer." - }, - "result": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of serialized exceptions, if any." - } - }, - "required": ["success", "customerId", "result"] - }, - "example": { - "success": true, - "customerId": "customer123", - "result": ["Exception1", "Exception2"] - } - } - } - } - } - } - } - } -} diff --git a/src/Resources/Schema/store-api/payment-failed.json b/src/Resources/Schema/store-api/payment-failed.json deleted file mode 100644 index 73cfe0b1f..000000000 --- a/src/Resources/Schema/store-api/payment-failed.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Mollie Payment Failed Endpoint", - "description": "Endpoint to handle failed Mollie payments.", - "version": "1.0.0" - }, - "paths": { - "/mollie/payment/failed/{transactionId}": { - "get": { - "summary": "Handle Failed Payment (GET)", - "operationId": "handleFailedPaymentGet", - "parameters": [ - { - "name": "transactionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the transaction." - } - ], - "responses": { - "200": { - "description": "Successfully handled the failed payment.", - "content": {} - } - } - }, - "post": { - "summary": "Handle Failed Payment (POST)", - "operationId": "handleFailedPaymentPost", - "parameters": [ - { - "name": "transactionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The ID of the transaction." - } - ], - "responses": { - "200": { - "description": "Successfully handled the failed payment.", - "content": {} - } - } - } - } - } -} diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js index f4aba23bf..bc8140c73 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js +++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js @@ -221,12 +221,20 @@ Component.override('sw-order-detail-general', { return orderAttributes.getCreditCardAttributes(); }, + + /** * */ copyPaymentUrlToClipboard() { + let fallback = async function(e) { + await navigator.clipboard.writeText(e) + }; + + // eslint-disable-next-line no-undef + let clipboard = typeof Shopware.Utils.dom.copyToClipboard === 'function' ? Shopware.Utils.dom.copyToClipboard : fallback; // eslint-disable-next-line no-undef - Shopware.Utils.dom.copyToClipboard(this.molliePaymentUrl); + clipboard(this.molliePaymentUrl); this.molliePaymentUrlCopied = true; },