diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index 0f8f6f99..0316e234 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -188,17 +188,17 @@ sdk.cart = (function(){ error: opt.error, }) } - + cart.finalize = function(opt){ return $.ajax({ - method: "PUT", + method: "POST", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/secureFinalizer.json"), headers: { "x-yoox-appname": auth.appname, "x-yoox-cart-token": cart.token, "x-yoox-device": auth.device, }, - data: JSON.stringify( opt.data ), + data: JSON.stringify( opt.data || {} ), success: function(data){ console.log(data) // order number is: @@ -208,5 +208,6 @@ sdk.cart = (function(){ error: opt.error, }) } + return cart })()
\ No newline at end of file |
