Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary applePayButtons #46

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions FuelMe/ApplePayHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
24 changes: 0 additions & 24 deletions FuelMe/ApplePayHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

2 changes: 0 additions & 2 deletions Resources/Generated/Assets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down