MAO-EYE 2019-05-10 08:26 采纳率: 100%
浏览 41

后期输出的差异

I have two scripts, one is a Prestashop DHL label creator, and the other one is our company's internal sales application. I'm trying to combine the two together so we can generate DHL label from the application without visiting the shop's admin panel. And now to the core of the problem. The Prestashop DHL module sends a POST with parameters looking like this:

Receiver:Address:HouseNumber: #value

and our internal sales app sends POST with parameters looking like this:

Receiver[Address][HouseNumber]: #value

This may be a stupid question, but what's the difference?

Here's the code that generates the POST in our app

function generateDHLLabel()
{
    jQuery.post("prestashop_link", { 
        DhlShipmentId:'',   
        DhlOrderId  :'',
        DhlShipmentCreationDateTime:'',
        ShipmentPreset:{ldelim}ShipmentPresetId :   1{rdelim},
        ServiceType:    'AH',
        DropOffType:    'REGULAR_PICKUP',
        LabelType:  'BLP',
        Content:    'content',
        Comment :'',
        Reference:  5508,
        ShippingPaymentType:    'SHIPPER',
        PaymentType:    'BANK_TRANSFER',
        BillingAccountNumber    :'',
        CostsCenter :'',
        ShipmentDate:   '2019-05-09',
        ShipmentStartHour:  '09:00',
        ShipmentEndHour:    '19:00',
        ParcelIdent :'',
        Postnummer  :'',
        ParcelPostalCode :'',   
        Receiver:{ldelim}
            Address:{ldelim}Name:   'Name+Surname',
                            Street: 'Street+1',
                            HouseNumber:'',
                            ApartmentNumber:'', 
                            OriginalAddressString:  'Name+Surname,+Street+1,+00-000+City,+Country',
                            ParseAlert:'',
                            PostalCode: '00000',
                            City:   'CITY',
                            Country:    'PL'{rdelim},
            Contact:{ldelim}Name:   'Name+Surname',
                            Phone:  '000000000',
                            Email:  'mail@domain.com'{rdelim}{rdelim},
        Package:{ldelim}Type:   'PACKAGE',
                        Weight: '4',
                        Width:  '30',
                        Height: '30',
                        Length: '20',
                        Quantity:   '1'{rdelim},
        SpecialServices:{ldelim}S_UBEZP:    '1',
                                UBEZP_Value:    '123.49',
                                UBEZP_CurrencyUnitAlert :'',
                                S_COD:  '1',
                                COD_Value:  '123.49',
                                COD_CurrencyUnitAlert:'',
                                ROD_Instruction :'',
                                OriginalCurrencyUnit:   'PLN'{rdelim},
        Neighbour:{ldelim}Name:'',
                            Street:'',
                            HouseNumber:'',
                            ApartmentNumber:'',
                            PostalCode:'',
                            City:'',
                            Phone:'',
                            Email:''{rdelim},






        Action:'Send'


    }, function(data) {
        window.location.href = '{site_url()}app/packing/order-packing/{$this->uri->segment(4)}';
    });

}
  • 写回答

1条回答 默认 最新

  • csdn产品小助手 2019-05-10 08:29
    关注

    One has square brackets in the name. The other has colons in the name. That's all.

    The software reading the request will probably care which you use.

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?