DELAVO & WP PLUGIN authorization

Article Tools

You can connect WordPress plugin with DELAVO so only authorised members of a specific membership can use the plugin. Here is how to do that:

First create an API record for the membership.

Each API record has a gate id and secret key against which the membership’s members are subscribed.

So the plugin will need to ping that url using the CURL library and supply the username and password. In return DELAVO reports a ‘Success’ or an or error value.

Refer to the API documentation for the complete DELAVO API instructions.

Below is listed a sample PHP code you can use.

//get all categories and verify the login one by one.
//sample DELAVO membership url for testing:

$pwdurl = str_replace("<EMAIL>", $user, $pwdurl);
$pwdurl = str_replace("<PASSWORD>", $pass, $pwdurl);

if($pwdurl != null)
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $pwdurl);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$resp = strtolower( curl_exec( $ch ) );
if ( strpos( trim( strtoupper($resp) ), "SUCCESS" ) === false )
$isvalid = 0;
$isvalid = 1;
header("location: memberlogin.php?status=".base64_encode("loginfailed"));

Previous postUsing DELAVO for sales via forums, etc. Next postAweber integration

Related Posts