Skip to content

Commit

Permalink
chore(SUB-1686): update dependency to 1.0.12 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
asger-reepay authored Aug 6, 2024
1 parent 2a4327a commit 43a14ba
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ReepayCheckoutSheetDemo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ dependencies {
implementation("androidx.appcompat:appcompat:1.7.0")

// Option 1. implement external dependency
implementation("com.github.reepay:reepay-android-checkout-sheet:1.0.9")
implementation("com.github.reepay:reepay-android-checkout-sheet:1.0.12")


// Option 2. Implement local depenency
// Option 2. Implement local dependency
// implementation(project(":checkout"))

implementation("com.google.android.material:material:1.12.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class MainActivity : AppCompatActivity() {
// Example configuration
val config = CheckoutSheetConfig(
sessionId = "",
acceptURL = "", // Has to be identical to the one defined in the checkout session
cancelURL = "",
sheetStyle = SheetStyle.FULL_SCREEN,
dismissible = true,
hideHeader = true
hideHeader = true,
closeButtonIcon = R.drawable.button_close_icon,
closeButtonText = R.string.close_button_text
)

// Open checkout sheet
Expand Down Expand Up @@ -66,22 +66,25 @@ class MainActivity : AppCompatActivity() {
}
}

private fun handleEvents(message: SDKEventMessage){
private fun handleEvents(message: SDKEventMessage) {
val eventType: SDKEventType = message.event
Log.d("MyApp", "Collected event: $eventType")

when(eventType){
when (eventType) {
SDKEventType.Accept -> {
Log.d("MyApp", "Invoice handle: ${message.data?.invoice}")
Log.d("MyApp", "Customer handle: ${message.data?.customer}")
Log.d("MyApp", "Payment method id: ${message.data?.payment_method}")
}

SDKEventType.Error -> {
Log.d("MyApp", "Error type: ${message.data?.error}")
}

SDKEventType.Cancel -> {
checkoutSheet.dismiss()
}

SDKEventType.Close -> {}
SDKEventType.Open -> {}
SDKEventType.Init -> {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M17.1,292c-12.9,-22.3 -12.9,-49.7 0,-72L105.4,67.1c12.9,-22.3 36.6,-36 62.4,-36L344.3,31.1c25.7,0 49.5,13.7 62.4,36L494.9,220c12.9,22.3 12.9,49.7 0,72L406.6,444.9c-12.9,22.3 -36.6,36 -62.4,36L167.7,480.9c-25.7,0 -49.5,-13.7 -62.4,-36L17.1,292zM58.7,244c-4.3,7.4 -4.3,16.6 0,24l88.3,152.9c4.3,7.4 12.2,12 20.8,12L344.3,432.9c8.6,0 16.5,-4.6 20.8,-12L453.4,268c4.3,-7.4 4.3,-16.6 0,-24L365.1,91.1c-4.3,-7.4 -12.2,-12 -20.8,-12l-176.6,0c-8.6,0 -16.5,4.6 -20.8,12L58.6,244zM175,175c9.4,-9.4 24.6,-9.4 33.9,0l47,47 47,-47c9.4,-9.4 24.6,-9.4 33.9,0s9.4,24.6 0,33.9l-47,47 47,47c9.4,9.4 9.4,24.6 0,33.9s-24.6,9.4 -33.9,0l-47,-47 -47,47c-9.4,9.4 -24.6,9.4 -33.9,0s-9.4,-24.6 0,-33.9l47,-47 -47,-47c-9.4,-9.4 -9.4,-24.6 0,-33.9z"/>
</vector>
1 change: 1 addition & 0 deletions ReepayCheckoutSheetDemo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">Reepay Checkout SDK Demo App</string>
<string name="close_button_text">Close</string>
</resources>

0 comments on commit 43a14ba

Please sign in to comment.