Skip to content

Commit

Permalink
Alza feedback to Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvavra committed Dec 28, 2024
1 parent 4f46db0 commit 4f53f55
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TODO @c4t-dr34m

## Bank support

Currently, we support only banks that accept the [SPAYD format](https://en.wikipedia.org/wiki/Short_Payment_Descriptor), known as "QR payment" in the Czech Republic. The list of tested bank apps can be found [here](shared/src/androidMain/kotlin/io/stepuplabs/pvba/SpaydBankAppPaymentResolver.android.kt#L191).
Currently, we support only banks that accept the [SPAYD format](https://en.wikipedia.org/wiki/Short_Payment_Descriptor), known as "QR payment" in the Czech Republic. The list of tested bank apps can be found [here](shared/src/androidMain/kotlin/io/stepuplabs/pvba/SpaydBankAppPaymentResolver.android.kt#L191). We welcome pull requests about new bank support. Or open an issue if you found something about supported bank.

## Integration

Expand All @@ -38,7 +38,7 @@ where:
payViaBankAppResolver.isPayViaBankAppSupported()
```

It's recommended to hide the feature if it's not supported.
This is `false` if the user doesn't have any supported bank app installed. It's recommended to hide the feature.

#### Showing supported bank app icon

Expand Down Expand Up @@ -80,23 +80,23 @@ Add a new entry into `dependencies`: `.package(url: "https://github.com/stepupla
Where appropriate, create an instance of `SpaydPayViaBankAppResolver` and call `.payViaBankApp()` on it.

```swift
SpaydPayViaBankAppResolver().payViaBankApp(spayd: spayd)
SpaydPayViaBankAppResolver().payViaBankApp(spayd: spayd, navParams: NavigationParameters)
```

where:
- `spayd` is a string containing the payment information in the [SPAYD format](https://en.wikipedia.org/wiki/Short_Payment_Descriptor). We recommend [our library](https://github.com/step-up-labs/spayd-kmp) for generating SPAYD on iOS.
- `navigationParams` is a new instance of `NavigationParameters()`.
- `navParams` is a new instance of `NavigationParameters()`. iOS doesn't need it, it's there just for compatibility with Android.

## How does it work?

### Android
On Android, the library uses intent APIs. Some bank apps can be opened directly with an intent containing the SPAYD string. Other bank apps accept images with a QR code containing SPAYD. If there is just one supported app, the QR code is not visible to the user and the bank app is opened directly. If the user has multiple supported bank apps, the system dialog is shown. The QR code is visible there and the user has to select their preferred bank app.

### iOS
On iOS, the library generates the QR code and opens a sheet to share the QR code to another app. The user can then pick the bank app that can decode the QR code and pre-fill a payment order. If the bank app does not support sharing images, the user can save the generated QR code in their photo library and open it within the bank app for the same purpose.
On iOS, the library generates the QR code and opens a sheet to share the QR code to another app. The user can then pick the bank app that can decode the QR code and pre-fill a payment order. If the bank app does not support sharing images, the user can save the generated QR code in their photo library and open it within the bank app for the same purpose. Bank app icons is not supported on iOS due to system limitation.


## For bank apps: How to support this library?
## For bank apps: how to support this library?

### Android
It's preferred to accept Intent with SPAYD payload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,16 @@ actual class SpaydPayViaBankAppResolver(

companion object {
val DEFAULT_BANK_APP_PACKAGES = listOf(
"cz.rb.app.smartphonebanking",
"eu.inmite.prj.kb.mobilbank",
"cz.kb.ndb",
"cz.csas.georgego",
"cz.csob.smart",
"cz.moneta.smartbanka",
"cz.fio.sb2",
"cz.airbank.android",
"cz.creditas.richee",
"cz.pbktechnology.partners.client"
"cz.rb.app.smartphonebanking", // Raiffeisenbank
"eu.inmite.prj.kb.mobilbank", // Komerční banka (old app)
"cz.kb.ndb", // Komerční banka (new app)
"cz.csas.georgego", // Česká spořitelna (George)
"cz.csob.smart", // ČSOB
"cz.moneta.smartbanka", // Moneta
"cz.fio.sb2", // Fio banka
"cz.airbank.android", // Air Bank
"cz.creditas.richee", // Banka CREDITAS
"cz.pbktechnology.partners.client" // Partners Banka
)
private const val DIR = "qr"
private const val FILE = "transfer-payment-qr.png"
Expand Down

0 comments on commit 4f53f55

Please sign in to comment.