How can I take a credit card payment on Clover Mini / Mobile?
How can I take a credit card payment on Clover Mini / Mobile?
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
.
No one has followed this question yet.