我正在尝试在android中集成paymt付款网关,并且我有一些疑问:
PaytmPGService Service = PaytmPGService.getStagingService();
显示了getStagingService
(String) in PaytmPGService cannot be applied to ()
错误,但是如果我放了PaytmPGService Service = PaytmPGService.getStagingService("");
,那就很好了。如何解决此问题?
<----------------------------->
PaytmTransactionCallbacks
@Override
public void onTransactionResponse(Bundle inResponse) {
Log.d("paytm_gateway", "onTransactionResponse: "+inResponse.toString());
String s = inResponse.getString("STATUS");
String oid = inResponse.getString("ORDERID");
Log.d("paytm_gateway", "onTransactionResponse: trxID: "+oid);
if (s != null && s.equals("TXN_SUCCESS")){
Toast.makeText(this, "Success", Toast.LENGTH_SHORT).show();
updatePostLimit(oid);
}
else {
Toast.makeText(this, "Failed", Toast.LENGTH_SHORT).show();
finish();
}
}
@Override
public void networkNotAvailable() {
Log.d("paytm_gateway", "networkNotAvailable: ");
}
@Override
public void clientAuthenticationFailed(String inErrorMessage) {
Log.d("paytm_gateway", "clientAuthenticationFailed: "+inErrorMessage);
}
@Override
public void someUIErrorOccurred(String inErrorMessage) {
Log.d("paytm_gateway", "someUIErrorOccurred: "+inErrorMessage);
}
@Override
public void onErrorLoadingWebPage(int iniErrorCode, String inErrorMessage, String inFailingUrl) {
Log.d("paytm_gateway", "onErrorLoadingWebPage: "+inErrorMessage+" "+inFailingUrl);
}
@Override
public void onBackPressedCancelTransaction() {
Log.d("paytm_gateway", "onBackPressedCancelTransaction: ");
}
@Override
public void onTransactionCancel(String inErrorMessage, Bundle inResponse) {
Log.d("paytm_gateway", "onTransactionCancel: "+inErrorMessage+" res: "+inResponse);
}