根据 CarrierService API 文档,运费响应应包含货币属性:http ://docs.shopify.com/api/carrierservice
下面的运费示例响应仍然导致 Shopify 在结账时以美元(或任何默认商店货币)显示所有这三种货币,没有转换,即相应的欧元和英镑分别为 12.95 美元和 29.34 美元。
{
"rates" => [
{
'service_name' => 'Method A',
'service_code' => 'RMG9A',
'total_price' => '1295', # cents
'currency' => 'EUR',
'min_delivery_date' => '2013-07-13 14:48:45 -0400',
'max_delivery_date' => '2013-07-13 14:48:45 -0400'
},
{
'service_name' => 'Method B',
'service_code' => 'RMG1P',
'total_price' => '2934', # cents
'currency' => 'GBP',
'min_delivery_date' => '2013-07-13 14:48:45 -0400',
'max_delivery_date' => '2013-07-13 14:48:45 -0400'
},
{
'service_name' => 'Method C',
'service_code' => 'RMG1D',
'total_price' => '2934', # cents
'currency' => 'USD',
'min_delivery_date' => '2013-07-13 14:48:45 -0400',
'max_delivery_date' => '2013-07-13 14:48:45 -0400'
}
]
}