question

rthor avatar image
rthor asked ·

Open specific transaction in Transactions app

Opening up the Transactions app is done by:
Intent intent = getPackageManager().getLaunchIntentForPackage("com.clover.transactions");
startActivity(intent);
Can this be modified to open up a specific transaction? We are using secure pay and, although there is no option to text/email a receipt via the SDK, figure this may be the only viable alternative to get this option to the customer.
PaymentsPrint
10 |2000 characters needed characters left characters exceeded

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

sanjay avatar image
sanjay answered ·
@Greg Thanks for your response.
Could you please provide some sample code for how to refund transaction using payment connector and without opening the default transaction app.
5 comments Share
10 |2000 characters needed characters left characters exceeded

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

Hi @sanjay,

Here is the payment connector class code from our public repo.

Here is a snippet of what a paymentconnector setup would look like inside an activity. Basically you would keep a paymentconnector object that has a paymentconnectorlistener object inside to respond to callbacks (like onRefundPayment), and invoke paymentconnector methods. We are working on getting full documentation out soon. Hope that helps.

Greg

0 Likes 0 · ·

@Greg Thanks

Currently I am using below dependency but unable to find paymentconnector, could you please suggest which dependency we use for the paymentconnector or we integrate the clover-connector-sdk for the same.

com.clover.sdk:clover-android-sdk:latest.release
0 Likes 0 · ·

Hi @sanjay,

Right, the payment connector uses another clover sdk, the clover-android-connector-sdk. For reference, The dependencies I had for this previous snippet was:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.clover.sdk:clover-android-sdk:191.4'
    implementation 'com.clover.sdk:clover-android-connector-sdk:191.4'
}

Greg

0 Likes 0 · ·
Show more comments
sanjay avatar image
sanjay answered ·
@Greg Thanks
I have implemented Action secure pay to make payment and after successfully we send the payment details to our local server and we fetch the records from local server and then after clicking any of them we are using intents for open Transactions details screen by passing payment object but that time Refund button is always in disable but in case if we manually open the default transaction app then we pass the payment data for the same that time refund button is enable and i am able to perform refund. Is it possible to handle this requirement with the help of payment connector.
1 comment Share
10 |2000 characters needed characters left characters exceeded

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

@sanjay, payment connector essentially provides endpoints for transaction actions (sale, auth, void, refund, etc.) It will be a wrapper around the manual intents. If you are opening up the transactions app just to process refunds, then payment connector will allow you to refund payments directly (invoke refund intent) without opening up the transactions app at all.

0 Likes 0 · ·
sam avatar image
sam answered ·
Please use our Transaction Intent to launch the Transaction App
You have the option of passing one of the three:
  • EXTRA_PAYMENT - the Payment object that will be shown
  • EXTRA_CREDIT - the Credit (manual refund) object that will be shown
  • EXTRA_REFUND - the Refund object that will be shown
Intent i = new Intent(Intents.ACTION_START_TRANSACTION_DETAIL);
i.putExtra(Intent.EXTRA_PAYMENT, paymentObject);
startActivity(i);
4 comments Share
10 |2000 characters needed characters left characters exceeded

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

But when we open Transaction details screen by passing payment object its disable refund button

0 Likes 0 · ·

Hi @sanjayprasad, can you elaborate?

0 Likes 0 · ·

Thanks for your response.

After making payment using ACTION_SECURE_PAY we got Payment object in response and when we pass that payment object to open Transaction details screen its open but refund button is always disable. But if we open default transaction app and then refresh the list and then we send the payment object to open Transactions details screen then refund button is enable, here my query is that, is there any way to refresh the transaction list programatically without open default transaction app. Please let me know.

0 Likes 0 · ·
Show more comments

Welcome to the
Clover Developer Community