I have to integrate Citrus Payment gateway into my android app, Any help will be appreciated. website here Thank you in advance.
Asked
Active
Viewed 5,744 times
5
-
Refer this link http://www.citruspay.com/DevelopersGuide/index.html#/androidsdk – Nagama Inamdar Mar 20 '15 at 06:41
1 Answers
10
Citrus has provided with some really simplified developer's guide for efficient technical integration. Lets walk through the sample Net banking integration.Remaining steps can be found over The Citrus Developer's Guide.
- Make sure that you have the following parameters from Citrus.(How to get following parameters)
- Secret Key
- Access Key
- SignIn Key
- SignIn Secret
- SignUp Key
- SignUp Secret
Download the kit from - Example and Citruslibrary. Add Citruslibrary as a dependency to Example. From Github.
Have a look at the init function. You can set the keys with citrus config.
private void init() { Config citrus = new Config(); citrus.setEnv("sandbox"); //replace it with production when you are ready citrus.setupSignupId("merchant-signup"); citrus.setupSignupSecret("3e2288d3a1a3f59ef6f93373884d2ca1"); citrus.setSigninId("merchant-wallet"); citrus.setSigninSecret("c40798d3c12114b5bb19f2051d9ed181"); }
Get the bill from your server.Collect user details.Call the charge API.
private void cardpay(String bill_string) { Bill bill = new Bill(bill_string); Card card = new Card("4111111111111111", "11", "21", "000", "Tony Stark", "debit"); UserDetails userDetails = new UserDetails(customer); PG paymentgateway = new PG(card, bill, userDetails); paymentgateway.charge(new Callback() { @Override public void onTaskexecuted(String success, String error) { processresponse(success, error); } } }); }
Calling charge with Netbanking
private void bankpay(String bill_string) { Bill bill = new Bill(bill_string); Bank netbank = new Bank("CID002"); UserDetails userDetails = new UserDetails(customer); PG paymentgateway = new PG(netbank, bill, userDetails); paymentgateway.charge(new Callback() { @Override public void onTaskexecuted(String success, String error) { processresponse(success, error); } }); }

Harshal Patil
- 6,659
- 8
- 41
- 57

Nagama Inamdar
- 2,851
- 22
- 39
- 48
-
1These keys are provided by Citrus. Found on Citrus merchant panel. :) http://www.citruspay.com/ – Nagama Inamdar Apr 01 '15 at 10:45
-
@Daenarys I can see very less options in net banking bank options. Is it because of sandbox environment? Also bill_string will be generated from our server? – Shubham Oct 26 '15 at 08:17
-
1) Sandbox test env has less options, all others will be covered up on production env. 2) Bill string will be generated at your server. – Nagama Inamdar Oct 26 '15 at 09:15
-
i am getting an exception, can anyone help me ? :FileNotFoundException: https://sandbox.citruspay.com/ – Parth Anjaria Aug 12 '16 at 11:59
-
You can ask a new question for your problem. So that experts can get more clarity on the problem you are facing. – Nagama Inamdar Aug 12 '16 at 12:03
-