Hello,
I am trying to do a refund.
my sdk version:
// Poynt Dependencies
compile ‘co.poynt.api:android-api-model:1.2.36@jar’
compile ‘co.poynt.android.sdk:poynt-sdk:1.2.10@aar’
and poynt version : 80
I do it like this:
final Payment payment = new Payment();
payment.setReferenceId(currentTransactionId);
try {
mTransactionService.getTransaction(currentTransactionId, currentTransactionId, new IPoyntTransactionServiceListener.Stub(){
@Override
public void onResponse(Transaction transaction, String requestId, PoyntError poyntError) throws RemoteException {
if(transaction!=null){
payment.setTransactions(Arrays.asList(transaction));
try {
Intent collectPaymentIntent = new Intent(Intents.ACTION_COLLECT_PAYMENT);
collectPaymentIntent.putExtra(Intents.INTENT_EXTRAS_PAYMENT, payment);
activity.startActivityForResult(collectPaymentIntent, COLLECT_PAYMENT_REQUEST);
} catch (ActivityNotFoundException ex) {
Log.e(TAG, "Poynt Payment Activity not found", ex);
}
}
}
@Override
public void onLoginRequired() throws RemoteException {}
@Override
public void onLaunchActivity(Intent intent, String s) throws RemoteException {}
});
} catch (RemoteException ex) {
ex.printStackTrace();
}
Yesterday, it seems worked normally, but today PaymentFragment shows zero amount like 0.00
By the way when using operation for managing transaction:
Intent displayPaymentIntent = new Intent(Intents.ACTION_DISPLAY_PAYMENT);
displayPaymentIntent.putExtra(Intents.INTENT_EXTRAS_TRANSACTION_ID, transactionId);
activity.startActivityForResult(displayPaymentIntent, DISPLAY_PAYMENT_REQUEST);
it does not return any data to the calling activity, and transactionService also returns old transaction data after it, so it become not usable in simple way.
is it possible to do a refund within transactionService SDK API?
LogCat:
04-07 03:25:07.943 1371-1371/? D/Printer: Printer battery Level changed: 100
04-07 03:25:17.962 1371-1371/? D/Printer: Printer battery Level changed: 100
04-07 03:25:18.441 901-905/? D/dalvikvm: GC_CONCURRENT freed 2259K, 33% free 12052K/17840K, paused 5ms+4ms, total 111ms
04-07 03:25:18.523 1550-1687/? I/POYNT-EVENT: {“time” : “2016-04-07T10:25:18Z”, “type” : “TOKEN”, “resource” : “”, “status” : “SUCCESS”, “businessId” : “6a9a297c-ec88-4313-b8f6-2fd8da88e57a”, “businessType” : “TEST_MERCHANT”, “processingTime” : 0.0, “method” : “”, “apiStatusCode” : 0, “apiEndpoint” : “”, “sdkErrorCode” : 0, “data” : “LOCAL CACHE”}
04-07 03:25:18.612 1550-5811/? D/CLOUD-API: —> HTTP GET https://services.poynt.net/businesses/6a9a297c-ec88-4313-b8f6-2fd8da88e57a/transactions/10f22593-9064-4e17-905f-ecd027cf63e7
04-07 03:25:18.612 1550-5811/? D/CLOUD-API: Authorization: BEARE
04-07 03:25:18.613 1550-5811/? D/CLOUD-API: POYNT-REQUEST-ID: 10f22593-9064-4e17-905f-ecd027cf63e7
04-07 03:25:18.613 1550-5811/? D/CLOUD-API: api-version: 1.2
04-07 03:25:18.613 1550-5811/? D/CLOUD-API: User-Agent: Poynt Services/1.0-R193 (Android 4.4.4; merchant-release-80; urn:tid:0e60e392-9c34-3d07-a475-7f226ca184e9; P61SWT362FS001045)
04-07 03:25:18.613 1550-5811/? D/CLOUD-API: —> END HTTP (no body)
04-07 03:25:18.674 212-238/? D/volt_cap: VC: Trip=70, Event=1
04-07 03:25:18.674 212-238/? D/volt_cap: VC: Thermal update change is -17148.386719
04-07 03:25:18.850 1550-5811/? I/POYNT-EVENT: {“time” : “2016-04-07T10:25:18Z”, “type” : “REST_API”, “resource” : “”, “status” : “SUCCESS”, “storeDeviceId” : “urn:tid:0e60e392-9c34-3d07-a475-7f226ca184e9”, “processingTime” : 220.69775, “method” : “GET”, “apiStatusCode” : 200, “apiRequestId” : “10f22593-9064-4e17-905f-ecd027cf63e7”, “apiEndpoint” : “https://services.poynt.net/businesses/6a9a297c-ec88-4313-b8f6-2fd8da88e57a/transactions/10f22593-9064-4e17-905f-ecd027cf63e7”, “apiServerDate” : “Thu, 07 Apr 2016 10:25:18 GMT”, “apiServerBuild” : “1.2.127-20160401-0228”, “apiServerInstanceId” : “i-0325afcb”, “sdkErrorCode” : 0}
04-07 03:25:18.852 1550-5811/? D/CLOUD-API: <— HTTP 200 https://services.poynt.net/businesses/6a9a297c-ec88-4313-b8f6-2fd8da88e57a/transactions/10f22593-9064-4e17-905f-ecd027cf63e7 (238ms)
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Server: nginx
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Date: Thu, 07 Apr 2016 10:25:18 GMT
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Content-Type: application/json;charset=UTF-8
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Transfer-Encoding: chunked
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Connection: keep-alive
04-07 03:25:18.853 1550-5811/? D/CLOUD-API: Vary: Accept-Encoding
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: Poynt-Request-Id: 10f22593-9064-4e17-905f-ecd027cf63e7
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: Poynt-Build-Info: 1.2.127-20160401-0228
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: Instance-Id: i-0325afcb
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: OkHttp-Selected-Protocol: http/1.1
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: OkHttp-Sent-Millis: 1460024718617
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: OkHttp-Received-Millis: 1460024718835
04-07 03:25:18.854 1550-5811/? D/CLOUD-API: <— END HTTP (-1-byte body)
04-07 03:25:19.000 212-238/? D/volt_cap: VC: Trip=60, Event=0
04-07 03:25:19.001 212-238/? D/volt_cap: VC: Thermal update change is -17148.498047
04-07 03:25:20.359 901-1328/? I/ActivityManager: START u0 {act=poynt.intent.action.COLLECT_PAYMENT cmp=co.poynt.services/.payments.PoyntPaymentActivity (has extras)} from pid 32756
04-07 03:25:20.390 32756-32756/com.ehopper.pos D/dalvikvm: GC_FOR_ALLOC freed 522K, 14% free 4431K/5124K, paused 27ms, total 28ms
04-07 03:25:20.404 32756-32756/com.ehopper.pos D/PoyntHelper: unbinding from services…
04-07 03:25:20.420 32756-32756/com.ehopper.pos W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
04-07 03:25:20.421 1371-1386/? D/SecondScreenAccess: onForegroundActivitiesChanged: pid:1550 uid:2500 forgroundAc:true
04-07 03:25:20.432 1371-1386/? D/SecondScreenAccess: setting sharedID displayID2 uid: 2500 result:true
04-07 03:25:20.462 1550-1650/? D/com.amplitude.api.AmplitudeClient: Logged event to Amplitude: payment_session_start
04-07 03:25:20.498 1550-1550/? D/PaymentSettings: Payment Settings: PaymentSettings{autoCapture=true, skipSignatureAmount=2500, gratuityEnabled=true, tipBeforeCardRead=false, offlineEnabled=false, maxOfflineTransactions=5, maxOfflineTotal=10000, maxOfflineTransactionValue=2500, autoForwardTipScreen=false, tipScreenTimeoutInMilliSecs=10000, autoForwardReceiptScreen=false, receiptScreenTimeoutInMilliSecs=10000, disableEMVCT=false, disableEMVCL=false, purchaseAction=AUTHORIZE, paymentProcessor=co.poynt.services, receiptService=co.poynt.services, supportContactPhone=null, supportContactEmail=null, stopAfterCardReadRecords=false}
04-07 03:25:20.498 1550-1550/? D/AccessoryService: getAccessoryProviders co.poynt.os.model.AccessoryProviderFilter@41b77140
04-07 03:25:20.498 1659-1681/? D/Capability:CapabilityService: getCapabilityProviders for Type:TRANSACTION
04-07 03:25:20.498 1550-1550/? D/AccessoryService: Get accerrory provider co.poynt.os.model.AccessoryProviderFilter@41b77140
04-07 03:25:20.499 1659-1681/? D/Capability:CapabilityService: getCapabilityProviders for Type:RECEIPT
04-07 03:25:20.502 1659-22882/? D/CapabilityHelper: logo size for provider co.poynt.services is : 7744
04-07 03:25:20.504 1659-22882/? D/CapabilityHelper: Capability found with matching entryMethod: id:1 type: TRANSACTION providerName: Poynt Cloud packageName : co.poynt.services className : co.poynt.services.PoyntTransactionService entryMethods[CARDREAD]
04-07 03:25:20.504 1659-22882/? D/CapabilityHelper: No Evals configured
04-07 03:25:20.504 1659-22882/? D/CapabilityHelper: getCapabilitysFromDB logo size for provider Poynt Cloud is : 7744
04-07 03:25:20.510 1659-22882/? I/POYNT-EVENT: {“time” : “2016-04-07T10:25:20Z”, “type” : “CAPABILITY”, “resource” : “”, “status” : “INFO”, “processingTime” : 0.0, “method” : “”, “apiStatusCode” : 0, “apiEndpoint” : “”, “sdkErrorCode” : 0, “data” : " CapabilityProvider provider Size"}
04-07 03:25:20.515 1659-22882/? D/CapabilityHelper: logo size for provider co.poynt.services is : 7744
04-07 03:25:20.518 1550-2049/? D/AccessoryHelper: Found Accessory in database:
04-07 03:25:20.525 1550-1650/? D/com.amplitude.api.AmplitudeClient: Logged event to Amplitude: payment_session_start
04-07 03:25:20.533 212-238/? D/volt_cap: VC: Trip=70, Event=1
04-07 03:25:20.533 212-238/? D/volt_cap: VC: Thermal update change is -17148.773438
04-07 03:25:20.534 1659-22882/? D/CapabilityHelper: getCapabilitysFromDB logo size for provider Poynt Receipt Printing service is : 7744
04-07 03:25:20.535 1659-22882/? I/POYNT-EVENT: {“time” : “2016-04-07T10:25:20Z”, “type” : “CAPABILITY”, “resource” : “”, “status” : “INFO”, “processingTime” : 0.0, “method” : “”, “apiStatusCode” : 0, “apiEndpoint” : “”, “sdkErrorCode” : 0, “data” : " CapabilityProvider provider Size"}
04-07 03:25:20.564 1550-1650/? D/com.amplitude.api.AmplitudeClient: Logged event to Amplitude: PaymentFragmentScreen
04-07 03:25:20.619 1550-1550/? D/dalvikvm: GC_FOR_ALLOC freed 2435K, 79% free 8109K/38060K, paused 26ms, total 26ms
04-07 03:25:20.633 1550-1650/? D/com.amplitude.api.AmplitudeClient: Logged event to Amplitude: Pmt_StateDetail
04-07 03:25:20.634 1550-1550/? I/CO.POYNT.SERVICES: No Tamper Detected
04-07 03:25:20.674 1550-1650/? D/com.amplitude.api.AmplitudeClient: Logged event to Amplitude: Pmt_MsgDetails
04-07 03:25:20.730 901-1004/? I/ActivityManager: Displayed co.poynt.services/.payments.PoyntPaymentActivity: +318ms
04-07 03:25:21.153 212-238/? D/volt_cap: VC: Trip=60, Event=0
04-07 03:25:21.153 212-238/? D/volt_cap: VC: Thermal update change is -17148.832031
04-07 03:25:26.226 205-1102/? I/NvAudioPolicyManager: startOutput: Start to adjust cpu max frequency
04-07 03:25:26.227 205-1102/? W/PowerServiceClient: Failed to bind to service
04-07 03:25:26.437 212-238/? D/volt_cap: VC: Trip=70, Event=1
04-07 03:25:26.437 212-238/? D/volt_cap: VC: Thermal update change is -17149.693359
04-07 03:25:26.931 205-6141/? I/NvAudioPolicyManager: resume_power_hint: Start to adjust cpu max frequency
04-07 03:25:27.545 9507-9507/? D/dalvikvm: GC_FOR_ALLOC freed 2567K, 34% free 5341K/7972K, paused 7ms, total 9ms
04-07 03:25:27.545 9507-9507/? I/dalvikvm-heap: Grow heap (frag case) to 7.717MB for 2560016-byte allocation
04-07 03:25:27.553 9507-9515/? D/dalvikvm: GC_FOR_ALLOC freed 6K, 2% free 7834K/7972K, paused 8ms, total 8ms
04-07 03:25:27.570 9507-9510/? D/dalvikvm: GC_CONCURRENT freed 1K, 2% free 7834K/7972K, paused 1ms+1ms, total 17ms
04-07 03:25:27.639 901-913/? D/dalvikvm: GC_FOR_ALLOC freed 550K, 33% free 12008K/17840K, paused 33ms, total 33ms
04-07 03:25:27.642 901-913/? I/dalvikvm-heap: Grow heap (frag case) to 14.235MB for 2560016-byte allocation
04-07 03:25:27.667 901-910/? D/dalvikvm: GC_FOR_ALLOC freed 7K, 19% free 14501K/17840K, paused 25ms, total 25ms
04-07 03:25:27.719 901-905/? D/dalvikvm: GC_CONCURRENT freed 21K, 19% free 14495K/17840K, paused 2ms+2ms, total 52ms
04-07 03:25:27.719 901-901/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 49ms
04-07 03:25:27.722 901-901/? I/dalvikvm-heap: Grow heap (frag case) to 16.664MB for 2560016-byte allocation
04-07 03:25:27.749 901-913/? D/dalvikvm: GC_FOR_ALLOC freed 1K, 17% free 16994K/20344K, paused 27ms, total 27ms
04-07 03:25:27.789 1180-1441/? D/dalvikvm: GC_FOR_ALLOC freed 6378K, 25% free 19599K/26040K, paused 24ms, total 24ms
04-07 03:25:27.813 901-901/? D/dalvikvm: GC_FOR_ALLOC freed 7K, 17% free 16995K/20344K, paused 35ms, total 35ms
04-07 03:25:27.819 901-901/? I/dalvikvm-heap: Grow heap (frag case) to 19.105MB for 2560016-byte allocation
04-07 03:25:27.850 901-1287/? D/dalvikvm: GC_FOR_ALLOC freed <1K, 15% free 19495K/22848K, paused 31ms, total 31ms
04-07 03:25:27.970 1371-1371/? D/Printer: Printer battery Level changed: 100
04-07 03:25:28.063 901-1287/? D/dalvikvm: GC_FOR_ALLOC freed 7617K, 42% free 11988K/20340K, paused 28ms, total 28ms
04-07 03:25:28.065 901-1287/? I/dalvikvm-heap: Grow heap (frag case) to 14.215MB for 2560016-byte allocation
04-07 03:25:28.112 901-910/? D/dalvikvm: GC_FOR_ALLOC freed <1K, 29% free 14487K/20340K, paused 47ms, total 47ms
04-07 03:25:28.166 901-905/? D/dalvikvm: GC_CONCURRENT freed 29K, 17% free 16992K/20340K, paused 2ms+3ms, total 54ms
04-07 03:25:28.192 1180-1441/? D/dalvikvm: GC_FOR_ALLOC freed 7743K, 43% free 15094K/26040K, paused 18ms, total 18ms
04-07 03:25:28.220 901-901/? D/dalvikvm: GC_FOR_ALLOC freed 26K, 17% free 17081K/20340K, paused 36ms, total 36ms
04-07 03:25:28.225 901-901/? I/dalvikvm-heap: Grow heap (frag case) to 19.189MB for 2560016-byte allocation
04-07 03:25:28.254 901-910/? D/dalvikvm: GC_FOR_ALLOC freed <1K, 15% free 19581K/22844K, paused 29ms, total 29ms