iOS SDK Installation:
-
Run 'pod init' command from the terminal in your project directory.
-
Open the Podfile file.
-
Add 'MeshulamSDK' dependency to your Podfile
-
Run 'pod install command from the terminal in your project directory.
Add MeshulamSDK Initialization code:
- Add import MeshulamSDK to your UIViewController.
Swift: import MeshulamSDK
Objective-C: #import <MeshulamSDK/MeshulamSDK-Swift.h>
-
Add Meshulam Delegate.
Swift , Objective-C: MeshulamDelegate
Swift: Protocol
Objective-C: Protocol
After setting up an account you will need to receive the followings from us:
userId, pageCode, and an apiKey in case required.
• UserId (required) refers to every business that is connected to Grow.
• ApiKey (required) refers to companies that are working with multiple businesses. In this case, you will need to send both the apiKey and the userId for every transaction that you would like to clear.
• PageCode (required) is for your API settings at Grow. There might be more than one pageCode, for instance, a pageCode for credit card template only and a pageCode for Bit.
• Sum (required) the amount you want to charge the client with.
• FullName (required) the full name of the user.
• Phone (required) the phone num of the user.
• Delegate (required) protocol.
• Email (optional) the email of the user.
• Description (optional) description of the user.
There are 4 functions that extroversion out for the developer.
• CreatePaymentProcess (required) A function to execute the transaction should pass the necessary parameters to finish the transaction.
• SettleSuspendedTransaction (optional) A transaction approval function should pass the necessary parameters to it.
• CancelBitTransaction (optional) A transaction cancellation function should pass the necessary parameters to it..
• getPaymentProcessInfoSuccess (optional) get information about specific transaction
Examples:
• CreatePaymentProcess:
Swift:
Objective - C:
• SettleSuspendedTransaction:
Swift:
Objective - C:
• CancelBitTransaction:
Swift:
Objective - C:
• GetPaymentProcessInfo:
Swift:
Objective C:
Add MeshulamSDK Deep Link:
- Open Info.plist file add URL types array with URL Identifier and URL Scheme. In the example below the URL Scheme is ‘imeshulamsdk’ and the URL Identifier is promotion.
-
In Xcode go to: Targets -> Info -> URL Types…
-
Add ‘imeshulamsdk’ in the URL Schemes.
-
In your AppDelegate file: import MeshulamSDK module.
Swift: import MeshulamSDK
-
In your AppDelegate file: import MeshulamSDK module.
Swift: import MeshulamSDK
Objective-C: #import <MeshulamSDK/MeshulamSDK-Swift.h>
Add Debug Mode:
- In your UIViewController file add debug Mode (debug mode is false by default).
Swift: Meshulam.shared().isDebugMode = true
Objective-C: [Meshulam shared].isDebugMode = YES;