iOS
1.Create a Customer
// Use your customerId
var customerId = "cus_1452880617225281538"2.Construct data, and pay in PaymentSheet model
/** Merchant ID */
@property (nonatomic,copy) NSString *customerID;
/** Billing details */
@property (nonatomic,strong) MCBillingDetails *billingDetails;
/** Create payment parameter object */
@property (nonatomic,strong) MCCreatePaymentParams *createPaymentParams;
// Initiate controller
MCSelectPaymentCardVC *selectPaymentCardVC = [[MCSelectPaymentCardVC alloc] init];
selectPaymentCardVC.delegate = self;
// Build request parameters
selectPaymentCardVC.customerID = [MCConfigurationFile getCustomerID];
selectPaymentCardVC.billingDetails = [MCConfigurationFile getBillingDetailsModel];
selectPaymentCardVC.createPaymentParams = [self constructMCCreatePaymentParams];
// Display view
[selectPaymentCardVC present:self];3.Start Hosted Payment Page mode
4.Customer selects "save this card" during payment
5.Return the payment result
Last updated

