Skip to content

Commit

Permalink
feat(teminal): guide disconnect reader
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlabo committed Mar 25, 2024
1 parent 2f0c33f commit a3e3431
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions demo/angular/src/app/terminal/terminal.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ export class TerminalPage {
);
}

await StripeTerminal.disconnectReader();
this.listenerHandlers.forEach((handler) => handler.remove());
}

Expand Down
4 changes: 4 additions & 0 deletions packages/terminal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ And update minSdkVersion to 26 And compileSdkVersion to 34 in your `android/app/
await StripeTerminal.collectPaymentMethod({ paymentIntent: "**************" });
// Process and confirm payment intent
await StripeTerminal.confirmPaymentIntent();
// disconnect reader
await StripeTerminal.disconnectReader();
});
```

Expand All @@ -102,6 +104,8 @@ And update minSdkVersion to 26 And compileSdkVersion to 34 in your `android/app/
await StripeTerminal.collectPaymentMethod({ paymentIntent: "**************" });
// Process and confirm payment intent
await StripeTerminal.confirmPaymentIntent();
// disconnect reader
await StripeTerminal.disconnectReader();
});
````

Expand Down

0 comments on commit a3e3431

Please sign in to comment.