diff options
Diffstat (limited to 'StoneIsland/www/js/sdk/cart.js')
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index d0c8f6df..26540f59 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -6,7 +6,7 @@ sdk.cart = (function(){ // https://gist.github.com/fanfare/9a50c524aea417d0bf3e cart.initialize = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Cart.API/1.6", "carts.json"), headers: { @@ -25,7 +25,7 @@ sdk.cart = (function(){ } cart.set_user = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "user.json"), headers: { @@ -46,7 +46,7 @@ sdk.cart = (function(){ // Code10, Size, Section cart.add_item = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/items.json"), headers: { @@ -63,7 +63,7 @@ sdk.cart = (function(){ } cart.delete_item = function(opt){ - $.ajax({ + return $.ajax({ method: "DELETE", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/items/" + opt.code10 + @@ -81,7 +81,7 @@ sdk.cart = (function(){ } cart.get_status = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Cart.API/1.6", "carts/" + cart.id), headers: { @@ -103,7 +103,7 @@ sdk.cart = (function(){ // NOTE: data might be wrapped in a Receiver object cart.set_shipping_address = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "receiver.json"), headers: { @@ -121,7 +121,7 @@ sdk.cart = (function(){ // NB: Payment type may simply be 1 (credit card) cart.set_payment_type = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/paymentType.json"), headers: { @@ -139,7 +139,7 @@ sdk.cart = (function(){ // use with full CC data if not storing it in wallet cart.set_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/creditCard.json"), headers: { @@ -159,7 +159,7 @@ sdk.cart = (function(){ // NB: if "verification number" is 1, use CVV/CID/CVC security code // if "verification number" is 2, use "Issue Number" cart.use_stored_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/userCreditCard.json"), headers: { @@ -182,7 +182,7 @@ sdk.cart = (function(){ } cart.finalize = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/secureFinalizer.json"), headers: { |
