YunShang API

Platform Integration Plugin User Guide

Magic Finance Integration Plugin Tutorial

1. Install the Plugin

  • Extract the plugin archive to the public/plugins/servers/ directory.
  • Ensure that the extracted folder name matches the plugin name and the directory structure is correct.
  • Plugin Extraction Example

    2. Add an Interface

  • Log in to the Magic Finance admin panel, go to SettingsProduct SettingsGeneral Interfaces, and click Create Interface.
  • Create Interface Entry
  • In the interface editing page, fill in the following details:
  • - Name: Any name you prefer for identification. - IP Address: Enter your platform domain name. - Server Module: Select YunShang API Distribution Module (if not found, check if the plugin is installed correctly). - Interface Capacity: Enter a value based on your business needs (e.g., 1000). - Username is the App ID, Password is the App Secret (Global Application). Interface Editing Example

    3. Add a Product

  • Product Group: You can choose an existing group or create a new one (e.g., "API Products").
  • Product Group Setting
  • Basic Information: Fill in product name, description, etc. Note: The "Hostname" and "Password" options must be turned off (keep them disabled); other fields can be adjusted as needed.
  • Product Basic Info
  • Pricing: Select "One-time" billing mode and set the price to 0 (this is a placeholder; the actual price is determined by configurable options).
  • Pricing Setting
  • Auto Provisioning:
  • - Provisioning Method: Choose Automated Interface. - Interface Group: Select the interface group you created in Step 2. - API Code: Enter the English API call code for your platform (available from your platform's development documentation). - Default Quota: Can be set to 0 or a default value as needed. - Default Validity Period: Suggested to set as 12 (representing 12 months, adjustable as needed). Auto Provisioning Settings API Code Example

    4. Configure Configurable Options (Product Specifications)

  • In the product editing page, locate the Configurable Options section and click Add Configurable Option.
  • Add Configurable Option Entry
  • Configurable Option Settings:
  • - Option Name: Must be set as "Quota" (to identify API call counts). - Option Type: Select Radio. - Sub-option Names: Enter the quota tiers you wish to offer, e.g., 100, 200, 500 (numbers only). Configurable Option Fill Example
  • Price Setting: In the "One-time Price" field next to each sub-option, set the selling price for that tier.
  • > Example: If the sub-option name is 100 and the one-time price is set to 4, it means users pay 4 currency units to purchase 100 API calls. Price Setting Example

    5. Frontend Display

    After completing the above configurations, users will see a selection interface similar to the images below on the product details page, allowing them to choose different quota tiers and place orders. Frontend Display-1 Frontend Display-2