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.
2. Add an Interface
Log in to the Magic Finance admin panel, go to Settings → Product Settings → General Interfaces, and click Create Interface.
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).
3. Add a Product
Product Group: You can choose an existing group or create a new one (e.g., "API Products").
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.
Pricing: Select "One-time" billing mode and set the price to 0 (this is a placeholder; the actual price is determined by configurable options).
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).
In the product editing page, locate the Configurable Options section and click Add Configurable Option.
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).
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.
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.