Commit b690365a by David Muzi

Merge pull request #49 from Shopify/bugfix/apple-pay

Apple Pay bug fixes
parents bd8eb20d cdce7fc7
......@@ -47,7 +47,7 @@
if (hasDiscount || [self.lineItems count] > 1) {
NSDecimalNumber *lineItemSubtotal = [NSDecimalNumber zero];
for (BUYLineItem *lineItem in self.lineItems) {
lineItemSubtotal = [lineItemSubtotal decimalNumberByAdding:lineItem.price];
lineItemSubtotal = [lineItemSubtotal decimalNumberByAdding:lineItem.linePrice];
}
[summaryItems addObject:[PKPaymentSummaryItem summaryItemWithLabel:@"CART TOTAL" amount:lineItemSubtotal]];
}
......
......@@ -117,6 +117,8 @@ NSString * BUYURLKey = @"url";
- (void)startApplePayCheckout:(BUYCheckout *)checkout
{
// Default to the failure state, since cancelling a payment would not update the state and thus appear as a success
self.paymentAuthorizationStatus = PKPaymentAuthorizationStatusFailure;
if (self.shop == nil && self.isLoadingShop == NO) {
// since requests are sent serially, this will return before the checkout is created
......
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