Please post all pre-sales questions of all products on this forum

Membership Pro to Web api

More
8 years 11 months ago #83111 by Hanz0
Membership Pro to Web api was created by Hanz0
Hello,

Membership Pro can send settings for subscription plan to a specific URL into a specific Web API ?

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #83121 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership Pro to Web api
Hi

Could you please explain more details about your requirement? It is not very clear to me, so I could not answer this question

Tuan

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #83148 by Hanz0
Replied by Hanz0 on topic Membership Pro to Web api
Hello,

Example :
- I have a Web API for my service and I can create user with a simplified url like this :
yourservice.com/api2/accounts/newaccount@gmail.com/

My question is : there is a system in Membership Pro to put this url somewhere to communicate with my service and create automaticaly an account (bridge) ?

Thanks in advance for your answer.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #83159 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership Pro to Web api
Hi Gaspard

Membership Pro doesn't support this feature out of the box. However, you can write code (PHP code in this case) to communicate and put it into PHP Script plugin membershipprodoc.joomservices.com/miscel...lugins/script-plugin

The idea is that each time someone subscribe for a subscription plan, you can run that PHP code you want to create account for him on your service (external website)

It does requires some programming, however.

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #83197 by Calum
Replied by Calum on topic Membership Pro to Web api
if it was purely as simple as accessing a URL like you provided... (Surely thats a security flaw on so many levels!?)
yourservice.com/api2/accounts/newaccount@gmail.com/

In the Plugin (see the documents Tuan linked to) you'd put this in the onMembershipActive function you'd put
Code:
public function onMembershipActive($row) { $email = $row->email ; $url = "http://yourservice.com/api2/accounts/"; $url .= $row->email . "/"; $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, $url); $result = curl_exec ($curl); curl_close ($curl); return; }
The following user(s) said Thank You: Tuan Pham Ngoc

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham NgocGiang Dinh TruongMr. Dam