“wangdongchao” 1 vuosi sitten
vanhempi
commit
ece772e7b3

+ 1 - 3
Asteria/Fuction/Cart/Cart_CheckoutC.m

@@ -280,9 +280,7 @@
     self.TableV.infodata = [NSMutableArray arrayWithArray:self.totalsM.items];
     
     //邮寄地址--邮寄方式
-    if (self.addressCellM.addressModel) {
-        [self.TableV.infodata addObject:self.addressCellM];
-    }
+    [self.TableV.infodata addObject:self.addressCellM];
     
     //运输方式
     [self.TableV.infodata addObject:self.shipmethodCellM];

+ 4 - 8
Asteria/Fuction/Cart/Checkout/ASCheckoutAddressCell.m

@@ -80,15 +80,11 @@
     if (addressModel) {
         NSString *addressInfoStr = [NSString stringWithFormat:@"%@ %@ %@ %@,%@ tel:%@", addressModel.firstname, addressModel.lastname, [addressModel.street componentsJoinedByString:@" "], addressModel.city, addressModel.postcode, addressModel.telephone];
         
-        if (NIL(addressInfoStr)) {
-            _addressLab.textColor = [UIColor getColor:@"#E60013"];
-            _addressLab.text = @"Please fill in your address";
-        } else {
-            _addressLab.textColor = _0B0B0B;
-            _addressLab.text = addressInfoStr;
-        }
+        _addressLab.textColor = _0B0B0B;
+        _addressLab.text = addressInfoStr;
     } else {
-        _addressLab.text = @"--";
+        _addressLab.textColor = [UIColor getColor:@"#E60013"];
+        _addressLab.text = @"Please fill in your address";
     }
     
     

+ 3 - 0
Asteria/Fuction/Cart/PayManager/ASPaypalManager.h

@@ -11,6 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface ASPaypalManager : NSObject
 
+
+- (void)checkoutPayWithMethodType:(NSString *)payType completion:(void (^ __nullable)(NSUInteger isSucess , id payData))completion;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 41 - 0
Asteria/Fuction/Cart/PayManager/ASPaypalManager.m

@@ -10,4 +10,45 @@
 
 @implementation ASPaypalManager
 
+
+- (void)checkoutPayWithMethodType:(NSString *)payType completion:(void (^ __nullable)(NSUInteger isSucess , id payData))completion {
+    if ([payType isEqualToString:@"paypal_express"]) {//paypal
+        K_WEAK_SELF;
+        [ASNetTools.shared postWithPath:postTakeExtraPoints param:@{@"type": @"123"} success:^(id _Nonnull json) {
+            
+        } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+            
+        }];
+        
+    } else if ([payType isEqualToString:@"stripe_payments"]) {//visa
+        
+    } else if ([payType isEqualToString:@"afterpay_payment"]) {//afterpay
+        
+    } else if ([payType isEqualToString:@"klarna_kco"]) {//klarna
+        
+    } else {
+        
+    }
+}
+
+
+- (void)tool_gotoWebPay:(NSString *)urlStr withVC:(UIViewController *)tmpvc completion:(void (^ __nullable)(NSUInteger isSucess , id payData))completion{
+    XXX_BaseWebC *vc = [[XXX_BaseWebC alloc] init];
+    vc.isPayType = YES;
+    vc.WebViewBlock = ^(NSUInteger status, id  _Nonnull webData) {
+        if(status == 1){
+            if(completion){
+                completion(1, webData);
+            }
+        }else{
+            if(completion){
+                completion(0, webData);
+            }
+        }
+    };
+    [vc xxx_dsWebLoadUrl:urlStr];
+    vc.modalPresentationStyle = UIModalPresentationFullScreen;
+    [tmpvc presentViewController:vc animated:YES completion:nil];
+}
+
 @end