juspay / ec-react-native-library Goto Github PK
View Code? Open in Web Editor NEWReact Native wrapper for Juspay Express Checkout SDK
License: MIT License
React Native wrapper for Juspay Express Checkout SDK
License: MIT License
After follows, installation guidelines am not able to run the code in android. Am getting following error
FAILURE: Build failed with an exception.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find in.juspay:godel-ec:1.0.7.12.
Searched in the following locations:
- file:/home/tanmay/.m2/repository/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.pom
- file:/home/tanmay/.m2/repository/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.jar
- file:/home/tanmay/Documents/React Native app/AwesomeProject/node_modules/react-native/android/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.pom
- file:/home/tanmay/Documents/React Native app/AwesomeProject/node_modules/react-native/android/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.jar
- file:/home/tanmay/Documents/React Native app/AwesomeProject/node_modules/jsc-android/dist/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.pom
- file:/home/tanmay/Documents/React Native app/AwesomeProject/node_modules/jsc-android/dist/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.jar
- https://dl.google.com/dl/android/maven2/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.pom
- https://dl.google.com/dl/android/maven2/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.jar
- https://jcenter.bintray.com/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.pom
- https://jcenter.bintray.com/in/juspay/godel-ec/1.0.7.12/godel-ec-1.0.7.12.jar
Required by:
project :app > project :@juspay_ec-react-native-library
Please add the link for documentation. Also, update what functions are exposed by this SDK
Your framework PWAINSilentPayIOSSDK have 16 symbol name conflict with PayWithAmazon framework. Can you update those name:
duplicate symbol '_METRICS_COUNT_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol '_PUBLISH_IN_MS_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol '_LOGS_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol '_TIMES_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol '_TIME_METRICS_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol '_METRICS_OPERATION_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(RecordsPublisher.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINRecordsPublisher.o)
duplicate symbol 'OBJC_CLASS$_EnumUtils' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(EnumUtils.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(EnumUtils.o)
duplicate symbol 'OBJC_METACLASS$_EnumUtils' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(EnumUtils.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(EnumUtils.o)
duplicate symbol '_PWAIN_CONFIG_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol '_PWAIN_CONFIG_SHARED_PREF_KEY' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol '_PWAIN_CHARACTER_LIMIT' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol '_PWAIN_ERROR_DOMAIN' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol '_PWAIN_AMAZON_BACKEND_METRICS_ENDPOINT_METHOD' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol '_PWAIN_AMAZON_BACKEND_DYNAMIC_CONFIG_ENDPOINT_METHOD' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(SilentPayConstants.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(PWAINConstants.o)
duplicate symbol 'OBJC_CLASS$_AMZGzipUtility' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(AMZGzipUtility.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(AMZGzipUtility.o)
duplicate symbol 'OBJC_METACLASS$_AMZGzipUtility' in:
Pods/HyperSDK/PWAINSilentPayiOSSDK.framework/PWAINSilentPayiOSSDK(AMZGzipUtility.o)
Amazonpay/PayWithAmazon.framework/PayWithAmazon(AMZGzipUtility.o)
I am implementing a juspay payment gateway in react-native in this code. I am getting the following error:
attempt to invoke the virtual method 'java.lang.String org.json.JSONObject.toString()' on a null object reference in react native
Here is the code it should open the payment page, but it gives an error. Please help me.
import EcReactNativeLibrary from '@juspay/ec-react-native-library';
var nbPayload = {
opName: "nbTxn",
paymentMethodType: "NB",
paymentMethod: "enter bank code", //
redirectAfterPayment: "true",
format: "json"
}
//Here payload format is specified for netbanking transaction. For different types of payload types
//for other operations, refer https://developer.juspay.in/docs/expresscheckout-sdk
var requestPayload = {
baseParams: {
merchant_id: "my-merchant-id-test",
client_id: ""sgsjjvxbhwu15shq67161",
order_id: "272682162817218727",
amount: "1.00", //eg: "1.00"
customer_id : "pass customer id",
customer_email : "[email protected]",
customer_phone_number : "80xxxxxxxx",
environment: "sandbox"
},
serviceParams: {
service: "in.juspay.ec",
session_token: "pass client auth token",
endUrls: ['https://www.reload.in/recharge/'],
payload: nbPayload
},
}
EcReactNativeLibrary.startPayment(
JSON.stringify(requestPayload),
(successResponse) => {
console.log(successResponse);
},
(errorResponse) => {
console.log(errorResponse);
}
);
I've integrated everything according to the docs but I get a success response saying 'errorMessage":"[merchantAccount] cannot be null'.
let nbPayload = {
opName: 'nbTxn',
paymentMethodType:'NB',
paymentMethod:'NB_SBI',
redirectAfterPayment: 'true',
format: 'json',
};
//Here payload format is specified for netbanking transaction. For different types of payload types
//for other operations, refer https://developer.juspay.in/docs/expresscheckout-sdk
let requestPayload = {
baseParams: {
merchant_id: 'My merchant Id,
client_id: 'merchantId_android',
order_id:'12344',
amount: '10', //eg: "1.00"
customer_id: 'ABC_123',
customer_email: '[email protected]',
customer_phone_number: '78XXXXXXXX',
environment: 'sandbox',
},
serviceParams: {
service: 'in.juspay.ec',
session_token: 'pass client auth token',
endUrls: [], //eg: ["https://www.reload.in/recharge/", ".www.reload.in/payment/f."]
payload: nbPayload,
},
customParams: {}, //customParams are optional key value pairs.
};
EcReactNativeLibrary.startPayment(
JSON.stringify(requestPayload),
(successResponse) => {
console.log(successResponse, 'success');
},
(errorResponse) => {
console.log(errorResponse, 'error');
},
);
Can you change your android library name to something related to your organization name from com.reactlibrary, this is very common name you should not use this name. It will cause conflict in many projects.
Getting error as Can't find a suitable gateway to process the transaction","errorCode":"invalid_request_error"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.