Collecting Payments Using Terminal with Connect The BBPOS and Chipper name and logo are trademarks or registered trademarks of BBPOS Limited in the United States andor other countries.Connecting your app to an internet-enabled reader requires three steps: Registering a reader to your Stripe account Discovering readers via the SDK Connecting to a reader via the SDK Registering a reader Server-side Before you can connect your application to the Verifone P400, you must register the reader to your account.
Register in the Dashboard The simplest way is to add your reader in the Dashboard. Click on a location, and under the Readers section, click New. On your reader, enter the key sequence 0-7-1-3-9 to display a unique registration code. Register using the API For larger deployments, enable users in the field to receive and set up new readers on their own. In your app, build a flow to register a reader with the Stripe API. On the reader, the user enters the key sequence 0-7-1-3-9 to display a unique registration code. Your application sends the code to Stripe: curl Ruby Python PHP Java Node Go.NET Terminal curl. JavaScript iOS JavaScript JavaScript (ESNext) function discoverReaders ( ). When you call connectReader from your app in a different browser tab or device, the new instance breaks the existing reader-to-SDK connection and takes over the Verifone P400, even if the readers currently in use. To disable this behavior, pass the failifinuse parameter when calling connectReader. Regardless of the value of failifinuse, if your application connects to another applications reader while the other application is idle, that applications next attempt to collect payment will fail with an unexpected disconnect. When failifinuse is set to true, your application does not interrupt a reader thats currently collecting a payment. Instead, your applications call to connectReader fails with the connectFailedReaderIsInUse error. When failifinuse is set to false, your application connects to the other applications reader immediately. If the other application is currently collecting payment, that payment fails with an unexpected disconnect. Otherwise, that applications next attempt to collect a payment will fail with an unexpected disconnect. We recommend setting failifinuse: true for the initial connection attempt, and allowing your users to retry the connection with failifinuse: false if appropriate. In your implementation of this callback, display a UI to notify the user that the reader disconnected. You may also want to call discoverReaders to begin scanning for readers and reconnect. The Verifone P400 can disconnect from your app if it loses connection to the internet. Javascript iOS JavaScript JavaScript (ESNext) var terminal StripeTerminal.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |