diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9fe40..6cb9d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 The changes documented here do not include those from the original repository. +## 1.2.2 + +### Fixes +- Fix: Update dependency to `OSPaymentsLib-Android` that adds `@SerializableName` annotation to avoid issues when using code obfuscation (https://outsystemsrd.atlassian.net/browse/RMET-3387). + ## 1.2.1 ### Fixes diff --git a/src/android/com/outsystems/payments/OSPayments.kt b/src/android/com/outsystems/payments/OSPayments.kt index 21f1cbd..1fbb11b 100644 --- a/src/android/com/outsystems/payments/OSPayments.kt +++ b/src/android/com/outsystems/payments/OSPayments.kt @@ -11,7 +11,6 @@ import com.outsystems.plugins.payments.model.OSPMTError import com.outsystems.plugins.payments.model.PaymentConfigurationInfo import com.outsystems.plugins.payments.model.PaymentDetails import com.outsystems.plugins.payments.model.Tokenization -import kotlinx.coroutines.runBlocking import org.apache.cordova.CallbackContext import org.apache.cordova.CordovaInterface import org.apache.cordova.CordovaWebView @@ -55,22 +54,19 @@ class OSPayments : CordovaImplementation() { override fun execute(action: String, args: JSONArray, callbackContext: CallbackContext): Boolean { this.callbackContext = callbackContext - val result = runBlocking { - when (action) { - "setupConfiguration" -> { - setupConfiguration(args) - } - "checkWalletSetup" -> { - checkWalletSetup() - } - "setDetails" -> { - setDetailsAndTriggerPayment(args) - } - else -> false + when (action) { + "setupConfiguration" -> { + setupConfiguration(args) } - true + "checkWalletSetup" -> { + checkWalletSetup() + } + "setDetails" -> { + setDetailsAndTriggerPayment(args) + } + else -> return false } - return result + return true } private fun setupConfiguration(args: JSONArray) { diff --git a/src/android/com/outsystems/payments/build.gradle b/src/android/com/outsystems/payments/build.gradle index b6dc8d7..f1c8d02 100644 --- a/src/android/com/outsystems/payments/build.gradle +++ b/src/android/com/outsystems/payments/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'kotlin-kapt' dependencies { implementation("com.github.outsystems:oscore-android:1.2.0@aar") implementation("com.github.outsystems:oscordova-android:2.0.1@aar") - implementation("com.github.outsystems:ospayments-android:1.1.0@aar") + implementation("com.github.outsystems:ospayments-android:1.1.1@aar") implementation 'com.stripe:stripe-android:20.5.0'