Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMET-2993 Payments Plugin - Fix dependencies and update code accordingly #31

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The changes documented here do not include those from the original repository.

## [Unreleased]

### 21-12-2023
- Fix: [Android] Updates dependency to OSCore and OSCordova (https://outsystemsrd.atlassian.net/browse/RMET-2993).

### 03-10-2023
- Fix: [iOS] Fixes path, removing duplicate string (https://outsystemsrd.atlassian.net/browse/RMET-2855).

Expand Down
18 changes: 10 additions & 8 deletions src/android/com/outsystems/payments/OSPayments.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,17 @@ class OSPayments : CordovaImplementation() {
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent) {
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
super.onActivityResult(requestCode, resultCode, intent)
paymentsController.handleActivityResult(requestCode, resultCode, intent,
{ paymentResponse ->
sendPluginResult(paymentResponse, null)
},
{ error ->
sendPluginResult(null, Pair(formatErrorCode(error.code), error.description))
})
if (intent != null) {
paymentsController.handleActivityResult(requestCode, resultCode, intent,
{ paymentResponse ->
sendPluginResult(paymentResponse, null)
},
{ error ->
sendPluginResult(null, Pair(formatErrorCode(error.code), error.description))
})
}
}

override fun onRequestPermissionResult(requestCode: Int,
Expand Down
4 changes: 2 additions & 2 deletions src/android/com/outsystems/payments/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ repositories{
apply plugin: 'kotlin-kapt'

dependencies {
implementation("com.github.outsystems:oscore-android:1.1.0@aar")
implementation("com.github.outsystems:oscordova-android:1.1.0@aar")
implementation("com.github.outsystems:oscore-android:1.2.0@aar")
implementation("com.github.outsystems:oscordova-android:2.0.0@aar")
implementation("com.github.outsystems:ospayments-android:1.1.0@aar")

implementation 'com.stripe:stripe-android:20.5.0'
Expand Down
Loading