Skip to content

Commit

Permalink
Fixed Apple Pay address validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostas Karayannis committed Nov 16, 2016
1 parent aee8394 commit b4f2c9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Kite-Print-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'Kite-Print-SDK'
spec.version = '6.1.1'
spec.version = '6.1.2'
spec.license = { :type => 'MIT', :file => 'Kite-SDK/LICENSE' }
spec.homepage = 'https://github.com/OceanLabs/iOS-Print-SDK'
spec.authors = {'Deon Botha' => 'deon@oceanlabs.co'}
Expand Down
2 changes: 1 addition & 1 deletion Kite-SDK/PSPrintSDK/OLConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#import "OLConstants.h"

NSString *const kOLKiteSDKVersion = @"6.1.1";
NSString *const kOLKiteSDKVersion = @"6.1.2";
NSString *const kOLKiteSDKErrorDomain = @"co.oceanlabs.kOLKiteSDKErrorDomain";
NSString *const kNotificationTemplateSyncComplete = @"co.oceanlabs.pssdk.notification.kNotificationSyncComplete";
NSString *const kNotificationKeyTemplateSyncError = @"co.oceanlabs.pssdk.notification.kNotificationKeyTemplateSyncError";
Expand Down
4 changes: 4 additions & 0 deletions Kite-SDK/PSPrintSDK/OLPaymentViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,10 @@ - (void)handlePaymentAuthorizationWithPayment:(PKPayment *)payment
self.printOrder.email = email;
self.printOrder.phone = phone;

if (![self.printOrder.shippingAddress isValidAddress]){
completion(PKPaymentAuthorizationStatusInvalidShippingPostalAddress);
return;
}
if (![OLCheckoutViewController validateEmail:email] && [OLKitePrintSDK environment] == OLKitePrintSDKEnvironmentLive){
completion(PKPaymentAuthorizationStatusInvalidShippingContact);
return;
Expand Down

0 comments on commit b4f2c9d

Please sign in to comment.