Updated 26 October 2021
Hi guys, today we will learn about how to implement SSLCOMMERZ payment gateway in an iOS application.
Before starting to code first we need to know what a payment gateway is
A payment gateway is a merchant service provided by an e-commerce application service provider that authorizes credit card or direct payments processing for e-businesses, online retailers, bricks, and clicks, or traditional brick and mortar.
Thus, its enough for us now. Let’s start by following the instructions below.
->Download & Unzip
Step 1: Go to this link https://developer.sslcommerz.com/registration/ and register.
Step 2: Login account with https://sandbox.sslcommerz.com/manage/
Step 3: Go to console and click the developer tab. you can now download iOS SDK file. Now follow the steps.
->Installation Procedure
Note:
1 |
ViewController: UIViewController , SSLCommerzDelegate { |
1 |
var SDKObject : SSLCommerz? |
1 2 |
SDKObject = SSLCommerz() SDKObject?.delegate = self |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
SDKObject?.startSSLCOMMERZinViewController(self, withStoreID: "testbox", storePassword: "qwerty", amountToPay: "10.00", amountCurrency: "BDT", applicationBundleID: "com.sslWireless.SSLCommerzSDKTest", appTransactionID: "TRANX ID", sourceDetail: "DETAIL", withCustomerEmail: "EMAIL", customerName: "NAME", customerContactNumber: "CONTACT", customerFax: "", customerAddress1: "ADDRESS", customerAddress2: "ADDRESS 2", customerCity: "CITY", customerState: "STATE", customerPostCode: "POSTCODE", customerCountry: "COUNTRY", withShipmentInfo: "INFO", shipmentAddress1: "ADDRESS", shipmentAddress2: "ADDRESS LINE 2", shipmentCity: "CITY", shipmentState: "STATE", sHipmentPostCode: "POSTCODE", shipmentCountry: "COUNTRY", withOptionalValueA: "Optional value", optionalValueB: " Optional value ", optionalValueC: " Optional value ", optionalValueD: " Optional value ", shouldRunInTestMode: true) |
1 2 3 4 5 |
func transactionSuccessful(withCompletionhandler transactionData: TransactionDetails!){ if(transactionData != nil){ print(transactionData.status, transactionData.sessionkey,transactionData.bank_tran_id, transactionData.amount, transactionData.card_type, transactionData.tran_date)} } |
Note:- Please follow the above step for integrating the SSLCOMMERZ payment gateway in your application if you fill any issue pls comment on the comment section.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
4 comments
Kindly contact us at [email protected]. So that we could assist you in a better way.
Thanks.
Kindly contact us at [email protected]. So that we could assist you in a better way.
Thanks.