jamius19 / paddle-verifier Goto Github PK
View Code? Open in Web Editor NEWA lighweight Paddle.com webhook verification library for Java.
License: MIT License
A lighweight Paddle.com webhook verification library for Java.
License: MIT License
pSignature = URLDecoder.decode(pSignature, StandardCharsets.UTF_8); // SecurityUtils.Class
should by
pSignature = URLDecoder.decode(pSignature, StandardCharsets.UTF_8.name());
refer: https://stackoverflow.com/questions/6138127/how-to-do-url-decoding-in-java
Could you add support for Java under java 10 and release a new paddle-verifier? Which is really helpfull.
I have been using this module in my application for quite some time to verify paddle webhooks.
But today, I observed a problem that one webhook from paddle is constantly denied by this verifier. I couldn't find the problem. It is a completely valid webhook with proper p_signature value.
Can you help me finding the issue?
StringParser.generateInnerValues()
will produce a wrong string length when the string contains a special character. (Eg.: á
)
You should change val.length()
to val.getBytes().length
. (Probably you should use UTF-8 charset.)
Please refer to this StackOverflow issue
I implemented the verifier for myself in Kotlin based on this implementation. I found this issue and thought it'll help somebody.
You can receive a special character in the subscription_payment_succeeded
webhook in the customer_name
field. (You will receive the cardholder's name.)
I'm coming across this for the first time, so apologies if I've got hold of the wrong end of the stick but ...
Are you sure that the you need to URL decode the signature?
Looking at the other language examples from https://developer.paddle.com/webhook-reference/verifying-webhooks, it appears they only Base64 decode.
Also the signature that comes through from the Webhook tester https://sandbox-vendors.paddle.com/webhook-alert-test appears not to have url encoded the signature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.