Files
MiraviaConnector/platform-middleware-master/test/Services/Aliexpress/OpenApi/OrderTest.php
Miravia Connector Bot 752600f337 Fix image upload structure for Miravia API compliance
🔧 Bug Fixes:
- Fixed product image structure to match Miravia API requirements
- Updated MiraviaProduct.php getData() method to wrap images in {"Image": [...]} format
- Updated MiraviaCombination.php getData() method to wrap SKU images properly
- Resolved error "[4224] The Main image of the product is required"

📋 Changes:
- Modified getData() methods to transform flat image arrays to nested structure
- Product images: images[] → Images: {"Image": [...]}
- SKU images: images[] → Images: {"Image": [...]}
- Maintains backward compatibility for empty image arrays

🎯 Impact:
- Product uploads will now pass Miravia's image validation
- Both product-level and SKU-level images properly formatted
- Complies with official Miravia API documentation structure

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:34:59 +02:00

27 lines
589 B
PHP

<?php
/**
* Created by Sweeper PhpStorm.
* Author: Sweeper <wili.lixiang@gmail.com>
* DateTime: 2024/3/19 18:06
*/
namespace Sweeper\PlatformMiddleware\Test\Services\Aliexpress\OpenApi;
use Sweeper\PlatformMiddleware\Services\Aliexpress\OpenApi\Order;
use PHPUnit\Framework\TestCase;
class OrderTest extends TestCase
{
public function testGetOrderList()
{
$accountInfo = [];
$response = Order::instance()->getOrderList($accountInfo, ['current_page' => 1, 'page_size' => 50]);
dump($response);
static::assertIsArray($response);
}
}