We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm experiencing some issues with the stripe webhooks.
When a card is declined and then updated to a card that succeeds, I get a 500 error on the webhook when posting the payment_intent.successful event.
The error occurs in the StripeCallbackService.php file on like 89: $metadata['type'] = $paymentMethod->type;
It says cannot read attribute type on a string. This means that this piece of code above:
$paymentIntent = $stripe->paymentIntents->retrieve( $paymentIntent->id, ['expand' => ['customer', 'payment_method', 'invoice.subscription.plan.product']] );
Is not actually expanding the payment_method and instead returning the string for the payment id.
Any help here is appreciated, many thanks!
yii\base\ErrorException: Attempt to read property "type" on string in /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/solspace/craft-freeform/packages/plugin/src/Integrations/PaymentGateways/Stripe/Services/StripeCallbackService.php:89 Stack trace: #0 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/craftcms/cms/src/web/ErrorHandler.php(79): yii\base\ErrorHandler->handleError(2, 'Attempt to read...', '/container/appl...', 89) #1 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/solspace/craft-freeform/packages/plugin/src/Integrations/PaymentGateways/Stripe/Services/StripeCallbackService.php(89): craft\web\ErrorHandler->handleError(2, 'Attempt to read...', '/container/appl...', 89) #2 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/solspace/craft-freeform/packages/plugin/src/Integrations/PaymentGateways/Stripe/Controllers/StripeWebhookController.php(74): Solspace\Freeform\Integrations\PaymentGateways\Stripe\Services\StripeCallbackService->handleSavedForm(Object(Solspace\Freeform\Form\Types\Regular), Object(Solspace\Freeform\Integrations\PaymentGateways\Stripe\Stripe), Object(Solspace\Freeform\Integrations\PaymentGateways\Stripe\Fields\StripeField), Object(Stripe\PaymentIntent), Object(Solspace\Freeform\Records\SavedFormRecord)) #3 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/solspace/craft-freeform/packages/plugin/src/Integrations/PaymentGateways/Stripe/Controllers/StripeWebhookController.php(51): Solspace\Freeform\Integrations\PaymentGateways\Stripe\Controllers\StripeWebhookController->handlePaymentIntent(Object(Stripe\Event)) #4 [internal function]: Solspace\Freeform\Integrations\PaymentGateways\Stripe\Controllers\StripeWebhookController->actionWebhooks() #5 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #6 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #7 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/solspace/craft-freeform/packages/plugin/src/controllers/BaseApiController.php(15): yii\base\Controller->runAction('webhooks', Array) #8 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/yiisoft/yii2/base/Module.php(552): Solspace\Freeform\controllers\BaseApiController->runAction('webhooks', Array) #9 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/craftcms/cms/src/web/Application.php(349): yii\base\Module->runAction('freeform/stripe...', Array) #10 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('freeform/stripe...', Array) #11 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/craftcms/cms/src/web/Application.php(317): yii\web\Application->handleRequest(Object(craft\web\Request)) #12 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request)) #13 /container/application/releases/15b166078606ce95bcf2d0438a0e0bcd071fa5d1/public/index.php(12): yii\base\Application->run()
Pro
5.6.8
5.3.6
Fresh install of Freeform
No response
The text was updated successfully, but these errors were encountered:
Sorry for the delay and the trouble you're experiencing @danielsiemers.
We will investigate this issue shortly. 🙂
Sorry, something went wrong.
Hi @danielsiemers,
This will be resolved in Freeform 5.7.3, which will be available later today. 🙂
Amazing! Will give it a go when this releases.
Thank you @kjmartens!
gustavs-gutmanis
No branches or pull requests
What happened?
I'm experiencing some issues with the stripe webhooks.
When a card is declined and then updated to a card that succeeds, I get a 500 error on the webhook when posting the payment_intent.successful event.
The error occurs in the StripeCallbackService.php file on like 89:
$metadata['type'] = $paymentMethod->type;
It says cannot read attribute type on a string.
This means that this piece of code above:
$paymentIntent = $stripe->paymentIntents->retrieve(
$paymentIntent->id,
['expand' => ['customer', 'payment_method', 'invoice.subscription.plan.product']]
);
Is not actually expanding the payment_method and instead returning the string for the payment id.
Any help here is appreciated, many thanks!
Errors and Stack Trace (if available)
How can we reproduce this?
Requires payment method"
Freeform Edition
Pro
Freeform Version
5.6.8
Craft Version
5.3.6
When did this issue start?
Fresh install of Freeform
Previous Freeform Version
No response
The text was updated successfully, but these errors were encountered: