Я интегрирую Google Express с Magento, но API Создать счет-фактуру не работает для меня. Я пытался создать счет-фактуру из опции "Попробуйте этот API" в Google Merchant, но выдает следующую ошибку:
{
"error": {
"errors": [
{
"domain": "content.ContentErrorDomain",
"reason": "invalid_transition",
"message": "The requested order is not supported by orderinvoices service"
}
],
"code": 400,
"message": "The requested order is not supported by orderinvoices service"
}
}
API-интерфейс createchargeinvoice doc: https://developers.google.com/shopping-content/v2/reference/v2/orderinvoices/createchargeinvoice
Тело моего запроса:
{
"invoiceId": "invoice1",
"operationId": "charge1",
"shipmentGroupId": "shipmentgroup1",
"lineItemInvoices": [
{
"productId": "online:en:US:d3k3245",
"shipmentUnitIds": [
"2"
],
"unitInvoice": {
"unitPricePretax": {
"value": "140",
"currency": "USD"
},
"unitPriceTaxes": [
{
"taxType": "sales",
"taxAmount": {
"value": "14",
"currency": "USD"
}
}
],
"promotions": [
{
"promotionId": "111",
"promotionAmount": {
"tax": {
"currency": "USD",
"value": "0"
},
"pretax": {
"currency": "USD",
"value": "0"
}
}
}
],
"additionalCharges": [
{
"additionalChargeAmount": {
"pretax": {
"currency": "USD",
"value": "0"
},
"tax": {
"currency": "USD",
"value": "0"
}
},
"additionalChargePromotions": [
{
"promotionAmount": {
"pretax": {
"currency": "USD",
"value": "0"
},
"tax": {
"currency": "USD",
"value": "0"
}
},
"promotionId": "111"
}
],
"type": "shipping"
}
]
}
}
],
"invoiceSummary": {
"productTotal": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"additionalChargeSummaries": [
{
"totalAmount": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"type": "shipping"
}
],
"promotionSummaries": [
{
"promotionAmount": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"promotionId": "111"
}
],
"merchantBalance": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
},
"customerBalance": {
"pretax": {
"value": "561.20",
"currency": "USD"
},
"tax": {
"value": "55.98",
"currency": "USD"
}
}
}
}
Кто-нибудь сталкивался с этой проблемой?