Hi:
I have always got an error response when start payment in test device? please help me.
Thanks.
The logs as follow:
06-26 16:16:57.006 V/AddTipActivity(24519): Sending PaymentRequest: Bundle[{TIP_AMOUNT=23.00, CURRENCY=USD, AMOUNT=1162.58}]
06-26 16:16:57.008 W/AudioTrack( 294): AUDIO_OUTPUT_FLAG_FAST denied by client
06-26 16:16:57.008 I/ActivityManager( 294): START u0 {act=com.aevi.payment.REQUEST cmp=com.aevi.paymentapplication.simulator/.ui.SimulatorPaymentRequestActivity (has extras)} from uid 10025 on display 0
06-26 16:16:57.010 V/WindowManager( 294): addAppToken: AppWindowToken{34dc1dfb token=Token{2b37e38a ActivityRecord{121e19f5 u0 com.aevi.paymentapplication.simulator/.ui.SimulatorPaymentRequestActivity t703}}} to stack=1 task=703 at 4
06-26 16:16:57.027 D/PaymentAppConfigurationProvider( 1482): Loading the supported currencies
06-26 16:16:57.027 D/PaymentAppConfigurationProvider( 1482): Loading the default currency
06-26 16:16:57.027 D/PaymentAppConfigurationProvider( 1482): default currency :USD
06-26 16:16:57.027 D/PaymentAppConfigurationProvider( 1482): Loading the Terminal ID
06-26 16:16:57.027 D/PaymentAppConfigurationProvider( 1482): Loading the supported merchants
06-26 16:16:57.028 D/PaymentAppConfigurationProvider( 1482): Loading the supported transaction types
06-26 16:16:57.031 D/PaymentAppConfigurationProvider( 1482): configuration loaded
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): Loading the supported currencies
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): Loading the default currency
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): default currency :USD
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): Loading the Terminal ID
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): Loading the supported merchants
06-26 16:16:57.053 D/PaymentAppConfigurationProvider( 1482): Loading the supported transaction types
06-26 16:16:57.055 D/PaymentAppConfigurationProvider( 1482): configuration loaded
06-26 16:16:57.055 I/SimulatorTransactionValidator( 1482): Parsing request
06-26 16:16:57.056 I/SimulatorTransactionValidator( 1482): Checking integration mode
06-26 16:16:57.056 I/SimulatorTransactionValidator( 1482): Check if the requested transaction type is supported by the Simulator
06-26 16:16:57.056 I/SimulatorTransactionValidator( 1482): Check if the requested merchant is supported by the Simulator
06-26 16:16:57.056 I/SimulatorTransactionValidator( 1482): Check if the requested currency is supported by the Simulator
06-26 16:16:57.056 D/PaymentRequestActivity( 1482): Finished returning result
06-26 16:16:57.061 D/PaymentAppConfigurationProvider( 1482): Loading the supported currencies
06-26 16:16:57.061 D/PaymentAppConfigurationProvider( 1482): Loading the default currency
06-26 16:16:57.062 D/PaymentAppConfigurationProvider( 1482): default currency :USD
06-26 16:16:57.062 D/PaymentAppConfigurationProvider( 1482): Loading the Terminal ID
06-26 16:16:57.062 D/PaymentAppConfigurationProvider( 1482): Loading the supported merchants
06-26 16:16:57.062 D/PaymentAppConfigurationProvider( 1482): Loading the supported transaction types
06-26 16:16:57.064 D/PaymentAppConfigurationProvider( 1482): configuration loaded
06-26 16:16:57.067 I/AddTipActivity(24519): TransactionResult MerchantId=, TerminalId=, TimeStamp=Tue Jun 26 16:16:57 AEST 2018
06-26 16:16:57.067 D/AddTipActivity(24519): Received PaymentRequest: TotalAmount=1185.58, Amount=1162.58, TipAmount=23.00, CashOutAmount=0.00, Currency=USD
06-26 16:16:57.067 E/AddTipActivity(24519): Reason: ERROR - UNDEFINED
Back to questions
Hi shijigroup,
Can you please provide the code used for payment request.
Thanks,
Admin
Can you please provide the code used for payment request.
Thanks,
Admin
public void onClickNext(@SuppressWarnings("unused") View view) {
PaymentRequest request = presenter.makePaymentRequest(getDefaultCurrency());
Log.v(TAG, "Sending PaymentRequest: " + request.getBundle().toString());
startActivityForResult(request.createIntent(), PAYMENT_DEFAULT_CURRENCY);
}
@Override
public PaymentRequest makePaymentRequest(Currency currency) {
PaymentRequest request = new PaymentRequest(TransactionSpecs.toBigDecimal(checkAmount + surchargeAmount));
request.setTipAmount(TransactionSpecs.toBigDecimal(tipAmount));
//request.setCashOutAmount(new BigDecimal("10.00"));
request.setCurrency(currency);
return request;
}
Is that enough?
PaymentRequest request = presenter.makePaymentRequest(getDefaultCurrency());
Log.v(TAG, "Sending PaymentRequest: " + request.getBundle().toString());
startActivityForResult(request.createIntent(), PAYMENT_DEFAULT_CURRENCY);
}
@Override
public PaymentRequest makePaymentRequest(Currency currency) {
PaymentRequest request = new PaymentRequest(TransactionSpecs.toBigDecimal(checkAmount + surchargeAmount));
request.setTipAmount(TransactionSpecs.toBigDecimal(tipAmount));
//request.setCashOutAmount(new BigDecimal("10.00"));
request.setCurrency(currency);
return request;
}
Is that enough?
It's ok in emulator, bug always failed in test device, the two device has the same problem.
Hope you got anwer here
Also, no need to specify the currency to PaymentRequest as default value is AUD in production Albert. If you specify a different currency other than AUD then payment will be declined.
Thanks,
Admin
Also, no need to specify the currency to PaymentRequest as default value is AUD in production Albert. If you specify a different currency other than AUD then payment will be declined.
Thanks,
Admin