Apr 19, 2025
0
Level 4
PHPStorm and Stripe warnings
Hi something weird is happening with PHP Storm and Stripe, I have set up a basic php file with Stripe and im getting warning Value should be one of: on things that are correct 2025_04_19_25Cg6ynGX2962qi1STWPcR,
The weird thing is when i updated to the newer version of storm, what was weird was it rebooted, then it lost my current project in recent projects, so i had to open it manually, also it uninstalled some of my plugins, like the Laravel Idea plugin.
<?php
use Stripe\StripeClient;
try {
$stripe = new StripeClient($stripeSecret);
$session = $stripe->checkout->sessions->create([
'payment_method_types' => ['card'],
'line_items' => [[
'price_data' => [ // Hover here - still warning?
'currency' => 'gbp',
'product_data' => [ // Hover here - still warning?
'name' => 'Test Product Minimal',
],
'unit_amount' => 1000, // Hover here - still warning?
],
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => 'https://example.com/success',
'cancel_url' => 'https://example.com/cancel',
]);
echo "Session created: " . $session->id . "\n";
echo "URL: " . $session->url . "\n";
} catch (\Stripe\Exception\ApiErrorException $e) {
echo 'Error: ' . $e->getMessage();
} catch (Exception $e) {
echo 'General Error: ' . $e->getMessage();
}
If i hover over price_data I get:
Value should be one of: "allow_promotion_codes", "enabled", "account", "type", "position", "default_value", "options", "custom", "type", "default_value", "maximum_length", "minimum_length", "default_value", "maximum_length", "minimum_length", "message", "message", "message", "message", "account_tax_ids", "account_tax_ids", "custom_fields", "custom_fields", "description", "footer", "issuer", "metadata", "rendering_options", "rendering_options", "enabled", "maximum", "minimum", "currency", "product", "product_data", "recurring", "tax_behavior", "unit_amount", "unit_amount_decimal", "enabled", "maximum", "minimum", "address", "carrier", "name", "phone", "tracking_number", "amount", "destination", "currency", "mandate_options", "setup_future_usage", "target_date", "verification_method", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "target_date", "mandate_options", "setup_future_usage", "target_date", "setup_future_usage", "expires_after_days", "setup_future_usage", "installments", "request_extended_authorization", "request_incremental_authorization", "request_multicapture", "request_overcapture", "request_three_d_secure", "restrictions", "setup_future_usage", "statement_descriptor_suffix_kana", "statement_descriptor_suffix_kanji", "setup_future_usage", "bank_transfer", "funding_type", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "capture_method", "setup_future_usage", "setup_future_usage", "expires_after_days", "setup_future_usage", "capture_method", "setup_future_usage", "setup_future_usage", "setup_future_usage", "setup_future_usage", "capture_method", "setup_future_usage", "expires_after_days", "setup_future_usage", "setup_future_usage", "tos_shown_and_accepted", "capture_method", "setup_future_usage", "capture_method", "capture_method", "preferred_locale", "reference", "risk_correlation_id", "setup_future_usage", "setup_future_usage", "expires_after_seconds", "setup_future_usage", "capture_method", "mandate_options", "setup_future_usage", "target_date", "setup_future_usage", "reference", "financial_connections", "setup_future_usage", "target_date", "verification_method", "app_id", "client", "setup_future_usage", "delivery_estimate", "display_name", "fixed_amount", "metadata", "tax_behavior", "tax_code", "type", "issuer", "amount_percent", "destination", "end_behavior"
Hope you can help
PhpStorm 2025. Build #PS-251.23774.436, built on April 14, 2025
Please or to participate in this conversation.