Skip to content

Instantly share code, notes, and snippets.

@easterncoder
Last active April 20, 2020 17:21
Show Gist options
  • Save easterncoder/fde3636211e81bf5837ff8da38d4a6ef to your computer and use it in GitHub Desktop.
Save easterncoder/fde3636211e81bf5837ff8da38d4a6ef to your computer and use it in GitHub Desktop.
WishList Member WebHooks Integration Technical Demo
<?php
file_put_contents( __DIR__ . '/receive.log', print_r( $_POST, true ), FILE_APPEND );
#!/bin/sh
curl \
-H 'Content-type: application/json' \
-d '{"email":"YOUR@EMAIL.XYZ"}' \
'YOUR-WEBHOOK-URL'
<?php
$post_data = array(
'email' => 'YOUR@EMAIL.XYZ',
'username' => '',
'password' => '',
'firstname' => '',
'lastname' => '',
);
$post_data = http_build_query($post_data);
$ch = curl_init( 'YOUR-WEBHOOK-URL' );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post_data );
curl_exec( $ch );
#!/bin/sh
curl \
-d 'email=YOUR@EMAIL.XYZ' \
'YOUR-WEBHOOK-URL'
<!DOCTYPE html>
<html>
<head>
<title>Webhooks Test</title>
<style type="text/css">
input,h1 {
display: block;
width: 50%;
margin: 5px auto;
font-size: 20px;
padding: 10px;
}
</style>
</head>
<body>
<h1>Webhooks Test Form</h1>
<form method="post" action="YOUR-WEBHOOK-URL">
<input type="text" name="email" placeholder="Email Address">
<input type="text" name="username" placeholder="Username (Email will be used if empty)">
<input type="text" name="password" placeholder="Password (Auto-generated if empty)">
<input type="text" name="firstname" placeholder="First Name">
<input type="text" name="lastname" placeholder="Last Name">
<input type="text" name="redirect" placeholder="Redirect URL">
<input type="submit" value="Submit">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment