react-native-cashfree-pg-sdk 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/{reactnativecashfreepgapi → reactnativecashfreepgsdk}/CashfreePgApiModule.java +0 -0
- package/android/src/main/java/com/{reactnativecashfreepgapi → reactnativecashfreepgsdk}/CashfreePgApiPackage.java +0 -0
- package/android/src/main/java/com/{reactnativecashfreepgapi → reactnativecashfreepgsdk}/DropPaymentParser.java +0 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/package.json +2 -2
- package/{react-native-cashfree-pg-api.podspec → react-native-cashfree-pg-sdk.podspec} +0 -0
- package/src/index.js +0 -1
|
File without changes
|
|
File without changes
|
|
@@ -38,7 +38,6 @@ public class DropPaymentParser {
|
|
|
38
38
|
.setNavigationBarTextColor(theme.getString("navigationBarTextColor"))
|
|
39
39
|
.setButtonBackgroundColor(theme.getString("buttonBackgroundColor"))
|
|
40
40
|
.setButtonTextColor(theme.getString("buttonTextColor"))
|
|
41
|
-
.setBackgroundColor(theme.getString("backgroundColor"))
|
|
42
41
|
.setPrimaryTextColor(theme.getString("primaryTextColor"))
|
|
43
42
|
.setSecondaryTextColor(theme.getString("secondaryTextColor"))
|
|
44
43
|
.build();
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","CashfreePgApi","NativeModules","Proxy","get","Error","CFPaymentGateway","constructor","emitter","OS","NativeEventEmitter","CashfreeEventEmitter","NativeAppEventEmitter","doPayment","checkoutPayment","JSON","stringify","setCallback","cfCallback","successFunction","orderID","console","log","onVerify","failureFunction","error","response","CFErrorResponse","message","parse","fromJSON","onError","successSubscription","addListener","failureSubscription","removeCallback","undefined","removeSubscription","errorString","object","status","code","type","getStatus","getMessage","getCode","getType","CFPaymentGatewayService"],"sources":["index.js"],"sourcesContent":["import { NativeAppEventEmitter, NativeEventEmitter, NativeModules, Platform, } from 'react-native';\nconst LINKING_ERROR = `The package 'react-native-cashfree-pg-api' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\nconst CashfreePgApi = NativeModules.CashfreePgApi\n ? NativeModules.CashfreePgApi\n : new Proxy({}, {\n get() {\n throw new Error(LINKING_ERROR);\n },\n });\
|
|
1
|
+
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","CashfreePgApi","NativeModules","Proxy","get","Error","CFPaymentGateway","constructor","emitter","OS","NativeEventEmitter","CashfreeEventEmitter","NativeAppEventEmitter","doPayment","checkoutPayment","JSON","stringify","setCallback","cfCallback","successFunction","orderID","console","log","onVerify","failureFunction","error","response","CFErrorResponse","message","parse","fromJSON","onError","successSubscription","addListener","failureSubscription","removeCallback","undefined","removeSubscription","errorString","object","status","code","type","getStatus","getMessage","getCode","getType","CFPaymentGatewayService"],"sources":["index.js"],"sourcesContent":["import { NativeAppEventEmitter, NativeEventEmitter, NativeModules, Platform, } from 'react-native';\nconst LINKING_ERROR = `The package 'react-native-cashfree-pg-api' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\nconst CashfreePgApi = NativeModules.CashfreePgApi\n ? NativeModules.CashfreePgApi\n : new Proxy({}, {\n get() {\n throw new Error(LINKING_ERROR);\n },\n });\nclass CFPaymentGateway {\n emitter;\n successSubscription = null;\n failureSubscription = null;\n constructor() {\n this.emitter =\n Platform.OS === 'ios'\n ? new NativeEventEmitter(NativeModules.CashfreeEventEmitter)\n : NativeAppEventEmitter;\n }\n doPayment(checkoutPayment) {\n return CashfreePgApi.doPayment(JSON.stringify(checkoutPayment));\n }\n setCallback(cfCallback) {\n // this.cfCallback = cfCallback;\n let successFunction = (orderID) => {\n console.log('response is : ' + JSON.stringify(orderID));\n cfCallback.onVerify(orderID);\n };\n let failureFunction = (error) => {\n console.log('reason: ' + JSON.stringify(error));\n const response = new CFErrorResponse();\n // @ts-ignore\n const message = JSON.parse(error);\n response.fromJSON(message.error);\n // @ts-ignore\n cfCallback.onError(response, message.orderID);\n };\n this.successSubscription = this.emitter.addListener('cfSuccess', successFunction);\n this.failureSubscription = this.emitter.addListener('cfFailure', failureFunction);\n CashfreePgApi.setCallback();\n }\n removeCallback() {\n if (this.successSubscription !== undefined &&\n this.successSubscription !== null) {\n this.emitter.removeSubscription(this.successSubscription);\n this.successSubscription = null;\n }\n if (this.failureSubscription !== undefined &&\n this.failureSubscription !== null) {\n this.emitter.removeSubscription(this.failureSubscription);\n this.failureSubscription = null;\n }\n }\n}\nexport class CFErrorResponse {\n status = 'FAILED';\n message = 'payment has failed';\n code = 'payment_failed';\n type = 'request_failed';\n fromJSON(errorString) {\n console.log('errorString :' + errorString);\n const object = JSON.parse(errorString);\n console.log('errorStringObject :' + object);\n this.status = object.status;\n this.message = object.message;\n this.code = object.code;\n this.type = object.type;\n }\n getStatus() {\n return this.status;\n }\n getMessage() {\n return this.message;\n }\n getCode() {\n return this.code;\n }\n getType() {\n return this.type;\n }\n}\nexport var CFPaymentGatewayService = new CFPaymentGateway();\n"],"mappings":";;;;;;;AAAA;;;;AACA,MAAMA,aAAa,GAAI,uFAAD,GAClBC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADkB,GAElB,sDAFkB,GAGlB,6CAHJ;AAIA,MAAMC,aAAa,GAAGC,0BAAA,CAAcD,aAAd,GAChBC,0BAAA,CAAcD,aADE,GAEhB,IAAIE,KAAJ,CAAU,EAAV,EAAc;EACZC,GAAG,GAAG;IACF,MAAM,IAAIC,KAAJ,CAAUT,aAAV,CAAN;EACH;;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|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "..",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"android",
|
|
14
14
|
"ios",
|
|
15
15
|
"cpp",
|
|
16
|
-
"react-native-cashfree-pg-
|
|
16
|
+
"react-native-cashfree-pg-sdk.podspec",
|
|
17
17
|
"!lib/typescript/example",
|
|
18
18
|
"!android/build",
|
|
19
19
|
"!ios/build",
|
|
File without changes
|
package/src/index.js
CHANGED