Giter VIP home page Giter VIP logo

ecomsdkios's Introduction

FlobillerSDKIos

IOS SDK and sample for Flocash Ecom API

How to get SDK lib

1.Open file Flobillersdk.xcworkspace

2.Select FlobillerFramework at scheme build , alse select generic device to build

3.On Menu bar Xcode: Select Product -> Archive

4.Go to root project folder -> _Archive -> Debug -> FlobillerFramework.framework here is the framework file

How to use SDK lib

  1. Add lib to your project application.

  2. Use FlocashService #import <FlobillerFramework/FlocashService.h>

There is two Environment setting on our sdk: SANDBOX and LIVE. You initial service as below for sandbox

[FlocashService sharedInstance].evironment = SANDBOX;

There are four methods in FBApiAccess

  • createOrder: Create ecommerce order

  • updatePaymentOpion: Select payment option for order to process payment

  • updateAdditionField: Some payment options need customer provide more info for process payment as mobile number wallet, otp etc... Call this to add more info for that kind order

  • getOrder: Use this method to query detail about order. Below is code scriptlet for how to use api

    Use FlocashSevice with UI flow by using FlocashService:

      Request *request = [[Request alloc] init];
			
    	CardInfo *card = [[CardInfo alloc] init];
    	card.cardHolder = @"1";
    	card.cardNumber = @"2";
    	card.expireMonth = @"12";
			
	    OrderInfo *order = [[OrderInfo alloc] init];    
			order.amount = 1.0;
	    order.currency = @"GHS";
	    order.item_name =  @"DSTV";
	    order.item_price = @"1";
	    order.orderId = @"645";
	    order.quantity = @"1";
			PayerInfo *payer = [[PayerInfo alloc] init];
	    payer.country = @"GH";
	    payer.firstName = @"pham";
	    payer.lastName = @"binh";
	    payer.email = @"[email protected]";
	    payer.phoneCode = @"+233";
	    payer.phoneNumber = @"87016637251";
	    payer.mobile = [NSString stringWithFormat:@"%@%@",payer.phoneCode,payer.phoneNumber];
    
    MerchantInfo *merchant = [[MerchantInfo alloc] init];
    
    request.order = order;
    request.payer = payer;
    request.merchant = merchant;
    merchant.merchantAccount = @"[email protected]";
    [FlocashService sharedInstance].evironment = SANDBOX;
		//Prensent a navigation controller with root view create order.
    [[FlocashService sharedInstance] createOrder:request1 presentCreateOrderViewFrom:self]; 
		

ecomsdkios's People

Contributors

binhpd avatar

Watchers

James Cloos avatar Thai Thinh avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.