Import the provided JAR to the folder libs on your Android project
Your application should rely on the server side to create the desired Checkout. Take note of the scheme used on url_confirm
and url_cancel
since you will need it later.
Register your scheme callback on the appropriate activity with an intent filter. Example:
intent-filter.xml
Add the following activity:
activity.xml
Create the suitable Checkout, specifying your app scheme, and take note the checkout id and url_redirect
returned by our servers when answering your checkout creation. Then, start the sdk:
skd-init.java
1
2
3
4
Intent intent = new Intent(getApplicationContext(), PTPayActivity.class);
intent.putExtra(PTPayActivity.PAY_INTENT_CHECKOUT_ID, id);
intent.putExtra(PTPayActivity.PAY_INTENT_BROWSER_CHECKOUT_URI, url_redirect);
startActivity(intent);
Finally, after the user pays, he will be redirected to your app using the url_confirm
or url_cancel
defined when the checkout was created.