Commit 4e176302 by Rune Madsen

Fix shipping rate issue for Apple Pay

parent d33f318e
......@@ -53,7 +53,7 @@
- (instancetype)initWithCart:(BUYCart *)cart
{
self = [super initWithDictionary:@{}];
self = [super init];
if (self) {
_lineItems = [cart.lineItems copy];
[self markPropertyAsDirty:@"lineItems"];
......
......@@ -57,5 +57,4 @@ NSString * const BUYPartialAddressPlaceholder = @"---";
return valid;
}
@end
......@@ -264,8 +264,7 @@ const NSTimeInterval PollDelay = 0.5;
self.shippingRates = shippingRates;
if ([self.shippingRates count] == 0) {
// Shipping address not supported
self.checkout.shippingRate = nil;
// Shipping address is not supported and no shipping rates were returned
if (completion) {
completion(PKPaymentAuthorizationStatusInvalidShippingPostalAddress, nil, [self.checkout buy_summaryItemsWithShopName:self.shop.name]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment