Coder Social home page Coder Social logo

fiskaly-sdk-java's People

Contributors

auxdevelopment avatar pgaubatz avatar prempador avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fiskaly-sdk-java's Issues

Cannot call upsertTransaction without not required paramter "schema"

Currently there is attempt to create (or update) transaction using this endpoint:

https://developer.fiskaly.com/api/kassensichv/v1/#operation/upsertTransaction

However, I am always encountering an error regarding schema. I think that it's due to missing some properties upon V1Schema:

An error occured while attempting to connect with Fiskaly client. schema: Invalid type. Expected: object, given: string

so I am trying to make it without any schema as according to documentation, it's not mandatory parameter. Then, I am encountering another error:

An error occured while attempting to connect with Fiskaly client. The TSS is not initialized.
ERROR (ErrorLogger.java:36:flush) {} - { Status: "400", Error: "Bad Request", Message: "The TSS is not initialized.", Code: "E_TSS_NOT_INITIALIZED", RequestId: "d97f07322cf51ef6a806df82888cbfc5"}

I am pretty sure that I am using valid TSS as I am using it during TSS initialization and Client ID initialization.
My code snippet:
public void finishTransaction(UUID tssId, UUID tssClientId, int lastRevision, V1StandardSchema schema) {
UUID txId = randomUUID();
Map<String, Object> requestBody = new HashMap<>();
requestBody.put("state", ACTIVE);
requestBody.put("client_id", Preconditions.checkNotNull(tssClientId));
//requestBody.put("schema", new Gson().toJson(schema));
Map<String, Object> queryParams = new HashMap<>();
queryParams.put("last_revision", lastRevision);
try {
tseClient.serveTransaction(tssId, tssClientId, txId, new Gson().toJson(requestBody), queryParams);

Java version:
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)

Fiskaly client DLL version: com.fiskaly.client-windows-amd64-v1.2.000
Fiskaly maven dependency:

com.fiskaly.sdk
fiskaly-sdk
1.2.001-jre

Random segmentation faults

Hello, I'm getting random JVM segmentation faults when using this client in version 1.1.301-jre with com.fiskaly.client-linux-amd64-v1.1.300.so:

This happens constantly when running FiskalyHttpClientTest#requestBasic with OpenJDK 11 and less often but still occasionally when using OpenJDK 8:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fc2303f47d8, pid=2233, tid=2260
#
# JRE version: OpenJDK Runtime Environment (11.0.6+10) (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1)
# Java VM: OpenJDK 64-Bit Server VM (11.0.6+10-post-Ubuntu-1ubuntu119.10.1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# J 405 c2 java.lang.String.hashCode()I [email protected] (49 bytes) @ 0x00007fc2303f47d8 [0x00007fc2303f4620+0x00000000000001b8]

When I remove Native.setProtected(true); from ClientLibrary.java it seems to run stable without JVM crashes.

Please let me know if you need further information such as the JVM error report file.

Missing enum types for payment_type

Currently only the types "CASH" and "NON_CASH" are allowed as value for payment_type. DSFinV-K allows more types such as "DEBIT_CARD", "CREDIT_CARD", "PREPAID_CARD", "PAYMENT_SERVICE_PROVIDER" and "NONE". Do you plan to include those as well? Currently we transform all not "CASH" transactions to "NON_CASH" before submitting to the TSE, but it could be more precise as we actually have more precise data.

Exception in ExceptionFactory

Hello,

ExceptionFactory.java -> buildHttpException(...) Line 28 results in an Exception because decodedBody contains (at least for some Exceptions) plain text and not a JSON string.

Example response:
Response{status=400, body='YW1vdW50c19wZXJfcGF5bWVudF90eXBlOiBJbnZhbGlkIHR5cGUuIEV4cGVjdGVkOiBhcnJheSwgZ2l2ZW46IG9iamVjdAo=', headers={X-Request-Id=[0123456789]}}

decodeBody = "amounts_per_payment_type: Invalid type. Expected: array, given: object"

Btw. After Exceptions like this, my JVM crashes as well as mentioned in the issue "#2 Random segmentation faults bug".

How to obtain new access token? No api endpoint available.

Hello,

I have few question regarding api.

Precondition:
After successful authentication at https://kassensichv.io/api/v1/auth I got following response:
{ "access_token": "eyJhbGci......H7BwJ8RztZtgQ", "access_token_expires_in": 36000, "access_token_expires_at": 1601679867, "refresh_token": "eyJhbG........4O_z3PvreZpGR6hvbA", "refresh_token_expires_in": 1800, "refresh_token_expires_at": 1601645667 }

  1. What token should be used for authenticating other requests: access or refresh?
    Usually access token is used, but here I am confused, because refresh token has expiration time less than access token.
    Is this made by mistake or I misunderstand something?

  2. How can I obtain new token when these ones expire?
    I don't see any API endpoint for getting new token. Should I just authenticate again?

  3. Does fiskaly client handle token expiration?

Thanks.

Mac dylib not found

I get the following exception when trying to load the dylib for MacOS (v.1.2.000):

The path seems to be built incorrectly (double "dylib.dylib").

Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libcom.fiskaly.client-darwin-amd64-v1.2.000.dylib.dylib, 9): image not found
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
		... 34 more
	Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libcom.fiskaly.client-darwin-amd64-v1.2.000.dylib.dylib, 9): image not found
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
		... 34 more

API for client configuration

In the current Java API there doesn't seem to be a simple way to customize the client settings as described in https://developer.fiskaly.com/en/docs/client-documentation#3-add-custom-settings

Since the "context" is a private field in FiskalyHttpClient it also isn't straight forward to implement the JSON RPC call myself. I am able to work around this issue for now by accessing the private context field via reflection but it would be more elegant to have a proper API for configuration.

Detection of SMA bind to TSE

Specification of the rules say that a TSE can only be connected to one specific SMA. How does the SMA-client assure that it does not connect to a TSE, that is already bound to another SMA?

And from another perspective: Is it possible (and allowed) to connect to different TSEs with one SMA-client? Technically speaking: We have one Java-application that creates a new FiskalyHttpClient with given API-credentials. Now this FiskalyHttpClient gets a request for TSE 1 and afterwards a request for TSE 2. Is that ok or will we receive and error then?

MacOS client missing

The previous implementation also had a lib compiled for MacOS. Is that still in planning? We are developing on MacOS so now it's really hard to debug anything. Also some customers use MacOS to host their POS.

v1.1.601 targets wrong client

When using the Java v1.1.601 it tried to access the wrong client:

java.lang.UnsatisfiedLinkError: Unable to load library 'com.fiskaly.client-linux-amd64-v1.1.601.so

Should target v1.1.600.so

FiskalyHttpClient#request() throws JsonSyntaxException sometimes while parsing response.

@prempador knows about this. Adding this issue here just to keep track on when it's resolved and so our workaround can be removed from the code.

When calling FiskalyHttpClient#request() and sending a malformed requests with bad fields (for example bad amounts_per_vat_rate.vat_rate or amounts_per_vat_rate.amount or amounts_per_payment_type.amount) then FiskalyHttpClient#request() throws JsonSyntaxException while parsing the response.

From a Slack conversation with @prempador.

I’m working with transaction API right now. So, today I made an “update transaction” request. Apparently it was a little bit malformed and I got an error back. Which is fine. But I got the error in a form of an exception when calling FiskalyHttpClient#request() and the exception is this: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 1 column 145 path $.message . I suppose FiskalyHttpClient#request()
is not supposed to throw exceptions like this (it’s signature says that it throws either IOException, FiskalyHttpException or FiskalyClientException) and JsonSyntaxException is none of those. So I look into the raw response and the response is like this:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -20000,
    "message": "HTTP error",
    "data": {
      "response": {
        "status": 400,
        "headers": {
          "X-Request-Id": [
            "0123456789"
          ]
        },
        "body": "eyJzdGF0dXNfY29kZSI6IDQwMCwgImVycm9yIjogIkJhZCBSZXF1ZXN0IiwgImNvZGUiOiAiRV9UWF9VUFNFUlQiLCAibWVzc2FnZSI6ICJhbW91bnRzX3Blcl92YXRfcmF0ZS4wLnZhdF9yYXRlOiBhbW91bnRzX3Blcl92YXRfcmF0ZS4wLnZhdF9yYXRlIG11c3QgYmUgb25lIG9mIHRoZSBmb2xsb3dpbmc6ICIxOSIsICI3IiwgIjEwLjciLCAiNS41IiwgIjAiCmFtb3VudHNfcGVyX3ZhdF9yYXRlLjAuYW1vdW50OiBEb2VzIG5vdCBtYXRjaCBwYXR0ZXJuICdeLT9cZCsoXC5cZHsyLDY0fSkkJwphbW91bnRzX3Blcl9wYXltZW50X3R5cGUuMC5hbW91bnQ6IERvZXMgbm90IG1hdGNoIHBhdHRlcm4gJ14tP1xkKyhcLlxkezIsNjR9KSQnCiJ9"
      }
    }
  },
  "id": "4c631350-c6eb-43ad-8db7-2251141e52c4"
}

And the body decoded from base64 is like this:

{"status_code": 400, "error": "Bad Request", "code": "E_TX_UPSERT", "message": "amounts_per_vat_rate.0.vat_rate: amounts_per_vat_rate.0.vat_rate must be one of the following: "19", "7", "10.7", "5.5", "0"
  amounts_per_vat_rate.0.amount: Does not match pattern '^-?\d+(\.\d{2,64})$'
  amounts_per_payment_type.0.amount: Does not match pattern '^-?\d+(\.\d{2,64})$'
  "}

Which is an invalid json it seems. So I suppose the problem is that the backend sends an invalid json there encoded in Base64, client tries to parse it, fails, and throws an unexpected exception. It’s not a big deal for us right now since this shouldn’t happen with good requests, but maybe something you want to look into, so it’s easier for everybody to troubleshoot problems like this in the future.

Native sdk crash when trying to query non-existing API version

When preparing for migration to Fiskaly Sign API v2, I discovered some issue with java sdk (checked with 1.2.200).
Trying to connect to non-existing API version (I'm aware that v2 is not yet available on LIVE environment yet)

    val apiKey = "API_KEY"
    val apiSecret = "API_SECRET"
    val client = FiskalyHttpClient(apiKey, apiSecret, "https://kassensichv.io/api/v2") // <- v2 is not yet deployed to live
    println(client.request("GET", "/tss"))

results in native sdk crash (e.g. on MacOS, it is

panic: runtime error: invalid memory address or nil pointer dereference
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1356cbda9]

goroutine 17 [running, locked to thread]:
fiskaly.com/client/methods.httpRequest(0xc0000b4780, 0xc00012c300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	fiskaly.com/client/methods/request.go:276 +0x372
fiskaly.com/client/methods.RequestHandler(0xc00013e500, 0x247, 0x280, 0x0, 0x0, 0x0, 0x0)
	fiskaly.com/client/methods/request.go:157 +0x773
fiskaly.com/client/jsonrpc.Invoke(0xc000136580, 0x2a1, 0x2a1, 0xc000129e90)
	fiskaly.com/client/jsonrpc/invoke.go:38 +0x176
main._fiskaly_client_invoke(0x7f9213037710, 0x0)
	fiskaly.com/client/cmd/client/main.go:17 +0x43
main._cgoexpwrap_d4e42be6ae88__fiskaly_client_invoke(0x7f9213037710, 0x0)
	_cgo_gotypes.go:84 +0x60

while on Android

com.example.fiskaly E/Go: panic: runtime error: invalid memory address or nil pointer dereference
com.example.fiskaly E/Go: 	panic: runtime error: invalid memory address or nil pointer dereference
com.example.fiskaly E/Go: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x927215f8]
com.example.fiskaly E/Go: goroutine 17 [running, locked to thread]:
com.example.fiskaly E/Go: fiskaly.com/client/methods.httpRequest(0x4f980150, 0x4f98c5a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
com.example.fiskaly E/Go: 	fiskaly.com/client/methods/request.go:276 +0x22c
com.example.fiskaly E/Go: fiskaly.com/client/methods.RequestHandler(0x4f9ca480, 0x21b, 0x240, 0x0, 0x0, 0x0, 0x0)
com.example.fiskaly E/Go: 	fiskaly.com/client/methods/request.go:157 +0x5f0
com.example.fiskaly E/Go: fiskaly.com/client/jsonrpc.Invoke(0x4f9c8280, 0x275, 0x275, 0x4f848040)
com.example.fiskaly E/Go: 	fiskaly.com/client/jsonrpc/invoke.go:38 +0x104
com.example.fiskaly E/Go: main._fiskaly_client_invoke(0x9f6aee00, 0x926b0001)
com.example.fiskaly E/Go: 	fiskaly.com/client/cmd/client/main.go:17 +0x30    
    --------- beginning of crash
com.example.fiskaly A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 18878 (roidJUnitRunner)
? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
? A/DEBUG: Build fingerprint: 'PAX/msm8909/msm8909:7.1.2/N2G47H/163:user/release-keys'
? A/DEBUG: Revision: '0'
? A/DEBUG: ABI: 'arm'
? A/DEBUG: pid: 18862, tid: 18878, name: roidJUnitRunner  >>> com.example.fiskaly <<<
? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
? A/DEBUG:     r0 00000000  r1 000049be  r2 00000006  r3 00000008
? A/DEBUG:     r4 000049ae  r5 00000000  r6 00000002  r7 0000010c
? A/DEBUG:     r8 00000007  r9 00000002  sl 4f800380  fp 92c886f0
? A/DEBUG:     ip 00000004  sp 4f88189c  lr 92705f34  pc 92723d70  cpsr 600f0010
? A/DEBUG: backtrace:
? A/DEBUG:     #00 pc 000eed70  /data/app/com.example.fiskaly-1/base.apk (offset 0x33000)

)

Shouldn't such a case be somehow handled, e.g. some error instead of crash?

Detection of armel/armhf

Just a quick question: Right now the respective client library only has to be downloaded and works with it's given filename. But when using an ARMel or ARMhf device the SDK searches for "arm". This is not a problem as we can rename the "armhf" to "arm". I just wanted to ask if this behaviour will stay like that in the future so we'll build an ARM mode detection ourselves which takes the armhf file an renames it.

Question regarding configuration of HTTP proxy

Hi,

Our JVM based POS software uses the Fiskaly Client. The JVM process is started with environment variables such as http_proxy and https_proxy, pointing to an HTTP proxy. We do not want to use this proxy for the Fiskaly client. However, when I use the Fiskaly client configuration API (https://developer.fiskaly.com/en/docs/client-documentation/#configuration) and set http_proxy to an empty string, the Fiskaly client still seems to use the proxy from the environment variables.
When I set http_proxy to some non-empty string, the Fiskaly client does attempt to use the proxy I set.
Only when I remove the environment variables http_proxy and https_proxy the client does no longer use the proxy.

Am I right in assuming that an empty http_proxy string leads the client to fall back on the environment variables for the proxy? Is there an option to tell the client to ignore the environment variables?

Thank you,
Daniel Diepold

java.lang.UnsatisfiedLinkError: Native library (ibjnidispatch.so)

Hello,

im trying to build my project over android studio with flutter and added all files in my Gradle with the .aar file and getting following error when I try to create an instance : FiskalyHTTPClient(api_key,...)

java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/android-aarch64/libjnidispatch.so) not found in resource path (.)

It also says in the build section: unable to strip libjnidispatch.so

Using API 28, Gradle: 6.1.1

Tried on real device and Emulator

Using Kotlin to run

Impossible to download the export TAR file since the V1 update

Here is the JSON file I receive when i try to retrieve the TAR control file:

{
	"href": "https://kassensichv.io/api/v1/tss/19314bd6-307c-378b-96d2-822574db1da1/export/635e9b3a-b046-32a8-b46a-e60285f7e404/file/0459fd0b-1b50-4b37-a67a-5b9ff57357c8.tar",
	"state": "COMPLETED",
	"time_request": 1590224942,
	"time_start": 1590224944,
	"time_end": 1590225105,
	"tss_id": "19314bd6-307c-378b-96d2-822574db1da1",
	"metadata": {},
	"_type": "EXPORT",
	"_id": "635e9b3a-b046-32a8-b46a-e60285f7e404",
	"_env": "TEST",
	"_version": "1.0.0"
}

Everything looks fine, except :

  • The generation time. It take about 2-5 minutes to generate the control file of the current day (with less than 10 transactions)
  • The generated link doesn't work. It fails directly, the download does not even start. I think there is a problem with the header.

Client does not ignore HTTP proxy for some requests

Hello,

since client version v1.2.100 the client can be configured to ignore the system proxy (i.e. the proxy specified by environment variables) by setting http_proxy="-" according to https://developer.fiskaly.com/en/docs/client-documentation/#result

However, when I run the client with environment variables http_proxy="localhost", https_proxy="localhost" and configure the client with http_proxy="-", the following Exception is thrown:

FiskalyClientException{ Code=-32603, Message=Internal error, Data="failed to fetch remote JWK: Get \"https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs\": proxyconnect tcp: dial tcp 127.0.0.1:80: connect: connection refused"}

Setting the environment variable NO_PROXY="auth.fiskaly.com" avoids this error. It seems like http_proxy="-" is only taken into consideration for connections to kassensichv.io but not for connections to auth.fiskaly.com.

Client ignore HTTP Poxy during check certificate on https://auth.fiskaly.com

The Client DLL ignore the PRXY Setting during certificate check.
The communication with "https://kassensichv.io" looks good. But the certification check with the URL "https://auth.fiskaly.com" ignore the PROXY setting.

`[INFO] 2021/03/23 08:44:40 request.go:155: send data to /tss/9b9fef85-fdae-4656-a431-......
[INFO] 2021/03/23 08:44:40 request.go:267: make http request...
[INFO] 2021/03/23 08:44:40 request.go:268: request: PUT https://kassensichv.io/api/v1/tss/9b9fef85-fdae-4656-a431-......
[INFO] 2021/03/23 08:44:40 request.go:192: build http request
[INFO] 2021/03/23 08:44:40 auth.go:50: check auth...
[INFO] 2021/03/23 08:44:40 auth.go:154: refresh token expired
[INFO] 2021/03/23 08:44:40 auth.go:164: auth by api_key and api_secret
[INFO] 2021/03/23 08:44:40 auth.go:76: auth url: https://kassensichv.io/api/v1/auth
[INFO] 2021/03/23 08:44:40 auth.go:88: sending auth request...

[ERROR] 2021/03/23 08:45:05 auth.go:132: failed to parse organization_id and env from token: failed to fetch remote JWK: Get "https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs": dial tcp 35.198.188.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[ERROR] 2021/03/23 08:45:05 request.go:227: authentication error: failed to fetch remote JWK: Get "https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs": dial tcp 35.198.188.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[ERROR] 2021/03/23 08:45:05 request.go:338: building http request error: failed to fetch remote JWK: Get "https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs": dial tcp 35.198.188.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[ERROR] 2021/03/23 08:45:05 request.go:272: failed to do http request, error failed to fetch remote JWK: Get "https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs": dial tcp 35.198.188.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[ERROR] 2021/03/23 08:45:05 request.go:159: request error: failed to fetch remote JWK: Get "https://auth.fiskaly.com/auth/realms/fiskaly/protocol/openid-connect/certs": dial tcp 35.198.188.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
`

React Native - App hang when using SDK in release mode, but work in debugger (everything works for API)

I used SDK for Android, I could Authenticate but after that, after few actions, it makes app hang (but can swipe drawer menu -sometime is not). i could not tap or do anything
But when i enable debugger, everything works fine (not work in release mode)

Android >= 10 did not work (not works in release, but works in debug)
Android <= 9 works correct (works in release mode and debug mode)

For now, i used

implementation 'com.fiskaly.sdk:fiskaly-sdk:1.2.100-android'
implementation files('libs/com.fiskaly.client-android-all-v1.2.100.aar')

with android/app/proguard-rules.pro is

-keepclassmembers class * extends com.sun.jna.* { public *; }
-keep class com.sun.jna.* { *; }

And android/app/src/main/AndroidManifest.xml is

      android:usesCleartextTraffic="true"

Thank you, all

Android

    buildToolsVersion = "28.0.3"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    supportLibVersion = "28.0.0"

React Native Info
React Native Environment Info:
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 982.01 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.15.1 - /usr/local/bin/node
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 19, 22, 23, 26, 27, 28, 29, 30
Build Tools: 23.0.1, 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-22 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.8.4 => 16.8.4
react-native: 0.59.2 => 0.59.2
npmGlobalPackages:
react-native-cli: 2.0.1

Dependencies

"@babel/plugin-proposal-decorators": "7.4.0",
   "@react-native-community/async-storage": "1.5.0",
   "@react-native-community/netinfo": "5.0.0",
   "@react-native-firebase/analytics": "10.4.1",
   "@react-native-firebase/app": "10.4.0",
   "@react-native-firebase/messaging": "10.4.1",
   "@sentry/react-native": "^1.8.2",
   "@tradle/react-native-http": "^2.0.1",
   "@types/axios": "0.14.0",
   "@types/react-redux": "^7.1.8",
   "assert": "^1.5.0",
   "asyncstorage-down": "^4.2.0",
   "aws-sdk": "^2.604.0",
   "babel-plugin-transform-remove-console": "6.9.4",
   "browserify-zlib": "^0.1.4",
   "buffer": "^4.9.2",
   "console-browserify": "^1.2.0",
   "constants-browserify": "^1.0.0",
   "dns.js": "1.0.1",
   "domain-browser": "1.2.0",
   "formik": "1.3.1",
   "https-browserify": "0.0.1",
   "intl": "1.2.5",
   "inversify": "4.13.0",
   "jetifier": "^1.6.5",
   "mitt": "1.2.0",
   "moment": "2.23.0",
   "moment-timezone": "0.5.32",
   "native-base": "2.12.1",
   "path-browserify": "0.0.0",
   "process": "0.11.10",
   "prop-types": "^15.7.2",
   "punycode": "1.4.1",
   "querystring-es3": "0.2.1",
   "react": "16.8.4",
   "react-devtools": "3.6.3",
   "react-native": "0.59.2",
   "react-native-actionsheet": "2.4.2",
   "react-native-config": "0.11.5",
   "react-native-crypto": "2.2.0",
   "react-native-datepicker": "1.7.2",
   "react-native-device-info": "5.5.6",
   "react-native-dropdown-picker": "^3.7.0",
   "react-native-extra-dimensions-android": "1.2.5",
   "react-native-floating-action": "1.13.0",
   "react-native-fs": "^2.16.6",
   "react-native-gesture-handler": "1.0.16",
   "react-native-globalize": "3.0.0",
   "react-native-htmlview": "^0.16.0",
   "react-native-immersive": "2.0.0",
   "react-native-keyboard-aware-scroll-view": "0.8.0",
   "react-native-level-fs": "3.0.1",
   "react-native-localization": "2.1.1",
   "react-native-localize": "2.0.1",
   "react-native-material-dropdown": "0.11.1",
   "react-native-modal": "9.0.0",
   "react-native-multiple-select": "^0.5.5",
   "react-native-orientation-locker": "1.1.7",
   "react-native-os": "1.2.6",
   "react-native-popup-menu": "0.14.2",
   "react-native-randombytes": "3.5.3",
   "react-native-reanimated": "^1.9.0",
   "react-native-screens": "^2.8.0",
   "react-native-splash-screen": "3.2.0",
   "react-native-svg": "^12.1.0",
   "react-native-svg-transformer": "^0.14.3",
   "react-native-swipe-gestures": "1.0.3",
   "react-native-swipe-list-view": "^3.2.3",
   "react-native-swipeable-flat-list": "0.0.5",
   "react-native-swiper": "^1.6.0",
   "react-native-tcp": "3.3.2",
   "react-native-textinput-effects": "^0.6.1",
   "react-native-udp": "2.7.0",
   "react-native-vector-icons": "6.0.2",
   "react-native-webview": "^10.3.2",
   "react-native-zip-archive": "4.1.5",
   "react-navigation": "3.13.0",
   "react-redux": "^7.2.0",
   "react-timer-mixin": "0.13.4",
   "readable-stream": "1.0.33",
   "redux": "^4.0.5",
   "redux-thunk": "^2.3.0",
   "reflect-metadata": "0.1.12",
   "rn-fetch-blob": "^0.12.0",
   "safe-json-stringify": "1.2.0",
   "stream-browserify": "1.0.0",
   "string_decoder": "^0.10.31",
   "timers-browserify": "1.4.2",
   "tty-browserify": "0.0.0",
   "url": "^0.10.3",
   "uuid": "3.3.2",
   "vm-browserify": "0.0.4",
   "yup": "0.26.6"

Distribute client through maven

Currently we are recommended in your integration guide to download the client from https://developer.fiskaly.com/downloads and copy the aar to the project.
From Android Gradle plugin version 4.0.1 (gradle-6.1.1) the build is failing because gradle doesn't allow to copy libraries in the project
We are trying to upgrade gradle and we get the following error:

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :saleslib project caused this error: /home/jenkins2/slave/workspace/.../libs/com.fiskaly.client-android-all-v1.2.000.aar

We need to get the client from a repository as it is done for the SDK. This, apart from following the android industry standard of importing libraries will unblock us from upgrading gradle plugin in our project.

Details:
We are using the Client in an Android Studio Module and not in the main project

Latest release is not available in maven

Hello,

I saw that version 1.2.200 has been released, but it is not available in the maven repository.
1.2.100 exists, but 1.2.200 is not.

Could you please add it to maven? I believe most of the project depends on it.

Beside that, could you please provide release notes, to give more information about changes?

Thanks.

Problem Activation Live-Env

As the support (complaint@) is not answering since yesterday (I thought P2 is answered in 30mins?), I'll try my luck here... (sorry text is in German).

Wir haben gerade das Problem, dass wir für Managed-Accounts nicht die Live-Env aktivieren können:

Beispiel:
POST organizations/xxxxxxxxxxxxxx/enable-env
{"env":"LIVE"}

Wir bekommen folgenden Fehler (hier als PHP Objekt gerendert):

{
["status_code"] => int(501)
["error"] => string(15) "Not Implemented"
["code"] => string(17) "E_NOT_IMPLEMENTED"
["message"] => string(21) "Internal Server Error"
}

Bis gestern hat die gleiche Anfrage (bei anderen Managed-Accounts) gut funktioniert. Wir haben nichts an unserer Anfrage geändert.
Es betrifft alle Kunden, die gerade ihren Account im Live-Modus aktivieren wollen. Durch den Fehler ist es für diese Kunden leider nicht möglich, die TSE zu nutzen.

Könntet ihr mal schauen, was das sein kann?

Internal error (failed to find matching key for verification) when using java sdk on `dev` environment

When I try to use java sdk to make a simple call to Fiskaly api on dev environment

    val apiKey = "API_KEY"
    val apiSecret = "API_SECRET"
    val client = FiskalyHttpClient(apiKey, apiSecret, "https://sign.fiskaly.dev/api/v2")
    println(client.request("GET", "/tss"))

I get exception:

Exception in thread "main" FiskalyClientException{ Code=-32603, Message=Internal error, Data="failed to find matching key for verification: failed to find matching key for key ID \"GZzxbuN8ZCafnK1xRWe08caWgXH9x1OMfOGWyyjrpS4\" in key set"}
	at com.fiskaly.sdk.factories.ExceptionFactory.buildClientException(ExceptionFactory.java:30)
	at com.fiskaly.sdk.FiskalyHttpClient.doInvoke(FiskalyHttpClient.java:205)
	at com.fiskaly.sdk.FiskalyHttpClient.request(FiskalyHttpClient.java:129)
	at com.fiskaly.sdk.FiskalyHttpClient.request(FiskalyHttpClient.java:188)
	at demo.MainKt.main(Main.kt:16)
	at demo.MainKt.main(Main.kt)

I'm trying with the latest 1.2.200 java sdk (tried on both Android and MacOS).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.