-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code : 1005,"Security Data : UsernameToken authentication failed" #2
Comments
You need to add the SOAP key in the encryption |
Facing same issue, can you please check? or guide where I need to update what |
I am using the SOAP transaction key and getting the same error. Any idea what I should use for api_login_id field? |
Managed to successfully encrypt card details. |
I am getting same error when I am adding amount variable in 'MessageSignature'.
|
This is an authentication error. In order to make a successful call to the api you have to generate a signature to sign your call to the api. After getting user card and billing data, use the inapp sdk to encrypt the user data before passing it to your server for transaction processing, this will help reduce your PCI burden. To encrypt the data you have to create a message signature (server side) using:
First create a HMAC-SHA1 of the soap transaction key. Then create a string concatenation of the HMAC-SHA1, your Merchant ID, a Merchant reference code and UTC timestamp: String signatureComponents = transactionKeySha1 + Merchant Id + Merchant reference code + timestamp; Next create a HMAC-SHA256 of the signatureComponents String. The result is your message signature. The MessageSignature class in the inapp sdk samples shows you how to generate the signature in java so you can transform the code to whichever language you need for your server. In my case I did it in PHP. After generating a signature you can make a call to the api to encrypt card data passing in your signature: apiClient.performApi(InAppSDKApiClient.Api.API_ENCRYPTION, If your signature is valid your call will be authenticated and processed. I hope this helps. |
You don't need to add amount. If you look carefully in the MessageSignature.java, you will see that they did not use amount. |
I am facing this issue while encrypting card detail while running this sample.
Any help with this will be appreciated. Thank you.
The text was updated successfully, but these errors were encountered: