Post payment actions results

So, the sample code has some information on voiding a transaction:

// start Payment activity to display transaction details
try {
    Intent displayPaymentIntent = new Intent(Intents.ACTION_DISPLAY_PAYMENT);
    displayPaymentIntent.putExtra(Intents.INTENT_EXTRAS_TRANSACTION_ID, transactionId);
    startActivityForResult(displayPaymentIntent, DISPLAY_PAYMENT_REQUEST);
} catch (ActivityNotFoundException ex) {
    Log.e(TAG, "Poynt Payment Activity not found - did you install PoyntServices?", ex);
}

However, it doesn’t show us what we can do with the result. With a normal payment, you can get back the Payment object, convert it to a json string, and you’re good to go. How can I retrieve information returned from ACTION_DISPLAY_PAYMENT?

Thanks!
-Michael

Michael, as you pointed out ACTION_DISPLAY_PAYMENT does not return result. Can you tell me what action are you trying to perform?

Here’s my example scenario:

  1. Cashier rings up a sale for $10 and customer pays with card
  2. Customer comes right back and needs to do a return.
  3. Cashier pulls up transaction inside my POS and presses Void inside my POS
  4. My POS looks up the card transaction and runs ACTION_DISPLAY_PAYMENT with the ID from the transaction.
  5. Cashier chooses the option to void the transaction.
  6. Desired result: Poynt returns some information indicating that the transaction was voided.
  7. My POS would then add a -$10 payment to the transaction, and close out the transaction.

So, at the moment I can pull up the screen where the cashier can void, but I can’t tell if the cashier actually voided, or pressed “capture” or press cancel, etc.

Does that scenario make sense?

Hi @dennis,

I’m trying to handle the same scenario as @mnehring, and I’m stuck with the same problem.

I even tried to use the IPoyntTransactionService, but I guess this is not the feasible way to do it since we cannot access the EMV data anyway.

Do you have any idea about how to handle this scenario with Poynt API?

Thank you

Can you give me the serial number of your terminal? I can push the most recent build to it which returns the results of VOID action to the calling activity.

My serial number is P61SWD052GS000223

Thank you!

I have pushed an update to your terminal. Please use the following dependencies in build.gradle:

compile 'co.poynt.api:android-api-model:1.2.74-SNAPSHOT@jar'
compile 'co.poynt.android.sdk:poynt-sdk:1.2.18-SNAPSHOT@aar'

Thank you!

I tried to build my app using gradle, but those new dependencies could not be found.

Also, is there any way I can check the current version of the Poynt loaded into my terminal?

I found out that we can check the build/firmware at Help->Diagnostics.

Please let me know the version of the update so that I can confirm it.

Thank you.

Regarding the dependencies not being found problem, I guess the following code in the build.gradle should be changed to something else as well:

repositories {
maven {
url ‘https://nexus.poynt.com/content/repositories/releases
}
}

Could you let me know which repository I should use?

Add this please:

maven {
url ‘https://nexus.poynt.com/content/repositories/releases
}

Correction:

maven {
 url 'https://nexus.poynt.com/content/repositories/snapshots'
}

If you still are unable to access, please add these credentials:

  maven {
       url 'https://nexus.poynt.com/content/repositories/snapshots'
       credentials {
           username 'external'
           password 'poynt'
       }
   }

Hi dennis,

Thank you for the info.

I could build the project and confirmed that the response is being returned from the ACTION_DISPLAY_PAYMENT activity.