26 lines
659 B
PHP
26 lines
659 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Platform\Shopee\Producer;
|
|
|
|
use Hyperf\Amqp\Annotation\Producer;
|
|
use App\Platform\OrderProducer;
|
|
|
|
#[Producer('shopee.exchange', 'refund.shopee')]
|
|
class ShopeeRefundProducer extends OrderProducer
|
|
{
|
|
protected string $exchange = 'shopee.exchange';
|
|
protected string|array $routingKey = 'refund.shopee';
|
|
|
|
protected function buildMessage(array $data): array
|
|
{
|
|
$parent_meta = parent::buildMessage($data);
|
|
$parent_meta['platform'] = 'shopee';
|
|
$parent_meta['data_type'] = 'refund';
|
|
$parent_meta['meta']['source_system'] = 'shopee_api';
|
|
|
|
return $parent_meta;
|
|
}
|
|
}
|