react-native-easebuzz-sdk
v0.7.0
Published
React Native Easebuzz SDK
Readme
react-native-easebuzz-sdk
React Native Easebuzz SDK
The Easebuzz React Native wrapper provides a seamless way to integrate the Easebuzz payment gateway into React Native applications. It acts as a bridge between the native Easebuzz SDKs for Android and iOS, enabling a smooth and secure payment experience. To understand the Easebuzz payment flow and its implementation, refer to the official documentation: https://docs.easebuzz.in/ Prerequisites Before integrating, ensure the following: • Merchant Onboarding: ◦ Create a merchant account and complete the onboarding process via the Easebuzz Signup Portal. • Test Integration Kit/Sandbox Credentials: ◦ Test credentials will be sent to your registered email ID. These credentials allow you to test payments in a sandbox environment without real financial transactions. ◦ After successful testing, replace test keys with live keys for real transactions.
Installation
To integrate the Easebuzz React Native SDK, install the package using npm or yarn:
npm install react-native-easebuzz-sdk --saveOR
yarn add react-native-easebuzz-sdkFor iOS, install the native dependencies:
cd ios
pod installUsage
To integrate the Easebuzz payment functionality, follow these steps:
1.Import the Package
import {initializeEasebuzzCheckout} from 'react-native-easebuzz-sdk';2.Implement Payment Functionality
Use the following method to initiate a payment:
const initiatePayment = async () => {
const accessKey = "Access key generated by the Initiate Payment API";
const payMode = "test"; // Use "production" for live transactions
try {
const response = await initializeEasebuzzCheckout(accessKey,payMode);
console.log("Ease Payment Response:", response);
} catch (error) {
console.error("Payment Failed:", error);
}
};
License
MIT
