Magento 2 API 订单运输和处理 UPS 帐号

问题描述

我正在为使用此 URL 的订单调用 Magento 2.4.2 API

https://www.company.com/rest/default/V1/orders/OrderNumber

我可以看到付款方式和送货地址,但我在回复的附加图片中找不到帐号。有没有办法在接到订单时从API获取这个账号,或者无法通过订单获取

是否需要进行特定调用才能获取此信息?付款是通过 PayPal 支付的,送货方式是 Collect Shipping。

enter image description here

{
  "adjustment_negative": 0,"adjustment_positive": 0,"base_adjustment_negative": 0,"base_adjustment_positive": 0,"base_currency_code": "USD","base_discount_amount": 0,"base_discount_invoiced": 0,"base_discount_refunded": 0,"base_grand_total": 20,"base_discount_tax_compensation_amount": 0,"base_discount_tax_compensation_invoiced": 0,"base_discount_tax_compensation_refunded": 0,"base_shipping_amount": 0,"base_shipping_discount_amount": 0,"base_shipping_discount_tax_compensation_amnt": 0,"base_shipping_incl_tax": 0,"base_shipping_invoiced": 0,"base_shipping_refunded": 0,"base_shipping_tax_amount": 0,"base_shipping_tax_refunded": 0,"base_subtotal": 10,"base_subtotal_incl_tax": 10,"base_subtotal_invoiced": 10,"base_subtotal_refunded": 10,"base_tax_amount": 0,"base_tax_invoiced": 0,"base_tax_refunded": 0,"base_total_due": 0,"base_total_invoiced": 20,"base_total_invoiced_cost": 0,"base_total_online_refunded": 20,"base_total_paid": 20,"base_total_refunded": 20,"base_to_global_rate": 1,"base_to_order_rate": 1,"billing_address_id": 70,"created_at": "2021-05-24 19:10:14","customer_email": "Test@test.com","customer_firstname": "Name","customer_gender": 0,"customer_group_id": 3,"customer_id": 48,"customer_is_guest": 0,"customer_lastname": "Test","customer_note_notify": 1,"discount_amount": 0,"discount_invoiced": 0,"discount_refunded": 0,"email_sent": 1,"entity_id": 35,"global_currency_code": "USD","grand_total": 20,"discount_tax_compensation_amount": 0,"discount_tax_compensation_invoiced": 0,"discount_tax_compensation_refunded": 0,"increment_id": "000000035","is_virtual": 0,"order_currency_code": "USD","protect_code": "12312312312321312312","quote_id": 57,"remote_ip": "123123123","shipping_amount": 0,"shipping_description": "Collect Shipping - Bill to my Account","shipping_discount_amount": 0,"shipping_discount_tax_compensation_amount": 0,"shipping_incl_tax": 0,"shipping_invoiced": 0,"shipping_refunded": 0,"shipping_tax_amount": 0,"shipping_tax_refunded": 0,"state": "closed","status": "closed","store_currency_code": "USD","store_id": 1,"store_name": "Store name","store_to_base_rate": 0,"store_to_order_rate": 0,"subtotal": 10,"subtotal_incl_tax": 10,"subtotal_invoiced": 10,"subtotal_refunded": 10,"tax_amount": 0,"tax_invoiced": 0,"tax_refunded": 0,"total_due": 0,"total_invoiced": 20,"total_item_count": 1,"total_online_refunded": 20,"total_paid": 20,"total_qty_ordered": 1,"total_refunded": 20,"updated_at": "2021-05-24 19:13:44","weight": 0.0225,"x_forwarded_for": "123 123 123","items": [
    {
      "amount_refunded": 10,"base_amount_refunded": 10,"base_original_price": 10,"base_price": 10,"base_price_incl_tax": 10,"base_row_invoiced": 10,"base_row_total": 10,"base_row_total_incl_tax": 10,"discount_percent": 0,"free_shipping": 0,"is_qty_decimal": 0,"item_id": 111,"name": "Name","no_discount": 0,"order_id": 35,"original_price": 10,"price": 10,"price_incl_tax": 10,"product_id": 1234,"product_type": "simple","qty_canceled": 0,"qty_invoiced": 1,"qty_ordered": 1,"qty_refunded": 1,"qty_shipped": 0,"quote_item_id": 205,"row_invoiced": 10,"row_total": 10,"row_total_incl_tax": 10,"row_weight": 0.0225,"sku": "sku","tax_percent": 0,"weee_tax_applied": "[]","weight": 0.0225
    }
  ],"billing_address": {
    "address_type": "billing","city": "city","company": "Company ","country_id": "US","email": "email@emai.com","entity_id": 70,"firstname": "Testing","lastname": "Testing","parent_id": 35,"postcode": "12345","region": "State","region_code": "State","region_id": 00,"street": [
      "123 fake street"
    ],"telephone": "1111111111"
  },"payment": {
    "account_status": null,"additional_information": [
      "1","","123123123123","email@email.com","verified","confirmed","1123123123","12312312312321","12312312312312312","PayPal Express Checkout",null,"Eligible","refunded","None"
    ],"amount_authorized": 20,"amount_ordered": 20,"amount_paid": 20,"amount_refunded": 40,"base_amount_authorized": 20,"base_amount_ordered": 20,"base_amount_paid": 20,"base_amount_paid_online": 20,"base_amount_refunded": 20,"base_amount_refunded_online": 20,"base_shipping_captured": 0,"cc_exp_year": "0","cc_last4": null,"cc_ss_start_month": "0","cc_ss_start_year": "0","last_trans_id": "1234123123123","method": "paypal_express","shipping_captured": 0,"shipping_refunded": 0
  },"extension_attributes": {
    "shipping_assignments": [
      {
        "shipping": {
          "address": {
            "address_type": "shipping","city": "fake ","company": "company ","customer_address_id": 00,"email": "testing@testing.com","entity_id": 69,"firstname": "testing","street": [
              "123 fake street"
            ],"telephone": "111-111-1111"
          },"method": "collect_shipping_collect_shipping","total": {
            "base_shipping_amount": 0,"shipping_tax_refunded": 0
          }
        },"items": [
          {
            "amount_refunded": 10,"item_id": 147,"name": "name","product_id": id,"weight": 0.0225
          }
        ]
      }
    ],"payment_additional_info": [
      {
        "key": "paypal_express_checkout_shipping_overridden","value": "1"
      },{
        "key": "paypal_express_checkout_shipping_method","value": ""
      },{
        "key": "paypal_payer_id","value": "payerid"
      },{
        "key": "paypal_payer_email","value": "email"
      },{
        "key": "paypal_payer_status","value": "verified"
      },{
        "key": "paypal_address_status","value": "confirmed"
      },{
        "key": "paypal_correlation_id","value": "corrid"
      },{
        "key": "paypal_express_checkout_payer_id",{
        "key": "paypal_express_checkout_token","value": "token"
      },{
        "key": "method_title","value": "PayPal Express Checkout"
      },{
        "key": "paypal_express_checkout_redirect_required","value": "null"
      },{
        "key": "paypal_protection_eligibility","value": "Eligible"
      },{
        "key": "paypal_payment_status","value": "refunded"
      },{
        "key": "paypal_pending_reason","value": "None"
      }
    ],"applied_taxes": [],"item_applied_taxes": [],"extrafee": "10.0000"
  }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)