Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to main
  • Loading branch information
shachem committed May 11, 2021
2 parents 3998712 + d5f969d commit 2e4312c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
This is a simple payment checkout library that allows your mobile app to tokenize payments by calling the Primer API's addPaymentInstrument call and passing the PaymentInstrument as a parameter. The payment instrument can be a card, or a paypal order.

`fun addPaymentInstrument(@Body paymentInstrument: PaymentInstrument): Call<TokenizedPaymentInstrumentInfo>`
For example:

the payment instrument should look like :

{"paymentInstrument" : {"cardholderName":"J Doe","cvv":"737","expirationMonth":"03","expirationYear":"2030","number":"4111111111111111"} }

But to make it simple for you, you just need to create a Card object

Card("J Doe","737","03","2030","4111111111111111") and set it in a PaymentInstrument() and send it to the API. et voilà.

We also want to help you create a UI with compose, the newest favorite for Android developers, and for that we added customisable components such as buttons, input fields, linear cells. etc. Every component class has its own preview to show you the outcome and give you an example. Please check it out in the compose package!

To publish a new version of the library, just commit the code, create a new release with a new tag on github, check if the new release if successful on
https://jitpack.io/#sarahachem/PrimerLibrary and update the tag number in the app using the libary !


The project contains a set of JUnit tests, that can be executed with the following command:

`./gradlew testDebugUnitTest`



0 comments on commit 2e4312c

Please sign in to comment.