OPPYooKassaPaymentParams
@interface OPPYooKassaPaymentParams : OPPPaymentParams
Class to encapsulate all necessary parameters for performing transaction with YooKassa.
-
Creates an object representing YooKassa transaction.
Declaration
Objective-C
+ (nullable instancetype) yooKassaPaymentParamsWithCheckoutID:(nonnull NSString *)checkoutID paymentToken:(nonnull NSString *)paymentToken error:(NSError *_Nullable *_Nullable)error;Parameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentTokenThe payment token received from YooKassa.
errorThe error that occurred while validating payment parameters. See code attribute (
OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Return Value
Returns an object representing YooKassa transaction, and nil if parameters are invalid.
-
Creates an object representing YooKassa transaction.
Declaration
Objective-C
- (nullable instancetype)initWithCheckoutID:(nonnull NSString *)checkoutID paymentToken:(nonnull NSString *)paymentToken error: (NSError *_Nullable *_Nullable)error;Swift
init(checkoutID: String, paymentToken: String) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentTokenThe payment token received from YooKassa.
errorThe error that occurred while validating payment parameters. See code attribute (
OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Return Value
Returns an object representing YooKassa transaction, and nil if parameters are invalid.
-
One-time token for payment.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull paymentToken;Swift
var paymentToken: String { get }
-
Checks if the payment token is valid to perform a transaction.
Declaration
Objective-C
+ (BOOL)isPaymentTokenValid:(nonnull NSString *)paymentToken;Swift
class func isPaymentTokenValid(_ paymentToken: String) -> BoolParameters
paymentTokenThe payment token received from YooKassa.
Return Value
YESif the payment token is not empty.
OPPYooKassaPaymentParams Class Reference