diff --git a/FuelMe/ApplePayHelper.h b/FuelMe/ApplePayHelper.h index 1a3f9a3..ab99fc6 100644 --- a/FuelMe/ApplePayHelper.h +++ b/FuelMe/ApplePayHelper.h @@ -24,8 +24,6 @@ typedef void(^ApplePayTokenBlock)(NSString *token, NSError *error); + (BOOL)canMakePayment; + (BOOL)hasApplePaySetup; + (void)openSettingsApplePay; -+ (UIButton*)applePayButton; -+ (UIButton*)applePaySetupButton; - (void)showApplePayAuthorizationWithCategory:(RACarCategoryDataModel *)carCategory completion:(ApplePayTokenBlock)completion; diff --git a/FuelMe/ApplePayHelper.m b/FuelMe/ApplePayHelper.m index 4059761..941ea6c 100644 --- a/FuelMe/ApplePayHelper.m +++ b/FuelMe/ApplePayHelper.m @@ -64,30 +64,6 @@ + (void)openSettingsApplePay { } } -+ (UIButton*)applePayButton { - UIButton *applePayBtn; - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) { - applePayBtn = [PKPaymentButton buttonWithType:PKPaymentButtonTypeInStore style:PKPaymentButtonStyleBlack]; - } else if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.3")) { - applePayBtn = [PKPaymentButton buttonWithType:PKPaymentButtonTypePlain style:PKPaymentButtonStyleBlack]; - } else { - applePayBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - [applePayBtn setImage:[UIImage imageNamed:@"applePayButton"] forState:UIControlStateNormal]; - } - return applePayBtn; -} - -+ (UIButton*)applePaySetupButton { - UIButton *applePayBtn; - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) { - applePayBtn = [PKPaymentButton buttonWithType:PKPaymentButtonTypeSetUp style:PKPaymentButtonStyleBlack]; - } else { - applePayBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - [applePayBtn setBackgroundImage:[UIImage imageNamed:@"applePaySetupButton"] forState:UIControlStateNormal]; - } - return applePayBtn; -} - - (void)showApplePayAuthorizationWithCategory:(RACarCategoryDataModel *)carCategory completion:(ApplePayTokenBlock)completion { UIViewController *rootController = [[UIApplication sharedApplication] keyWindow].rootViewController; PKPaymentRequest *paymentRequest = [Stripe paymentRequestWithMerchantIdentifier:@"merchant.com.rideaustin.public" country:@"US" currency:@"USD"]; diff --git a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x-1.png b/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x-1.png deleted file mode 100644 index 3244dc1..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x-1.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x.png b/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x.png deleted file mode 100644 index 3244dc1..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@2x.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@3x.png b/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@3x.png deleted file mode 100644 index 6fab5af..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/ApplePayBTN_44pt__black_logo_@3x.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/Contents.json b/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/Contents.json deleted file mode 100644 index 717cb7c..0000000 --- a/Resources/Assets.xcassets/Non-Vector/applePayButton.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "ApplePayBTN_44pt__black_logo_@2x-1.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "ApplePayBTN_44pt__black_logo_@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "ApplePayBTN_44pt__black_logo_@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-1.png b/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-1.png deleted file mode 100644 index afd1602..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-1.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-2.png b/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-2.png deleted file mode 100644 index afd1602..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-2.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-3.png b/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-3.png deleted file mode 100644 index afd1602..0000000 Binary files a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Apple_Pay_Setup-3.png and /dev/null differ diff --git a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Contents.json b/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Contents.json deleted file mode 100644 index 24516e1..0000000 --- a/Resources/Assets.xcassets/Non-Vector/applePaySetupButton.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Apple_Pay_Setup-1.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "Apple_Pay_Setup-3.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "Apple_Pay_Setup-2.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Resources/Generated/Assets.swift b/Resources/Generated/Assets.swift index da4d365..92d12ff 100644 --- a/Resources/Generated/Assets.swift +++ b/Resources/Generated/Assets.swift @@ -70,8 +70,6 @@ internal enum Asset { internal static let iconPinkDrivers = ImageAsset(name: "icon-pink-drivers") internal static let active = ImageAsset(name: "active") internal static let addIcon = ImageAsset(name: "add-icon") - internal static let applePayButton = ImageAsset(name: "applePayButton") - internal static let applePaySetupButton = ImageAsset(name: "applePaySetupButton") internal static let backgroundDriverRating = ImageAsset(name: "backgroundDriverRating") internal static let backgroundNumberplate = ImageAsset(name: "backgroundNumberplate") internal static let backgroundRoundUpHeader = ImageAsset(name: "backgroundRoundUpHeader")