Skip to content

johnrevelator/paymentSDK

Repository files navigation

PaymentSDK

Usage

Init in application class

  override fun onCreate() {
        super.onCreate()
        PaymentService.initialize(applicationContext)
    }

Use payload from notification

  val payload = mutableMapOf<String, Any>()
  try {
      PaymentService.openPayment(payload)
  } catch (t: Throwable) {
      print(t.message)
  }

Use url from notification payload

  try {
      PaymentService.openPayment(url)
  } catch (t: Throwable) {
      print(t.message)
  }

Use default browser

  PaymentService.defaultBrowser = true

default value false

Error

class InvalidateURLError(override val message: String?): Throwable()

class InvalidateUserInfoError(override val message: String?): Throwable()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages