Create payment notification from a Stripe payment

I would like to create a payment notification from a specific Stripe purchase that will trigger the following:

https://www.planyo.com/rest/?coupon_id=1444&holder_email=%%user_email%%&holder_name=%%full_name%%&buyer_info=&valid_with_email=true&access_code=&first_day_of_validity=%%YYYY-MM-DD%%&api_key=MY SECRET API KEY&method=generate_coupon

Can someone point me in the right direction as to how this will have to be done?

Could you just hook a function to a WP hook, like user_register, set_user_role or profile_update?

We are selling “Coupons/Membership” using Stripe Pro-Forms. When someone purchase a coupon/membership they are granted access_s2member_level1, but also we have other Coupons that does not change the role or CCAP of the user. I’m thinking this is how it will have to be done https://s2member.com/kb-article/building-an-api-notification-handler-webhook/ but again s2member is really new to me and I don’t know the best way of doing this.

Yes, you will have to do it that way for what you want. I always try to avoid having to do that, as it is much more complicated than simply using regular WP hooks, but it is the method that you are going to have to use.

I’m not sure what other guidance you’re seeking, but maybe you just need to know about WP’s wp_remote_post function: https://codex.wordpress.org/Function_Reference/wp_remote_post

This is way too complicated and I will have to get help from someone that can do this for us. Can you recommend someone that you know will be able to do this? (Send me a PM if you like)

It’s easier just to attract them here by using their handles: @JediShark and @krumch are the obvious candidates for this job.

1 Like

How did you successfully add stripe man… I am having issues. I entered the right live api keys, did all the settings but when i try to check out with stripe it says: TEST MODE.

I did everything i could, have a good ssl on all pages. Still it doesnt work… contacted stripe they say it has to do with s2member…

Does anyone have an idea how i can fix this… my site is www.viragency.com

i desperately need stripe to work… api live keys are 100% correct. SSL WORKS. still stripe gives me the test mode checkout. Sandbox is not turned on in the s2member stripe section either…

Please someone help:)

I understand you are desperate @Bartu , but I do not appreciate when someone is “hi-jacking” a thread like this. Please create your own post and maybe someone will be kind enough to help you.

@Bartu - I respect the opinion that threads should not be hijacked but since I’m here it is easier to answer here than look for another thread you might have created.

It sounds like you have the checkbox on the s2Member page where you set up your Stripe API keys enabled – it says something about using test or sandbox mode.

@hiltennis

Yes, you need to use API notifications to do this. See this KB for examples of how to set this up: https://s2member.com/kb-article/building-an-api-notification-handler-webhook/. That’s how I got started using notifications. :wink:
I’ve used notifications quite a few times for various projects. PM if still feel you need professional assistance.

Hey man appreciate the help. I sent you a message, i think it is to you only. would you mind checking it out?