Commit 73874a8f by houweibin

1,API demain更换

parent ec4f5a83
......@@ -677,11 +677,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) getExchangeRate:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMExchangeRateResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
#if DEBUG
NSString *apiPath = @"https://liang.tofnews.com/app/exchange/rate";
#else
NSString *apiPath = @"https://apps.cemarose.com/app/exchange/rate";
#endif
NSString *apiPath = [NSString stringWithFormat:@"https://%@/app/exchange/rate",Additional_API_DOMAIN];
// NSString *sign = [KWMStringUtil MD5:[KWMStringUtil BASE64:@"currency=EUR&key=bd3f58f5cd3d7a217ac8c8e655ab52f8"]];
// NSLog(@"rate sign: %@",sign);
// NSDictionary *params = @{@"currency":@"EUR",@"sign":sign};
......@@ -795,8 +791,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) wechatPayUnifiedOrder:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMCheckoutPayResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
NSString *apiPath = @"https://liang.tofnews.com/wechatpay/app/unified_order";
NSString *apiPath = [NSString stringWithFormat:@"https://%@/wechatpay/app/unified_order",Additional_API_DOMAIN];
return [self startSessionTask:KWMHTTPMethodPOST
apiPath:apiPath
parameters:parameters
......@@ -821,8 +816,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) aliPayUnifiedOrder:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMCheckoutPayResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
NSString *apiPath = @"https://liang.tofnews.com/alipay/app/unified_order";
NSString *apiPath = [NSString stringWithFormat:@"https://%@/alipay/app/unified_order",Additional_API_DOMAIN];
return [self startSessionTask:KWMHTTPMethodPOST
apiPath:apiPath
parameters:parameters
......@@ -835,8 +829,8 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) wechatPayOrderQuery:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMCheckoutPayResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
NSString *apiPath = @"https://liang.tofnews.com/wechatpay/order/query";
NSString *apiPath = [NSString stringWithFormat:@"https://%@/wechatpay/order/query",Additional_API_DOMAIN];
return [self startSessionTask:KWMHTTPMethodPOST
apiPath:apiPath
parameters:parameters
......@@ -849,8 +843,8 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) aliPayOrderQuery:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMCheckoutPayResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
NSString *apiPath = @"https://liang.tofnews.com/alipay/order/query";
NSString *apiPath = [NSString stringWithFormat:@"https://%@/alipay/order/query",Additional_API_DOMAIN];
return [self startSessionTask:KWMHTTPMethodPOST
apiPath:apiPath
parameters:parameters
......@@ -873,8 +867,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
- (NSURLSessionDataTask *) appOrderQuery:(NSDictionary *)parameters
success:(void(^)(NSURLSessionDataTask *task,KWMCheckoutPayResult *result))success
failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure{
NSString *apiPath = @"https://liang.tofnews.com/app/order/query";
NSString *apiPath = [NSString stringWithFormat:@"https://%@/app/order/query",Additional_API_DOMAIN];
return [self startSessionTask:KWMHTTPMethodPOST
apiPath:apiPath
parameters:parameters
......
......@@ -64,6 +64,9 @@
//测试
#define TestModel @"YES"
//额外api domain
#define Additional_API_DOMAIN @"liang.tofnews.com"
//Shopify对应的key(测试用)
#define Shopify_SHOP_DOMAIN @"cemarose-test.myshopify.com"
......@@ -74,6 +77,8 @@
//正式
#define TestModel @"NO"
#define Additional_API_DOMAIN @"apps.cemarose.com"
//Shopify对应的key(正式)
#define Shopify_SHOP_DOMAIN @"cemarose.myshopify.com"
#define Shopify_API_KEY @"c2f6fae97741ea6db4cad7ae8f70fef3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment