Category: api

How to complete my stripe payment with symfony and intent payment API?

I try to put stripe on my website, it takes the payment but it still incomplete be cause “the customer doesn’t have payement methods”. I dont understand how to resolve this issue. public function stripeAction(Request $request) { StripeStripe::setApiKey(‘sk_test_UYs0lRfiKXpBymFf0Qlp2BOe00c5XJG5q1’); $paymethod =…

Command and Controller shared data, using Symfony and Mercure for realtime?

1. The controller. I have a Controller Action (than is an API), which loads currency rates from the database, does some processing, and returns a result in JSON, like this: { “EUR”: “186.34”, “GEL”: “646.77”, “PLN”: “839.16”, “RUB”: “14532.60”, “USD”:…

Api plateform get null value

I am looking for a solution to recover data in get according to a parameter which is null (user): { “@context”: “/api/contexts/ShippingCost”, “@id”: “/api/shipping_costs”, “@type”: “hydra:Collection”, “hydra:member”: [ { “@id”: “/api/shipping_costs/1”, “@type”: “ShippingCost”, “id”: 1, “minWeight”: 0, “maxWeight”: 251, “france”:…

How to set normalization groups based on user’s role and request method

I am creating a sandbox app as Api-platform practice and I have the following problem to address: Let’s consider following REST endpoint for user entity: DISCLAIMER in the code examples there are a little more attributes but the whole concept…