question

Jeffrey Blattman avatar image
Jeffrey Blattman asked Jeffrey Blattman answered

How can I take a credit card payment on Clover Mini / Mobile?

How can I take a credit card payment on Clover Mini / Mobile?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered

Credit card payments are accepted using the Clover Secure Payments app. Your app starts an activity in this app for result and on success, is returned information about the completed payment.

First, start the Secure Payments activity for result,

Intent securePaymentsIntent = new Intent(Intents.ACTION_SECURE_PAY);

Add extras to describe the requested payment,

    intent.putExtra(Intents.EXTRA_AMOUNT, order.getTotal());
    intent.putExtra(Intents.EXTRA_ORDER_ID, order.getId());

Note that you must have created an order prior to making a payment. Payments are always associated with an order.

    intent.putExtra(Intents.EXTRA_CARD_ENTRY_METHODS, Intents.CARD_ENTRY_METHOD_MAG_STRIPE);

And start the Secure Payments app,

    startActivityForResult(intent, REQUEST_PAY);

Upon success, your onActivityResult() is called with RESULT_CANCEL if the payment failed, or RESULT_OK is successful. If successful, the result data will contain a Clover Payment at Intents.EXTRA_PAYMENT.

Your application must hold the permission clover.permission.ACTION_PAY.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community