Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.71 KB | None | 0 0
  1.         /* @var $headerApi HeaderAPI_Input */
  2.         $headerApi = new stdClass();
  3.  
  4.         $headerApi->APIVersion = "1";
  5.  
  6.         $headerApi->HeaderAuth = new stdClass();
  7.  
  8.         $headerApi->HeaderAuth->SignOn->UserName = 'NetmindTest';
  9.         $headerApi->HeaderAuth->SignOn->Password = 'Pwd123456';
  10.         $headerApi->HeaderAuth->SignOn->APPID = 'PAPI';
  11.  
  12.         /* @var $shippingRequest ShippingRequest */
  13.  
  14.         $shippingRequest = new stdClass();
  15.         $shippingRequest->NormalizeAddresses = true;
  16.  
  17.         $shippingRequest->Shipment = new stdClass();
  18.         $shippingRequest->Shipment->Label = new stdClass();
  19.  
  20.         $shippingRequest->Shipment->Label->Recipient = new stdClass();
  21.  
  22.         $shippingRequest->Shipment->Label->Recipient->Address = new stdClass();
  23.         $shippingRequest->Shipment->Label->Recipient->Address->StreetAddress = 'Pal';
  24.         $shippingRequest->Shipment->Label->Recipient->Address->PostCode = '2013';
  25.         $shippingRequest->Shipment->Label->Recipient->Address->City = 'Milnao';
  26.         $shippingRequest->Shipment->Label->Recipient->Address->District = 'MI';
  27.         $shippingRequest->Shipment->Label->Recipient->Address->Name = 'Gino';
  28.         $shippingRequest->Shipment->Label->Recipient->Address->Name2 = 'Bartali';
  29.         $shippingRequest->Shipment->Label->Recipient->Address->PhoneNumber = '0810291';
  30.         $shippingRequest->Shipment->Label->Recipient->Address->Email = 'efr@wedfe.it';
  31.         $shippingRequest->Shipment->Label->Recipient->Address->PhoneNumber2 = '3443645';
  32.  
  33.         $shippingRequest->Shipment->Label->Sender = new stdClass();
  34.         $shippingRequest->Shipment->Label->Sender->StreetAddress = 'Padova';
  35.         $shippingRequest->Shipment->Label->Sender->PostCode = '2013';
  36.         $shippingRequest->Shipment->Label->Sender->City = 'Milnao';
  37.         $shippingRequest->Shipment->Label->Sender->District = 'MI';
  38.         $shippingRequest->Shipment->Label->Sender->Name = 'pezzotto';
  39.         $shippingRequest->Shipment->Label->Sender->Name2 = 'oso';
  40.  
  41.         $shippingRequest->Shipment->Label->Size = 'XS';
  42.         $shippingRequest->Shipment->Label->Product = 'Sistema incompleto';
  43.         $shippingRequest->Shipment->Label->PackagesQuantity = '1';
  44.  
  45.         $shippingRequest->Shipment->Customer = new stdClass();
  46.         $shippingRequest->Shipment->Customer->Code = null;
  47.         $shippingRequest->Shipment->Customer->MerchantId = null;
  48.  
  49.         $shippingRequest->Shipment->Pickup = new stdClass();
  50.         $shippingRequest->Shipment->Pickup->PickupType = null;
  51.         $shippingRequest->Shipment->Pickup->PickupDate = '2015-07-17T09:00:00';
  52.         $shippingRequest->Shipment->Pickup->Agency = null;
  53.  
  54.         $shippingRequest->Shipment->Pickup->Address = new stdClass();
  55.  
  56.         $shippingRequest->Shipment->Pickup->Address->StreetAddress = 'Via pome';
  57.         $shippingRequest->Shipment->Pickup->Address->StreetNumber = null;
  58.         $shippingRequest->Shipment->Pickup->Address->PostCode = '80100';
  59.         $shippingRequest->Shipment->Pickup->Address->City = 'Milano';
  60.         $shippingRequest->Shipment->Pickup->Address->District = 'MI';
  61.         $shippingRequest->Shipment->Pickup->Address->Name = 'Netsoft';
  62.         $shippingRequest->Shipment->Pickup->Address->PhoneNumber = '081020';
  63.         $shippingRequest->Shipment->Pickup->Address->Email = 'sff@fedfef.it';
  64.  
  65.         $shippingRequest->Shipment->Pickup->Note = 'Note';
  66.  
  67.         $shippingRequest->Shipment->Delivery = new stdClass();
  68.         $shippingRequest->Shipment->Delivery->Check = new stdClass();
  69.         $shippingRequest->Shipment->Delivery->Check->Amount = '180';
  70.  
  71.         $obj= new stdClass();
  72.         $obj->HeaderAPI = $headerApi;
  73.         $obj->ShippingRequest = $shippingRequest;
  74.  
  75. // Invio $obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement