daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var params:Object = {
  2.                 customer_id: client.customer_id,
  3.                 firstname: client.firstname,
  4.                 email: client.email,
  5.                 telephone: client.telephone,
  6.                 fax: client.fax,
  7.                 address_1: client.address_1,
  8.                 address_2: client.address_2,
  9.                 city: client.city,
  10.                 postcode: client.postcode,
  11.                 country_id: client.country_id,
  12.                 zone_id: client.zone_id,
  13.                 total: order.total
  14.             };
  15.            
  16.             var order_product:Array = [];
  17.             for each (var orderItem:OrderItem in order.items)
  18.             {
  19.                 var product:Product = orderItem.product;
  20.                 order_product.push({
  21.                     product_id: product.product_id,
  22.                     name: product.name,
  23.                     quantity: orderItem.quantity,
  24.                     price: product.price,
  25.                     total: orderItem.total
  26.                 });
  27.             }
  28.            
  29.             params.order_product = JSON.stringify(order_product);
  30.            
  31.             var service:HTTPService = new HTTPService();
  32.             service.url = serverBase + REST_BASE + 'addOrder';
  33.             service.resultFormat = 'text';
  34.             service.method = 'post';
  35.             service.send(params);t);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand