razorpay

18
RAZORPAY PAYMENT GATEWAY BrainBox Network. Copyright@2015. All rights reserved

Upload: mobi-fly

Post on 08-Feb-2017

97 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Razorpay

  

      

RAZORPAY PAYMENT GATEWAY   

BrainBox Network. Copyright@2015. All rights reserved   

Page 2: Razorpay

  

      The document provides steps to integrate RazorPay Payment Gateway.  The integration process requires following steps ‐  

1. Create Account in RazorPay Step1 2. Create Account in RazorPay Step2 3. RazorPay Public Key Generation 4. Download RazorPay Jar file 5. Android Configuration 6. Android Manifest.xml Configuration 7. Android Activity class 8. Check Your Payment Details 9. For Making Payment Mode Live Step1 10. For Making Payment Mode Live Step2 11. For Making Payment Mode Live Step3 12. For Making Payment Mode Live Step4 13. For Making Payment Mode Live Step5 14. Now Change The Mode To Live

BrainBox Network. Copyright@2015. All rights reserved   

Page 3: Razorpay

  

Create Account in RazorPay 

  ❖ Open www.razorpay.com and go to sign up to ❖ Create your account

BrainBox Network. Copyright@2015. All rights reserved   

Page 4: Razorpay

  

Create Account in RazorPay Step 2  

 ❖ Fill all the following details to create your account. ❖ Business Name ❖ Individual Name ❖ Email ❖ Password

BrainBox Network. Copyright@2015. All rights reserved   

Page 5: Razorpay

  

RazorPay Public Key Generation  

  ❖ After successfully creation of account You will get a API Public key For your Test Mode of Payment. ❖ Copy this API Public key for further use while integration.

                    

BrainBox Network. Copyright@2015. All rights reserved   

Page 6: Razorpay

  

Download RazorPay Jar file  

  ❖ Click on the below link to download your RazorPay jar file. https://docs.razorpay.com/v1/page/android‐sdk‐v0110 ❖ Scroll down and click on this download link to download jar file. ❖ Or you can download from below link too https://github.com/razorpay/razorpay‐android‐sample‐app/releases  

              

BrainBox Network. Copyright@2015. All rights reserved   

Page 7: Razorpay

  

Android Configuration   

   ❖ Keep RazorPay jar file in your android lib folder. ❖ And Add the below mentioned jar file in your project by : FIle: razorpay.android.0.11.0.jar

Module Setting Or by writing this line in your Build.gradle file on dependencies dependencies{ compile files('libs/razorpay‐android‐0.11.0.jar') }

 

BrainBox Network. Copyright@2015. All rights reserved   

Page 8: Razorpay

  

Android Manifest.xml Configuration   

❖ Use internet permission. : <uses‐permission android:name="android.permission.INTERNET"/>

❖ For OTP reading functionality, you need to add the following permission to your SDK:

<uses‐permission android:name="android.permission.RECEIVE_SMS" />

❖ We have to create a Checkout Activity of Razor pay so write this in your manifest file: <activity android:name="com.razorpay.CheckoutActivity"

android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />     

BrainBox Network. Copyright@2015. All rights reserved   

Page 9: Razorpay

  

Android Activity Class  

❖ Class Code:

private void startpayment() { // this method integrate you to razor pay payment mode so call this method when you want to do payment.

final String public_key = "rzp_test_cUkg8CuKJQiXS3"; //use your own public key here final String img_url=“your image url here", ; final AppCompatActivity activity = this; // to create razor CheckoutActivity pass your

current Activity. final Checkout co = new Checkout(); co.setPublicKey(public_key);

try{ JSONObject options = new JSONObject("{" + "description: ‘your

description name '," + "image: '"+img_url+"'," + "currency: 'INR'}" ); options.put("amount", “500", ); //give your amount here

options.put("name", "Razorpay Testing"); //give name of product for which payment is doing.

options.put("prefill", new JSONObject("{email: '[email protected]', contact: ‘9807656776'}"));

co.open(activity, options); } catch(Exception e){ Toast.makeText(activity, e.getMessage(),

Toast.LENGTH_SHORT).show(); e.printStackTrace(); } }

public void onPaymentSuccess(String razorpayPaymentID){ // if payment is successful..

try { Toast.makeText(this, "Payment Successful: " + razorpayPaymentID,

Toast.LENGTH_SHORT).show(); } catch (Exception e){

Log.e("com.merchant", e.getMessage(), e); } }

public void onPaymentError(int code, String response){ // if payment is not successful…

try { Toast.makeText(this, "Payment failed: " + Integer.toString(code) + " " +

response, Toast.LENGTH_SHORT).show(); } catch (Exception e){

Log.e("com.merchant", e.getMessage(), e); } }

    

BrainBox Network. Copyright@2015. All rights reserved   

Page 10: Razorpay

  

Check Your Payment Details  

  ❖ After successfully done payment or failed payment you can check your payment history in Razor Pay                        

website. ❖ Log in with your account in Razorpay.com  and go to payment option to check. ❖ If Your payment in test mode work well And you want to make it live then click on test mode option and                                           

choose live mode on your top right side.                    

BrainBox Network. Copyright@2015. All rights reserved   

Page 11: Razorpay

  

For Making Payment Mode Live 

  ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ First fill the Contact Details form and click on next button.                         

BrainBox Network. Copyright@2015. All rights reserved   

Page 12: Razorpay

  

For Making Payment Mode Live  

  ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ Now fill the Business Details form and click on next button.                  

    

BrainBox Network. Copyright@2015. All rights reserved   

Page 13: Razorpay

  

For Making Payment Mode Live   

    ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ Now fill the Website Details form and click on next button.                      

BrainBox Network. Copyright@2015. All rights reserved   

Page 14: Razorpay

  

For Making Payment Mode Live 

  ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ Now fill the Bank Account Details form and click on next button. 

          

BrainBox Network. Copyright@2015. All rights reserved   

Page 15: Razorpay

  

 

For Making Payment Mode Live   

  ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ Now fill the Document Upload form and click on next button. 

                     

BrainBox Network. Copyright@2015. All rights reserved   

Page 16: Razorpay

  

 

 

For Making Payment Mode Live  

  ❖ For making payment mode live go to option Activation and fill the 5 form. ❖ Now Submit the form.

BrainBox Network. Copyright@2015. All rights reserved   

Page 17: Razorpay

  

Now Change The Mode To Live   ❖ After fill the activation form now your status will be active for changing the mode to live. ❖ Check your profile for status. ❖ Now change the mode to Live and get the API Public key for live payment. 

BrainBox Network. Copyright@2015. All rights reserved   

Page 18: Razorpay

  

Thank You So Very Much

For queries please write on [email protected] Developed By Danish Ali Android Developer ‐ Mobifly mobifly.in

 

BrainBox Network. Copyright@2015. All rights reserved