Support
Quality
Security
License
Reuse
kandi has reviewed xpay and discovered the below as its top functions. This is intended to give you an instant insight into xpay implemented functionality, and help decide if they suit your requirements.
XPay个人免签收款支付系统 完全免费 资金直接到达本人账号 支持 支付宝 微信 QQ 云闪付 无需备案 无需签约 无需挂机监控APP 无需插件 无需第三方支付SDK 无需营业执照身份证 只需收款码 搞定支付流程 现已支持移动端支付
No Code Snippets are available at this moment for xpay.
QUESTION
Visa Token Service (VTS)
Asked 2018-Nov-27 at 01:03Has any body sent the request to Visa token Service with valid encryption?
https://developer.visa.com/products/vts/reference#vts__payment_data
Was able to pass XPAY TOKEN genration, please help in JWE in code:
public static String generateJWE3(PlainPan pan) throws Exception {
Gson gson = new Gson();
String json = gson.toJson(pan);
String sharedSecret = Constants.VTS_SHARED_SECRET;
MessageDigest md = MessageDigest.getInstance("SHA-256");
byte[] digest = md.digest(sharedSecret.getBytes("UTF-8"));
String kid = "gUkXp2s5v8y/A?D(G+KbPeShVmYq3t6w";
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(256);
String encryptionKey = Constants.VTS_API_KEY;
JWEAlgorithm jweAlgorithm = JWEAlgorithm.A256GCMKW;
EncryptionMethod encryptionMethod = EncryptionMethod.A256GCM;
JWEHeader.Builder headerBuilder = new JWEHeader.Builder(jweAlgorithm, encryptionMethod);
headerBuilder.keyID(encryptionKey);
JWEHeader header = headerBuilder.build();
JWEEncrypter encrypter = new AESEncrypter(digest);
encrypter.getJCAContext().setProvider(BouncyCastleProviderSingleton.getInstance());
JWEObject jweObject = new JWEObject(header, new Payload(json));
jweObject.encrypt(encrypter);
String serialized = jweObject.serialize();
JWEObject temp = JWEObject.parse(serialized);
System.out.println("In JWE Header= " + temp.getHeader());
System.out.println("In Enc Key= " + temp.getEncryptedKey());
System.out.println("In IV= " + temp.getIV());
System.out.println("In CT= " + temp.getCipherText());
System.out.println("In AT= " + temp.getAuthTag());
// decrypt(sharedSecret,serialized);
return serialized;
}
{
"errorResponse":{
"status":400,
"message":"Input for encPaymentInstrument is invalid or inconsistent with the profile.",
"reason":"invalidParameter",
"details":[{
"location":"encPaymentInstrument"
}]
}
}
ANSWER
Answered 2017-Apr-10 at 23:22The issue is because of the Invalid encPaymentInstrument
data please ask the user to follow the below steps,
Steps To make the API call:
Create VTS APP
go to the registered gmail to check the email from VTS
navigate to that URL (https://developer.digital.visa.com/self-service-ic) set password and create a profile, the value given for APPID field will be the “clientAppID”
Please use nimbus-jose-jwt-4.12.jar
utility to generate jwe encryption.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Save this library and start creating your kit