diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-11 18:08:37 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-11 18:08:37 -0500 |
| commit | e49d68aa34532bbdf9d8d942f9d7e2532454e55d (patch) | |
| tree | f23ef3bf92d3d40e921e87b4fe91efccdce41308 | |
| parent | ca49959f326d3a03a47b2352c19d52ef91085158 (diff) | |
not happy with this cc api
| -rw-r--r-- | StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate | bin | 13428 -> 13429 bytes | |||
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 7 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/payment.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/shipping.js | 2 | ||||
| -rw-r--r-- | proxy/index.js | 6 | ||||
| -rw-r--r-- | test/test/04-cart.js | 25 |
8 files changed, 27 insertions, 23 deletions
diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate Binary files differindex 3b7233e1..bcf4bbca 100644 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate +++ b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index bf4af40b..47f0ec26 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -53,7 +53,7 @@ var SiteRouter = Router.extend({ default_view: function(name){ var fn = function(){ console.log(name) - if (name.match(".")) { + if (name.match(/\./)) { var n = name.split(".") console.log(name, n) app.view = app[n[0]][n[1]] diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index fd81f199..8e14c193 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -21,7 +21,7 @@ var ProductView = ScrollableView.extend({ this.$color = this.$(".color") this.$body = this.$(".body") - app.footer.show("< BACK TO SHOPPING", "ADD TO CART") + app.footer.show("ADD TO CART", "< BACK TO SHOPPING") }, show: function(){ @@ -135,11 +135,14 @@ var ProductView = ScrollableView.extend({ }.bind(this)) }, - ok: function(){ + save: function(){ + // add to cart }, + cancel: function(){ app.router.go('store') }, + share: function(){ }, diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index b10503d8..6de10d18 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -126,7 +126,7 @@ sdk.cart = (function(){ }, data: opt.data, success: function(data){ - console.log(data) + // console.log(data) opt.success(data) }, error: opt.error, @@ -144,7 +144,7 @@ sdk.cart = (function(){ }, data: opt.data, success: function(data){ - console.log(data) + // console.log(data) opt.success(data) }, error: opt.error, diff --git a/StoneIsland/www/js/sdk/payment.js b/StoneIsland/www/js/sdk/payment.js index 0076fbf8..e73bb5ff 100644 --- a/StoneIsland/www/js/sdk/payment.js +++ b/StoneIsland/www/js/sdk/payment.js @@ -11,7 +11,7 @@ sdk.payment = (function(){ }, data: opt.data, success: function(data){ - console.log(data) + // console.log(data) opt.success(data) }, error: opt.error, @@ -61,7 +61,7 @@ sdk.payment = (function(){ }, data: opt.data, success: function(data){ - console.log(data) + // console.log(data) opt.success(data) }, error: opt.error, diff --git a/StoneIsland/www/js/sdk/shipping.js b/StoneIsland/www/js/sdk/shipping.js index 95f78d82..71e0267f 100644 --- a/StoneIsland/www/js/sdk/shipping.js +++ b/StoneIsland/www/js/sdk/shipping.js @@ -34,7 +34,7 @@ sdk.shipping = (function() { "Type": opt.type, }, success: function(data){ - console.log(data) + // console.log(data) opt.success(data) }, error: opt.error, diff --git a/proxy/index.js b/proxy/index.js index d30b135b..27d3156e 100644 --- a/proxy/index.js +++ b/proxy/index.js @@ -67,12 +67,6 @@ server.on('request', function (req, res){ server_res.resume() }) - connector.on('response', function(e){ - console.log(">> RESPONSE") - }) - connector.on('connect', function(e){ - console.log(">> CONNECT") - }) connector.on('error', function(e){ console.error(e) }) diff --git a/test/test/04-cart.js b/test/test/04-cart.js index 5b33020b..3526d19b 100644 --- a/test/test/04-cart.js +++ b/test/test/04-cart.js @@ -138,6 +138,12 @@ describe('shipping', function(){ describe('payment', function(){ + + if (! sdk.auth.access_token) { + sdk.auth.access_token = "45871479f5001afc06e628c7bb8e95ffb1f71df8" + sdk.auth.user_id = 374663521 + } + describe('#set_payment_type()', function(){ it('sets payment type', function(done){ // this id probably needs to be hard coded. 1 = credit card. @@ -183,33 +189,34 @@ describe('payment', function(){ promise(sdk.payment.list_credit_cards, { data: {} }).then(function(data){ assert(data.Header.StatusCode == 200) // show any credit card on file - console.log(data) + // console.log(data) done() }) }) }) describe('#add_credit_card()', function(){ - /* it('add credit card', function(done){ var new_card = { + "Name":"Name", + "Surname":"Surname", "Address":"address", "City":"Ferrara", - "ExpirationMonth":"02", - "ExpirationYear":"2015", - "Name":"Name", - "Number":"0000567890124285", "Province":"FE", - "Surname":"Surname", - "Type":"Visa", "ZipCode":"40200", + + "Type":"Visa", + "Number":"0000567890124285", + "ExpirationMonth":"02", + "ExpirationYear":"2015", "HolderIsoCountry":"IT", } promise(sdk.payment.add_credit_card, { data: new_card }).then(function(data){ assert(data.Header.StatusCode == 201) done() + }).error(function(data){ + console.log(data) }) }) - */ }) describe('#delete_credit_card()', function(){ /* |
