Commit 56016532 by Dima Bart

Remove BUYCheckout from `storeCreditCard:completion:` callback.

parent f633f053
......@@ -220,12 +220,10 @@
__block id<BUYPaymentToken> token = nil;
XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
[self.client storeCreditCard:creditCard checkout:_checkout completion:^(BUYCheckout *returnedCheckout, id<BUYPaymentToken> paymentToken, NSError *error) {
[self.client storeCreditCard:creditCard checkout:_checkout completion:^(id<BUYPaymentToken> paymentToken, NSError *error) {
XCTAssertNil(error);
XCTAssertNotNil(paymentToken);
XCTAssertNotNil(returnedCheckout);
_checkout = returnedCheckout;
token = paymentToken;
[expectation fulfill];
}];
......
......@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param paymentToken An opaque payment token type that wraps necessary credentials for payment
* @param error Optional NSError
*/
typedef void (^BUYDataCreditCardBlock)(BUYCheckout * _Nullable checkout, id<BUYPaymentToken> _Nullable paymentToken, NSError * _Nullable error);
typedef void (^BUYDataCreditCardBlock)(id<BUYPaymentToken> _Nullable paymentToken, NSError * _Nullable error);
/**
* Return block containing a BUYCheckout and/or an NSError
......
......@@ -264,7 +264,7 @@
if (!error) {
token = [[BUYCreditCardToken alloc] initWithPaymentSessionID:json[@"id"]];
}
completion(checkout, token, error);
completion(token, error);
}];
}
......
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