chargebee / chargebee-ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure callback not being called in purchaseNonSubscriptionProduct

msschwartz opened this issue · comments

The completion callback is never called when in-app purchase fails when making non-subscription purchase.

In the CBPurchaseManager it looks like the payment queue observer is calling buyProductHandler rather than buyNonSubscriptionProductHandler in the transaction failure block.

CBPurchase.shared.purchaseNonSubscriptionProduct(product: product, customer: customer, productType: productType) { result in
  switch result {
  ...
  case .failure():
    // This is never called
  }
}

Thanks @msschwartz
This should be fixed with the release 1.0.22
Can you please check it and let us know?
cc: @cb-gadagoju