Stanley Ukadike
Member
@twisted1919 is it possible to replace plan_uid for already existing price plans with another id. Lets say a plan id from a payment gateway that doesn't allow custom generated ids?
If you are trying to create a user experience that allows to create the plans before the gateway is brought in, then the stripe limitations might be overcome by creating an intermediate table where user created plan IDs and stripe created plan IDs could be matched up.I am creating a subscription based payment gateway extension using sample from the stripe subscription extension. There is a logic to fetch plan and then create plan if plan doesn't exist.
My problem now is the payment gateway doesn't permit you to specify to plan_id when using the create plan api. The plan_id is automatically generated at the gateway.
So the only way the fetch and create plan logic will work is if you can save the gateway generated plan_id to database so it can be used to fetch the previously created plan the next time the function runs.
Is it a bad idea to want to do this?
Exactly the implementation i decided to go with.If you are trying to create a user experience that allows to create the plans before the gateway is brought in, then the stripe limitations might be overcome by creating an intermediate table where user created plan IDs and stripe created plan IDs could be matched up.