Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 25, 2023
1 parent 226c63c commit d7713f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/public/stripe/ipn.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
if (getDolGlobalString('STRIPE_DEBUG')) {
$fh = fopen(DOL_DATA_ROOT.'/dolibarr_stripeipn_payload.log', 'w+');
if ($fh) {
fwrite($fh, dol_print_date(dol_now('gmt'), 'standard').' IPN Called. HTTP_STRIPE_SIGNATURE='.$sig_header."\n");
fwrite($fh, dol_print_date(dol_now('gmt'), 'standard').' IPN Called. service='.$service.' HTTP_STRIPE_SIGNATURE='.$sig_header."\n");
fwrite($fh, $payload);
fclose($fh);
dolChmod(DOL_DATA_ROOT.'/dolibarr_stripeipn_payload.log');
Expand All @@ -126,7 +126,7 @@
// Invalid payload
httponly_accessforbidden('Invalid payload', 400);
} catch (\Stripe\Exception\SignatureVerificationException $e) {
httponly_accessforbidden('Invalid signature', 400);
httponly_accessforbidden('Invalid signature. May be a hook for an event created by another Stripe env ? Check setup of your keys whsec_...', 400);
} catch (Exception $e) {
httponly_accessforbidden('Error '.$e->getMessage(), 400);
}
Expand Down

0 comments on commit d7713f0

Please sign in to comment.