Skip to main content
Glama
zakblacki

Satim Payment Gateway Integration

by zakblacki

confirm_order

Verify and confirm the status of an order after a payment attempt using the Satim Payment Gateway Integration. Processes order ID and language preferences to ensure accurate transaction tracking and response.

Instructions

Confirm order status after payment attempt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage for response messages
orderIdYesOrder ID returned from registration

Implementation Reference

  • MCP CallTool handler for 'confirm_order': validates credentials, calls SatimPaymentGateway.confirmOrder, and returns JSON stringified response.
    case "confirm_order": if (!satimGateway) { throw new McpError(ErrorCode.InvalidRequest, "Credentials not configured. Use configure_credentials first."); } const confirmationResponse = await satimGateway.confirmOrder({ orderId: args.orderId as string, language: args.language as 'AR' | 'FR' | 'EN' }); return { content: [ { type: "text", text: JSON.stringify(confirmationResponse, null, 2) } ] };
  • Input schema and registration of the 'confirm_order' tool in listTools response.
    name: "confirm_order", description: "Confirm order status after payment attempt", inputSchema: { type: "object", properties: { orderId: { type: "string", description: "Order ID returned from registration" }, language: { type: "string", enum: ["AR", "FR", "EN"], description: "Language for response messages" } }, required: ["orderId"] } },
  • Core helper method SatimPaymentGateway.confirmOrder that performs HTTP GET to SATIM API endpoint /confirmOrder.do with credentials and orderId.
    async confirmOrder(params: OrderConfirmationParams): Promise<OrderConfirmationResponse> { try { const queryParams = new URLSearchParams({ userName: this.credentials.userName, password: this.credentials.password, orderId: params.orderId, ...(params.language && { language: params.language }) }); const response = await axios.get(`${this.baseUrl}/confirmOrder.do?${queryParams}`); return response.data; } catch (error) { throw new Error(`Order confirmation failed: ${error}`); } }
  • TypeScript interface defining input parameters for confirmOrder, matching the tool inputSchema.
    interface OrderConfirmationParams { orderId: string; language?: 'AR' | 'FR' | 'EN'; }
  • TypeScript interface defining the expected response structure from SATIM confirmOrder API.
    interface OrderConfirmationResponse { orderNumber?: string; actionCode?: number; actionCodeDescription?: string; amount?: number; errorCode?: string; errorMessage?: string; orderStatus?: number; approvalCode?: string; authCode?: number; cardholderName?: string; depositAmount?: number; currency?: string; pan?: string; ip?: string; params?: { respCode?: string; respCode_desc?: string; udf1?: string; udf2?: string; udf3?: string; udf4?: string; udf5?: string; }; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zakblacki/Satim-Payment-Gateway-Integration'

If you have feedback or need assistance with the MCP directory API, please join our Discord server