BTPaymentFlowDriver_Internal.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #import "BTPaymentFlowDriver.h"
  2. @interface BTPaymentFlowDriver ()
  3. /**
  4. Defaults to [UIApplication sharedApplication], but exposed for unit tests to inject test doubles
  5. to prevent calls to openURL. Its type is `id` and not `UIApplication` because trying to subclass
  6. UIApplication is not possible, since it enforces that only one instance can ever exist
  7. */
  8. @property (nonatomic, strong) id _Nonnull application;
  9. /**
  10. Defaults to [NSBundle mainBundle], but exposed for unit tests to inject test doubles to stub values in infoDictionary
  11. */
  12. @property (nonatomic, strong) NSBundle * _Nonnull bundle;
  13. /**
  14. Defaults to use [BTAppSwitchHandler sharedInstance].returnURLScheme, but exposed for unit tests to stub returnURLScheme.
  15. */
  16. @property (nonatomic, copy) NSString * _Nonnull returnURLScheme;
  17. /**
  18. Exposed for testing to get the instance of BTAPIClient after it has been copied by `copyWithSource:integration:`
  19. */
  20. @property (nonatomic, strong) BTAPIClient * _Nonnull apiClient;
  21. /**
  22. Set up the BTPaymentFlowDriver with a request object and a completion block without starting the flow.
  23. @param request A BTPaymentFlowRequest to set on the BTPaymentFlow
  24. @param completionBlock This completion will be invoked exactly once when the payment flow is complete or an error occurs.
  25. */
  26. - (void)setupPaymentFlow:(BTPaymentFlowRequest<BTPaymentFlowRequestDelegate> *_Nonnull)request completion:(void (^_Nullable)(BTPaymentFlowResult * _Nullable, NSError * _Nullable))completionBlock;
  27. @end