Closed Mactub07 closed 1 year ago
Hi Mactub07, Have you verified that the call itself <session.getBasicPaymentItems( ... )> is invoked the 2nd and 3rd time?
Hi @LeonStemerdink , yes, I've checked this case. there is test scheme:
I've noticed that if I rebuild app it start work again and after 3th time it happens again.
I'm wondering:
Looking at the SDK code there is no reason why you wouldn't receive a response every time. Even if the server would ignore repeated requests, you would still receive a response. It seems to me that the issue is probably with React Native, as you have different results with Rebuilding and Reloading.
HI, I've detected that if I try to get payment items 2-3 times , onBasicPaymentItemsCallComplete callback is not invoked. I'm a new in Android, need help:
package com.myApp.rningenicobridge;
import android.support.annotation.Nullable;
import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.WritableArray; import com.facebook.react.modules.core.DeviceEventManagerModule; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.Promise; import com.facebook.react.uimanager.IllegalViewOperationException; import android.content.Intent;
import java.util.HashMap; import java.util.Map; import android.util.Log;
//ingenico import com.globalcollect.gateway.sdk.client.android.sdk.GcUtil; import com.globalcollect.gateway.sdk.client.android.sdk.asynctask.BasicPaymentItemsAsyncTask.OnBasicPaymentItemsCallCompleteListener; import com.globalcollect.gateway.sdk.client.android.sdk.asynctask.PaymentProductAsyncTask.OnPaymentProductCallCompleteListener; import com.globalcollect.gateway.sdk.client.android.sdk.asynctask.PaymentProductGroupAsyncTask.OnPaymentProductGroupCallCompleteListener; import com.globalcollect.gateway.sdk.client.android.sdk.communicate.C2sCommunicatorConfiguration; import com.globalcollect.gateway.sdk.client.android.sdk.manager.AssetManager; import com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentContext; import com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentRequest; import com.globalcollect.gateway.sdk.client.android.sdk.model.PreparedPaymentRequest; import com.globalcollect.gateway.sdk.client.android.sdk.model.Size; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.AccountOnFile; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.BasicPaymentItem; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.BasicPaymentItems; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.BasicPaymentProduct; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.BasicPaymentProductGroup; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.PaymentItem; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.PaymentProduct; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.PaymentProductGroup; import com.globalcollect.gateway.sdk.client.android.sdk.session.GcSession; import com.globalcollect.gateway.sdk.client.android.sdk.session.GcSessionEncryptionHelper; import com.google.android.gms.common.api.Status; import com.google.android.gms.wallet.AutoResolveHelper; import com.google.android.gms.wallet.PaymentData; import com.google.android.gms.wallet.WalletConstants; import com.google.gson.Gson; import com.google.gson.JsonParser; import org.json.JSONObject;
import java.io.InputStreamReader; import java.io.Reader; import java.io.Serializable; import com.globalcollect.gateway.sdk.client.android.sdk.model.AmountOfMoney; import com.globalcollect.gateway.sdk.client.android.sdk.model.CountryCode; import com.globalcollect.gateway.sdk.client.android.sdk.model.CurrencyCode; import com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentContext;
import android.content.Context; import android.app.Application; import be.sncb.mobile.MainApplication; import java.security.InvalidParameterException; import com.facebook.react.uimanager.IllegalViewOperationException;
import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.BasicPaymentItem; import com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.displayhints.DisplayHintsPaymentItem;
import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTGROUPID_CARDS; import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTID_AFTERPAY_INSTALLMENTS; import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTID_AFTERPAY_INVOICE; import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTID_GOOGLEPAY; import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTID_BanContact; import static com.globalcollect.gateway.sdk.client.android.sdk.configuration.Constants.PAYMENTPRODUCTID_BOLETOBANCARIO;
public class RNIngenicoBridgeModule extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "RNIngenicoBridge"; private static ReactApplicationContext reactContext; private static Context appContext; private static final String GET_PAYMENT_ITEMS_ERROR = "GET_PAYMENT_ITEMS_ERROR";
}