• I have created a payment gateway which works fine, however I need to implement subscription payment with auto renewal option using saved card.
    I need to implement similar to stripe, anyone help me I am using this hook “scheduled_subscription_payment”.

    Thanks

    • This topic was modified 3 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    A payment gateway for? Woo? Stand alone?

    Thread Starter LPS Technical Team

    (@sivadss028)

    I have created the plugin for our payment gateway for woocommerce. this is working fine for one time checkout.

    I am trying to extend the plugin to work with woocommerce subscription by saving card tokens then attempting recurring payments automatically.

    I am using “scheduled_subscription_payment” hook to fire renewal order, when it fires I need use my saved card token to call the payment gateway.

    I need assistance on how to save the card token and use it on recurring call on the above web hook.

    I have already checked the stripe plugin and which is working fine. I just need the same functionality where saved cards is used on a recurring payment (reference link: https://docs.woocommerce.com/document/subscriptions/develop/payment-gateway-integration/)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I recommend asking at https://wordpress.org/support/plugin/woocommerce/#new-post so the plugin’s developers and support community can help you with this.

    Moderator bcworkz

    (@bcworkz)

    Generally speaking (not specific to WooCommerce), you can store user information in the usermeta table. You can schedule tasks to execute at regular intervals with wp_schedule_event(). For example, your task could query for users who have subscribed, whose last payment date is older than the subscribed interval. Then process a payment for each user found and update their last payment date.

    For WooCommerce specific aspects, I second what Steven recommended ^^^

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Payement Gateway development’ is closed to new replies.