OPPSTCPayPaymentParams
@interface OPPSTCPayPaymentParams : OPPPaymentParams
Class to encapsulate all necessary transaction parameters for performing an STC Pay transaction.
-
Creates an object representing an STC Pay transaction.
Declaration
Objective-C
+ (nullable instancetype) stcPayPaymentParamsWithCheckoutID:(nonnull NSString *)checkoutID verificationOption: (OPPSTCPayVerificationOption)verificationOption error:(NSError *_Nullable *_Nullable)error;
Swift
convenience init(checkoutID: String, verificationOption: OPPSTCPayVerificationOption) throws
Parameters
checkoutID
The checkout ID of the transaction. Must be not
nil
or empty.verificationOption
The verification option to proceed STC Pay transaction
error
The error that occurred while validating payment parameters. See code attribute (
OPPErrorCode
) andNSLocalizedDescription
to identify the reason of failure.Return Value
Returns an object representing an STC Pay transaction.
-
Checks if the mobile phone is filled with sufficient data to perform a transaction.
Declaration
Objective-C
+ (BOOL)isMobilePhoneValid:(nonnull NSString *)mobilePhone;
Swift
class func isMobilePhoneValid(_ mobilePhone: String) -> Bool
Parameters
mobilePhone
The mobile phone number.
Return Value
YES
if the mobile phone number contains digits only.
-
Shopper’s mobile phone number
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *phoneNumber;
Swift
var phoneNumber: String? { get set }