Skip to content

Commit

Permalink
feat: adds api to configure chargebee android sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-haripriyan committed Jan 25, 2023
1 parent 3a70cb3 commit 8a6da62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ class ChargebeeReactNativeModule internal constructor(context: ReactApplicationC
return NAME
}

// Example method
// See https://reactnative.dev/docs/native-modules-android
@ReactMethod
override fun multiply(a: Double, b: Double, promise: Promise) {
promise.resolve(a * b)
override fun configure(site: String, publishableApiKey: String, sdkKey: String) {
Chargebee.configure(site, publishableApiKey, true, sdkKey)
}

companion object {
Expand Down
2 changes: 1 addition & 1 deletion android/src/oldarch/ChargebeeReactNativeSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import com.facebook.react.bridge.Promise

abstract class ChargebeeReactNativeSpec internal constructor(context: ReactApplicationContext) :
ReactContextBaseJavaModule(context) {
abstract fun configure(site: String, publishableApiKey: String, sdkKey: String = "")

abstract fun multiply(a: Double, b: Double, promise: Promise)
}

0 comments on commit 8a6da62

Please sign in to comment.