public void Setup() { var restClient = new WorldpayRestClient(Configuration.ServiceKey); _authService = restClient.GetAuthService(); _tokenService = restClient.GetTokenService(); }
protected void OnShowCardDetails(object sender, CommandEventArgs e) { var token = Request["token"]; var client = new WorldpayRestClient((string)Session["apiEndpoint"], (string)Session["service_key"]); try { var details = client.GetTokenService().Get(token); HandleSuccessResponse(details); } catch (WorldpayException exc) { ErrorControl.DisplayError(exc.apiError); } }
protected void OnShowCardDetails(object sender, CommandEventArgs e) { var token = Request["token"]; var client = new WorldpayRestClient(Configuration.ServiceKey); try { var details = client.GetTokenService().Get(token); HandleSuccessResponse(details); } catch (WorldpayException exc) { ErrorControl.DisplayError(exc.apiError); } }