// // ASPaypalManager.m // Asteria // // Created by xingyu on 2024/5/14. // #import "ASPaypalManager.h" @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