Open arminhupka opened 2 years ago
Would you like to create a PR for this?
Hello, and thanks for library ;-) Maybe someone have simillar problem with verifications, for SvelteKit I discovered where there is problem (propably stringify function added some slashes that generate wrong md5 checksum:
export const POST: RequestHandler = async ({ request }): Promise<Response> => {
const bodyText = await request.text();
const isValid1 = payU.verifyNotification(signature, bodyText); // WORKS correctly
const isValid2 = payU.verifyNotification(signature, JSON.stringify(bodyText)); // Does NOT WORKING
Documentation explains this in https://developers.payu.com/europe/docs/payment-flows/lifecycle/#signature-verification where there is no information that body should be strigified, so maybe it would be nice to update readme. Greetings!
Hey @t-soltysiak would you mind opening a PR for documentation change?
This is mainly happening because of the JSON parsers alters the original body, so using the original request body as it is with verification(like in stripe) is the way
Hey @t-soltysiak would you mind opening a PR for documentation change?
During notification verifying getting error. Header
openpayu-signature
exist in incoming header data.