2.0.1 | 2022-06-20

2.0.0 | 2022-06-08

🚀 New Features and Improvements

The version 2 of the SDK is out! This includes a simplified way to integrate Primer

<aside> 📚 Take a look at the migration guide for updating your integration to version 2.

</aside>

✨ Payments created automatically

Universal Checkout | SDK

Creating payments with Universal Checkout is now seamless. There’s no more need for callbacks, API calls and headaches to create a payment. It’s all done under the hood 🧙

In the past, creating payments involved manual payment handling: On the client side, you would have had to implement the dreaded CheckoutEvent.TokenizationSuccess and CheckoutEvent.ResumeSuccess callbacks:

private val listener = object: CheckoutEventListener {
 
   override fun onCheckoutEvent(e: CheckoutEvent) {
      when(e) {
         is CheckoutEvent.TokenizationSuccess - > {
            // Create a payment
            // If payment fails: show error message
            // If payment succeeds: show a success message
            // If payment has a required action: return the new client token
         }
         is CheckoutEvent.ResumeSuccess - > {
            // Resume the payment
            // If payment fails: show error message
            // If payment succeeds: show a success message
            // If payment has a required action: return the new client token
         }
      }
   }
}

On the server side, you had to manually call our Payments API in order to create a payment 🤷

Rejoice! As from version 2.0.0 no manual payment handling is required! Payment creation is now, as mentioned above, :chef-kiss: - seamless.

Feel free to rip out the above mentioned callbacks when migrating to version 2.0.0 and enjoy the feeling of utter relaxation as all your payment handling is now done by Universal Checkout 💆

🔨 Deprecation