Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
ios1x
Commits
90e1f7ce
Commit
90e1f7ce
authored
8 years ago
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clear checkout
parent
4dc91403
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
KWMBeforePayVC.m
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
+9
-0
KWMPaySuccessVC.m
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.m
+1
-3
KWMHttpUtil.h
iCemarose/Class/Util/KWMHttpUtil.h
+2
-0
KWMHttpUtil.m
iCemarose/Class/Util/KWMHttpUtil.m
+11
-0
Header-Prefix.h
iCemarose/Header-Prefix.h
+11
-7
No files found.
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
View file @
90e1f7ce
...
...
@@ -21,6 +21,7 @@
#import "KWMHttpUtil.h"
#import "KWMValidateUtil.h"
#import "KWMPayUtil.h"
#import "KWMShopCartData.h"
@interface
KWMBeforePayVC
()
@property
(
nonatomic
)
BUYCustomer
*
customer
;
...
...
@@ -711,9 +712,17 @@
}
-
(
void
)
paySuccess
{
[
self
clearCheckout
];
KWMPaySuccessVC
*
successVC
=
(
KWMPaySuccessVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMPaySuccessVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
[
self
.
navigationController
pushViewController
:
successVC
animated
:
YES
];
}
-
(
void
)
clearCheckout
{
self
.
cartCookie
=
nil
;
[
KWMHttpUtil
deleteCookie
:
@"cart"
];
[[
KWMShopCartData
alloc
]
removeAllItems
];
[
self
.
userDao
deleteCheckoutCache
];
}
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.m
View file @
90e1f7ce
...
...
@@ -22,9 +22,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"支付成功"
;
[[
KWMShopCartData
alloc
]
removeAllItems
];
[
self
.
userDao
deleteCheckoutCache
];
[
self
initButton
];
}
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMHttpUtil.h
View file @
90e1f7ce
...
...
@@ -12,4 +12,6 @@
+
(
NSString
*
)
buildRequestCookieString
;
+
(
void
)
deleteCookie
:(
NSString
*
)
name
;
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMHttpUtil.m
View file @
90e1f7ce
...
...
@@ -19,4 +19,15 @@
return
cookieString
;
}
+
(
void
)
deleteCookie
:
(
NSString
*
)
name
{
NSArray
*
cookies
=
[[
NSHTTPCookieStorage
sharedHTTPCookieStorage
]
cookies
];
for
(
int
i
=
0
;
i
<
cookies
.
count
;
i
++
)
{
NSHTTPCookie
*
cookie
=
cookies
[
i
];
if
([
cookie
.
name
isEqualToString
:
name
])
{
[[
NSHTTPCookieStorage
sharedHTTPCookieStorage
]
deleteCookie
:
cookie
];
return
;
}
}
}
@end
This diff is collapsed.
Click to expand it.
iCemarose/Header-Prefix.h
View file @
90e1f7ce
...
...
@@ -60,21 +60,25 @@
#define User_Pay_KEY @"bd3f58f5cd3d7a217ac8c8e655ab52f8"
#if DEBUG && 1
//测试
#define TestModel @"YES"
//Shopify对应的key(测试用)
#define Shopify_SHOP_DOMAIN @"cemarose-test.myshopify.com"
#define Shopify_API_KEY @"4f34b3c32f4297386fc4fdaee7ef2bce"
#define Shopify_APP_ID @"8"
#else
////正式
//#define TestModel @"NO"
//
////Shopify对应的key(正式)
//#define Shopify_SHOP_DOMAIN @"cemarose.myshopify.com"
//#define Shopify_API_KEY @"c2f6fae97741ea6db4cad7ae8f70fef3"
//#define Shopify_APP_ID @"8"
//正式
#define TestModel @"NO"
//Shopify对应的key(正式)
#define Shopify_SHOP_DOMAIN @"cemarose.myshopify.com"
#define Shopify_API_KEY @"c2f6fae97741ea6db4cad7ae8f70fef3"
#define Shopify_APP_ID @"8"
#end
//软键盘输入限制
#define NUM @"0123456789"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment