Skip to main content

CocoaPods Framework

Complete Fiuu iOS payment module distributed via CocoaPods for Xcode projects.

Repository: Mobile-XDK-Fiuu_Cocoapods_Framework

Pod: fiuu-mobile-xdk-cocoapods (3.34.10)

Wiki: Installation Guide

Requirements

RequirementVersion
Xcode13+
Minimum iOS16+

Installation

Follow the Installation Guide on GitHub.

General steps:

  1. Add the pod to your Podfile:
pod 'fiuu-mobile-xdk-cocoapods', '3.34.10'

If CocoaPods trunk lags the GitHub release, pin the git tag:

pod 'fiuu-mobile-xdk-cocoapods', :git => 'https://github.com/FiuuPayment/Mobile-XDK-Fiuu_Cocoapods_Framework.git', :tag => '3.34.10'
  1. Run pod install.
  2. Open the .xcworkspace file.
  3. Create a bridging header if using Swift.
  4. Import the framework in your bridging header:
#import <MOLPayXDK/MOLPayLib.h>

Info.plist Requirements

  • App Transport Security Settings → Allow Arbitrary Loads → YES
  • NSPhotoLibraryUsageDescriptionPayment images
  • NSPhotoLibraryAddUsageDescriptionPayment images

Basic Integration

NSDictionary *paymentDetails = @{
@"mp_username": @"username",
@"mp_password": @"password",
@"mp_merchant_ID": @"merchantid",
@"mp_app_name": @"appname",
@"mp_verification_key": @"vkey123",
@"mp_amount": @"1.10",
@"mp_order_ID": @"orderid123",
@"mp_currency": @"MYR",
@"mp_country": @"MY",
@"mp_channel": @"multi",
@"mp_bill_description": @"billdesc",
@"mp_bill_name": @"billname",
@"mp_bill_email": @"email@domain.com",
@"mp_bill_mobile": @"+1234567",
};

MOLPayLib *mp = [[MOLPayLib alloc] initWithDelegate:self andPaymentDetails:paymentDetails];

Delegate

Implement MOLPayLibDelegate:

- (void)transactionResult:(NSDictionary *)result {
NSLog(@"Payment result: %@", result);
[mp closemolpay];
}

Apple Pay

See Apple Pay Configuration for Merchant ID and certificate setup.

Payment Parameters

See Payment Parameters for the full list of mp_* parameters.