Skip to content

Commit

Permalink
Update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharindu Kumarasiri committed Sep 10, 2024
1 parent c8ee545 commit d3ce8fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ react-i18next

## Usage example

For a complete example, [visit our docs](https://doc.komoju.com/docs/react-native).

```tsx
// App.ts
import { KomojuSDK } from "@komoju/komoju-react-native";

function App() {
return (
<KomojuSDK.KomojuProvider publishableKey={PUBLISHABLE_KEY}>
<KomojuSDK.KomojuProvider
publishableKey={PUBLISHABLE_KEY}
urlScheme="your-url-scheme"
>
<PaymentScreen />
</KomojuSDK.KomojuProvider>
);
Expand Down Expand Up @@ -101,6 +106,7 @@ function App() {
return (
<KomojuSDK.KomojuProvider
publishableKey={publishableKey}
urlScheme="your-url-scheme" // required for 3D Secure and bank redirects
paymentMethods={[PaymentTypes.KONBINI]} // explicitly set the payment method(s) for purchase
language={LanguageTypes.JAPANESE} // explicitly set the language, if not set language will be picked from your session Id
>
Expand All @@ -115,5 +121,6 @@ function App() {
| property | type | description |
| ------------------ | ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| **publishableKey** | `string` | Your publishable key from the KOMOJU [merchant settings page](https://komoju.com/sign_in/) (this is mandtory) |
| **urlScheme** | `string` | Your return url for customers to return to the app after completing browser authentications |
| **paymentMethods** | `Array <PaymentTypes>` | explicitly set the payment method(s) for purchase. (optional) |
| **language** | `string (LanguageTypes)` | explicitly set the language, if not set language will be picked from your session Id (optional) |

0 comments on commit d3ce8fb

Please sign in to comment.