Creating Subscription Profiles Programmatically #7138
-
Hello, I'm currently working on a custom module aimed at creating a subscription profile once the payment is successfully processed through the gateway. My plan involves triggering a hook or custom code snippet within the payment gateway callback to generate this subscription profile. Upon reviewing the plugin source code, it appears there's no directly related action hook available for my purpose. To seek guidance and assistance, I've initiated this discussion within the community to see if anyone can provide some hints or insights. Below is a snippet of code within the payment gateway callback function. My aim is to incorporate custom code or a hook within this callback function to programmatically create the subscription profile.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @8verstudio-Chua, Before offering specific guidance, It would be helpful for me to get clarification on your question. Are you looking for assistance in programmatically creating a subscription, or do you need information on hooks you can use to integrate into the donation process? These discussions may have some useful insights for you, as they are closely related to donation actions & payment gateways: Discussion #7108 & Discussion #7049 Any additional context or information you can provide will greatly assist us in offering accurate and relevant information. Thanks! |
Beta Was this translation helpful? Give feedback.
Absolutely, thanks for providing some context. Currently, documentation for subscription's is somewhat limited. However I would suggest checking out our subscription model, which includes useful methods for handling subscriptions. It's fairly straight forward to use. You can find more details in the following link: Subscription.php.