-
Notifications
You must be signed in to change notification settings - Fork 57
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
TrimStrings middleware breaks signature verification - Part 2 #152
Labels
Comments
I need code to reproduce this. |
This is something we have no control over. For the reason above specifically, we trim each string value in the payload sent to Paddle to generate the pay link: https://github.com/laravel/cashier-paddle/blob/1.x/src/Concerns/PerformsCharges.php#L77 This is a Paddle limitation that we have no control over, sorry. |
patrickomeara
added a commit
to patrickomeara/cashier-paddle
that referenced
this issue
Aug 7, 2024
Paddle verifies the signature based on the input as they have it on their end. If Cashier receives strings that have been trimmed the signature verification fails. The fields need to stay as they are. laravel#120 laravel#152 laravel#173
taylorotwell
pushed a commit
that referenced
this issue
Aug 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
The issue seems to be similar to #120
I've noticed that sometimes webhooks(subscription_payment_succeeded and payment_succeeded) are failing with invalid signature exception. Upon further investigation I've discovered that the only similar thing between them is that the customers have one customer_name - eg.
(whitespace)John
, instead ofJohn Doe
. All such customers have this whitespace.It looks like this:
(screenshot from Paddle)
I've contacted Paddle's support and reported the issue there as well, as I think it could be something on their side.
My solution:
Adding
customer_name
to$except
inTrimStrings
middleware.The text was updated successfully, but these errors were encountered: