MiaSDK
Objective-C
@interface MiaSDK : NSObject
/// Returns a view controller that hosts checkout web view.
/// Pass a `redirectURL` iff Easy-hosted web view is presented.
///
/// Merchant-hosted payment does not require a `redirectURL`.
/// Pass `nil` `redirectURL` for merchant-hosted payment.
///
/// @param paymentID Payment ID
/// @param paymentURL Payment URL
/// @param redirectURL The URL used to redirect from Easy hosted web view
/// @param success Success
/// @param cancellation Cancellation
/// @param failure Failure
///
+ (MiaCheckoutController *)checkoutControllerForPaymentWithID:(NSString *)paymentID
paymentURL:(NSString *)paymentURL
isEasyHostedWithRedirectURL:(NSString * _Nullable)redirectURL
success:(void(^)(MiaCheckoutController *))success
cancellation:(void(^)(MiaCheckoutController *))cancellation
failure:(void(^)(MiaCheckoutController *, NSError *))failure
__deprecated_msg("Use checkoutControllerForPaymentWithID:paymentURL:isEasyHostedWithRedirectURL:cancelURL:success:cancellation:failure instead");
/// Returns a view controller that hosts checkout web view.
/// Pass a `redirectURL` iff Easy-hosted web view is presented.
///
/// Merchant-hosted payment does not require a `redirectURL`.
/// Pass `nil` `redirectURL` for merchant-hosted payment.
///
/// @param paymentID Payment ID
/// @param paymentURL Payment URL
/// @param redirectURL The URL used to redirect from Easy hosted web view
/// @param cancelURL The URL used to redirect when user cancels the transaction
/// @param success Success
/// @param cancellation Cancellation
/// @param failure Failure
///
+ (MiaCheckoutController *)checkoutControllerForPaymentWithID:(NSString *)paymentID
paymentURL:(NSString *)paymentURL
isEasyHostedWithRedirectURL:(NSString * _Nullable)redirectURL
cancelURL:(NSString * _Nullable)cancelURL
success:(void(^)(MiaCheckoutController *))success
cancellation:(void(^)(MiaCheckoutController *))cancellation
failure:(void(^)(MiaCheckoutController *, NSError *))failure;
@end
Swift
class MiaSDK : NSObject
Undocumented
-
+checkoutControllerForPaymentWithID:
paymentURL: isEasyHostedWithRedirectURL: success: cancellation: failure: Deprecated
Use checkoutControllerForPaymentWithID:paymentURL:isEasyHostedWithRedirectURL:cancelURL:success:cancellation:failure instead
Returns a view controller that hosts checkout web view. Pass a
redirectURL
iff Easy-hosted web view is presented.Merchant-hosted payment does not require a
redirectURL
. Passnil
redirectURL
for merchant-hosted payment.Declaration
Objective-C
+ (nonnull MiaCheckoutController *) checkoutControllerForPaymentWithID:(nonnull NSString *)paymentID paymentURL:(nonnull NSString *)paymentURL isEasyHostedWithRedirectURL:(NSString *_Nullable)redirectURL success: (nonnull void (^)( MiaCheckoutController *_Nonnull))success cancellation: (nonnull void (^)( MiaCheckoutController *_Nonnull))cancellation failure:(nonnull void (^)( MiaCheckoutController *_Nonnull, NSError *_Nonnull))failure;
Swift
class func checkoutControllerForPayment(withID paymentID: String, paymentURL: String, isEasyHostedWithRedirectURL redirectURL: String?, success: @escaping (MiaCheckoutController) -> Void, cancellation: @escaping (MiaCheckoutController) -> Void, failure: @escaping (MiaCheckoutController, Error) -> Void) -> MiaCheckoutController
Parameters
paymentID
Payment ID
paymentURL
Payment URL
redirectURL
The URL used to redirect from Easy hosted web view
success
Success
cancellation
Cancellation
failure
Failure
-
+checkoutControllerForPaymentWithID:
paymentURL: isEasyHostedWithRedirectURL: cancelURL: success: cancellation: failure: Returns a view controller that hosts checkout web view. Pass a
redirectURL
iff Easy-hosted web view is presented.Merchant-hosted payment does not require a
redirectURL
. Passnil
redirectURL
for merchant-hosted payment.Declaration
Objective-C
+ (nonnull MiaCheckoutController *) checkoutControllerForPaymentWithID:(nonnull NSString *)paymentID paymentURL:(nonnull NSString *)paymentURL isEasyHostedWithRedirectURL:(NSString *_Nullable)redirectURL cancelURL:(NSString *_Nullable)cancelURL success: (nonnull void (^)( MiaCheckoutController *_Nonnull))success cancellation: (nonnull void (^)( MiaCheckoutController *_Nonnull))cancellation failure:(nonnull void (^)( MiaCheckoutController *_Nonnull, NSError *_Nonnull))failure;
Swift
class func checkoutControllerForPayment(withID paymentID: String, paymentURL: String, isEasyHostedWithRedirectURL redirectURL: String?, cancelURL: String?, success: @escaping (MiaCheckoutController) -> Void, cancellation: @escaping (MiaCheckoutController) -> Void, failure: @escaping (MiaCheckoutController, Error) -> Void) -> MiaCheckoutController
Parameters
paymentID
Payment ID
paymentURL
Payment URL
redirectURL
The URL used to redirect from Easy hosted web view
cancelURL
The URL used to redirect when user cancels the transaction
success
Success
cancellation
Cancellation
failure
Failure