Socket
Socket
Sign inDemoInstall

rn-cf

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rn-cf

Cashfree PG Plugin for React Native


Version published
Weekly downloads
4
Maintainers
1
Install size
54.7 kB
Created
Weekly downloads
 

Readme

Source

react-native-cashfree-pg-sdk

The Cashfree React Native SDK allows you to integrate Cashfree Payment Gateway into your application and start collecting payments from your customers. The React Native SDK has been designed to minimise the complexity of handling and integrating payments in your React Native project.

Click here for more Documentation.

Installation

npm install react-native-cashfree-pg-sdk

iOS

Add the following code to application's info.plist file.

<key>LSApplicationCategoryType</key>
<string></string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>phonepe</string>
<string>tez</string>
<string>paytm</string>
<string>bhim</string>
</array>

Usage

import {
  CFCallback,
  CFErrorResponse,
  CFPaymentGatewayService,
} from 'react-native-cashfree-pg-sdk';
import {
  CFDropCheckoutPayment,
  CFEnvironment,
  CFSession,
  CFThemeBuilder,
} from 'cashfree-pg-api-contract';

// ...

try {
  const session = new CFSession(
    'order_token',
    'order_id',
    CFEnvironment.SANDBOX
  );
  const theme = new CFThemeBuilder()
    .setNavigationBarBackgroundColor('#E64A19')
    .setNavigationBarTextColor('#FFFFFF')
    .setButtonBackgroundColor('#FFC107')
    .setButtonTextColor('#FFFFFF')
    .setPrimaryTextColor('#212121')
    .setSecondaryTextColor('#757575')
    .build();
  const dropPayment = new CFDropCheckoutPayment(session, null, theme);
  CFPaymentGatewayService.doPayment(dropPayment);
} catch (e: any) {
  console.log(e.message);
}

License

MIT

Keywords

FAQs

Last updated on 28 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc