Forum Replies Created
-
AuthorPosts
-
squiggie
ParticipantI’m struggling to see how this all might tie together. Can you help me visualize the process or walk through the process?
A custom wordpress plugin/app allows affiliates to OAuth to the StreamLabs API and stores their access token and twitch username in the WordPress DB
A Custom Field on the affiliate registration page would allow an affiliate to enter their Twitch Username thus allowing us to associate that twitch username with the access token granted above. I’m assuming these custom fields are stored in the wordpress database right?
—
A user comes to the site based on an affiliate link
They purchase a product
The do_action(‘wpam_process_affiliate_commission’, $args); is triggered
I get the affiliate id by getting it from the cookie $aff_id = $_COOKIE[‘wpam_id’];
With the affiliate_id, I query the custom fields to get the access to twitch username above
With the twitch username, I query the db to get the Streamlabs access token
With the token, I send a request to the StreamLabs api with the Alert Box InformationDoes this make sense? Are my assumptions about the Custom Affiliate Fields correct and are they stored in the DB?
-
AuthorPosts