Stop Recurring Payment

< ? php

$result = array();

$postdata = array(
 'seckey' => 'FLWSECK-798cbb181efc8efc799c2eddc79cb625-X',
 'id' => 'FLW-MOCK-539111aa99835cbbe028b058d4c9e961'
  );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://flw-pms-dev.eu-west-1.elasticbeanstalk.com/merchant/subscriptions/stop");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postdata)); //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
 'Content-Type: application/json',
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$request = curl_exec($ch);

curl_close($ch);
if ($request) {
 $result = json_decode($request, true);
}