question

rthor avatar image
rthor asked Greg commented

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.
Print
10 |2000

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

Sukhbir Singh avatar image
Sukhbir Singh answered Greg commented
@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
10 |2000

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

Greg avatar image Greg commented ·

@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 ·
Sukhbir Singh avatar image
Sukhbir Singh answered Greg commented
@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
10 |2000

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

Greg avatar image Greg commented ·

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 ·
Sukhbir Singh avatar image Sukhbir Singh Greg commented ·

@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 ·
Greg avatar image Greg Sukhbir Singh commented ·

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

Welcome to the
Clover Developer Community