Olo Pay SDK
Getting Started
Useful Links:
The Olo Pay SDK enables easy PCI-compliant payment integration with the Olo Ordering API. At a high level, usage follows this paradigm:
-
Add the SDK .aar as a dependency in your app's gradle file
-
implementation files('/path/to/aar)
-
Add SDK dependencies to your app's gradle file (temporary requirement until Olo Pay is on Maven)
-
implementation "com.stripe:stripe-android:17.2.0"
-
implementation "androidx.core:core-ktx:1.6.0"
-
implementation "com.google.android.material:material:1.4.0"
-
Initialize the SDK on application startup
-
See the
com.olo.olopay.bootstrap
package -
See the
com.olo.olopay.api.OloPayApiInitializer
class -
Add a payment control to your app
-
See the
com.olo.olopay.controls
package -
See the
com.olo.olopay.googlepay.GooglePayContext
class -
Using the
IPaymentMethodParams
instance from the payment control, create anIPaymentMethod
instance viaOloPayAPI.createPaymentMethod()
-
See the
com.olo.olopay.api
package -
Submit the
IPaymentMethod
data to the Basket Submit endpoint of Olo's Ordering API