Exemplo n.º 1
0
    private void GetMerchantsPageAndFill(int page)
    {
        MerchantElement[] merchantsList = merchantListParent.GetComponentsInChildren <MerchantElement>(false);
        foreach (var m in merchantsList)
        {
            DestroyImmediate(m.gameObject);
        }

        GetMerchantsRequest request = new GetMerchantsRequest()
        {
            CustomerKey = MundiPaggSession.CurrentSession.CustomerKey,
            PageNumber  = page,
            PageSize    = 10
        };

        MundiPaggClientAPI.GetMerchants(request,
                                        result =>
        {
            merchantsResult = result;

            SetupMerchantsResult();
            UpdatePaginationView();
        },
                                        error =>
        {
            MessagePopup.Open(error.ErrorCode.ToString(), error.GetErrorMessage());
        }
                                        );
    }
Exemplo n.º 2
0
 public static void GetMerchants(GetMerchantsRequest request, Action <GetMerchantsResult> resultCallback, Action <MundiPaggError> errorCallback)
 {
     MundiPaggHTTP.Request searchMerchantsRequest = new MundiPaggHTTP.Request()
     {
         ApiEndPoint = "/" + request.CustomerKey + "/merchants",
         Verb        = MundiPaggHTTP.Request.VERB.GET,
         Data        = request,
         Header      = new Dictionary <string, string>()
         {
             { "Authorization", MundiPaggSession.CurrentSession.TokenType + " " + MundiPaggSession.CurrentSession.AccessToken }
             , { "Content-Type", "application/x-www-form-urlencoded" }
             , { "IsSandboxEnabled", "true" }
         }
     };
     MundiPaggHTTP.MakePortalApiCall(searchMerchantsRequest, resultCallback, errorCallback);
 }
Exemplo n.º 3
0
 public ApiResponse <List <Merchant> > GetMerchants(GetMerchantsRequest request)
 {
     return(SendApiRequest <GetMerchantsRequest, List <Merchant> >(request));
 }