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

    checkoutID

    The checkout ID of the transaction. Must be not nil or empty.

    paymentToken

    The payment token received from YooKassa.

    error

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to 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) throws

    Parameters

    checkoutID

    The checkout ID of the transaction. Must be not nil or empty.

    paymentToken

    The payment token received from YooKassa.

    error

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to 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) -> Bool

    Parameters

    paymentToken

    The payment token received from YooKassa.

    Return Value

    YES if the payment token is not empty.