Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var params:Object = {
- customer_id: client.customer_id,
- firstname: client.firstname,
- email: client.email,
- telephone: client.telephone,
- fax: client.fax,
- address_1: client.address_1,
- address_2: client.address_2,
- city: client.city,
- postcode: client.postcode,
- country_id: client.country_id,
- zone_id: client.zone_id,
- order_product: [],
- total: order.total
- };
- for each (var orderItem:OrderItem in order.items)
- {
- var product:Product = orderItem.product;
- params.order_product.push({
- product_id: product.product_id,
- name: product.name,
- quantity: orderItem.quantity,
- price: product.price,
- total: orderItem.total
- });
- }
- var service:HTTPService = new HTTPService();
- service.url = serverBase + REST_BASE + 'addOrder';
- service.resultFormat = 'text';
- service.method = 'post';
- service.send(params);
Add Comment
Please, Sign In to add comment