Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Shek863 authored May 22, 2024
1 parent e91aa4d commit 5d33b9e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,20 @@ dependencies:
kkiapay_flutter_sdk:
```
For web
```html
add to your index.html
<script src="https://cdn.kkiapay.me/k.js"></script>
```

## Usage

```dart
import 'package:kkiapay_flutter_sdk/kkiapay_flutter_sdk.dart';
```

##### Initialise the Kkiapay Instance
#### Initialise the Kkiapay Instance

```dart
final kkiapay = KKiaPay(
Expand All @@ -48,18 +55,20 @@ final kkiapay = KKiaPay(
partnerId: String, // Ex : 'AxXxXXxId'
paymentMethods: List<String> // Ex : ["momo","card"]
);
```

##### Create payment webview instance
#### Create payment webview instance

```dart
Mobile:

```dart
Navigator.push(context, MaterialPageRoute(builder: (context) => kkiapay),
```

Web:
kkiapayWeb.pay(kkiapay, (response){}),

```dart
kkiapayWeb.pay(kkiapay, (response){}),
```

## Example
Expand Down Expand Up @@ -236,18 +245,8 @@ the successCallback function takes two parameters in the following order
- the context of type BuildContext
```
### Web Integration

```html
add to your index.html
<script src="https://cdn.kkiapay.me/k.js"></script>

```

### Issues and feedback
Please file [issues](https://github.com/kkiapay/kkiapay-flutter-sdk/issues/new)
to send feedback or report a bug. Thank you!
gir
gir

0 comments on commit 5d33b9e

Please sign in to comment.