Purchase Subscription

‘1f2835c54842b41d14117f8fa0058ba6f4f9e41d76d533b2a3b68a189cfddd1c’,
‘merchant_id’ => ‘B2A0E41840410’,
‘contract_id’ => ‘178C8F086B417’,
‘td_email’ => $email,
‘td_first_name’ => ”,
‘td_last_name’ => ”,
‘td_address’ => ”,
‘td_city’ => ”,
‘td_country’ => ”,
‘td_user_data’ => $userId
);

// 12 month coach
$postDataCoach12 = array(
‘api_key’ => ‘1f2835c54842b41d14117f8fa0058ba6f4f9e41d76d533b2a3b68a189cfddd1c’,
‘merchant_id’ => ‘B2A0E41840410’,
‘contract_id’ => ‘1CEDD3F7E529B6’,
‘td_email’ => $email,
‘td_first_name’ => ”,
‘td_last_name’ => ”,
‘td_address’ => ”,
‘td_city’ => ”,
‘td_country’ => ”,
‘td_user_data’ => $userId
);

// 1 month elite
$postDataElite1 = array(
‘api_key’ => ‘1f2835c54842b41d14117f8fa0058ba6f4f9e41d76d533b2a3b68a189cfddd1c’,
‘merchant_id’ => ‘B2A0E41840410’,
‘contract_id’ => ‘19605552AAA0F3’,
‘td_email’ => $email,
‘td_first_name’ => ”,
‘td_last_name’ => ”,
‘td_address’ => ”,
‘td_city’ => ”,
‘td_country’ => ”,
‘td_user_data’ => $userId
);

// 12 month elite
$postDataElite12 = array(
‘api_key’ => ‘1f2835c54842b41d14117f8fa0058ba6f4f9e41d76d533b2a3b68a189cfddd1c’,
‘merchant_id’ => ‘B2A0E41840410’,
‘contract_id’ => ‘289A2221DD34D’,
‘td_email’ => $email,
‘td_first_name’ => ”,
‘td_last_name’ => ”,
‘td_address’ => ”,
‘td_city’ => ”,
‘td_country’ => ”,
‘td_user_data’ => $userId
);

//Make the request to the server
$resultCoach1 = post_to_url(“https://api.swipehq.com/createSubscriptionIdentifier.php”, $postDataCoach1);
$resultCoach12 = post_to_url(“https://api.swipehq.com/createSubscriptionIdentifier.php”, $postDataCoach12);
$resultElite1 = post_to_url(“https://api.swipehq.com/createSubscriptionIdentifier.php”, $postDataElite1);
$resultElite12 = post_to_url(“https://api.swipehq.com/createSubscriptionIdentifier.php”, $postDataElite12);

//If we have encountered an error display something back to the customer.
if ($resultCoach1 === false || $resultCoach12 === false || $resultElite1 === false || $resultElite12 === false) {
echo ‘We have encountered an error!’;
exit;
} else {
$resultCoach1 = json_decode($resultCoach1,1);
$resultCoach12 = json_decode($resultCoach12,1);
$resultElite1 = json_decode($resultElite1,1);
$resultElite12 = json_decode($resultElite12,1);

$idCoach1 = $resultCoach1[‘data’][‘identifier’];
$idCoach12 = $resultCoach12[‘data’][‘identifier’];
$idElite1 = $resultElite1[‘data’][‘identifier’];
$idElite12 = $resultElite12[‘data’][‘identifier’];

echo ‘

Subscription Options

Purchase one of the follow subscription options by clicking on the button

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;

}

// TEST
/* $postDataTest = array(
‘api_key’ => ‘1f2835c54842b41d14117f8fa0058ba6f4f9e41d76d533b2a3b68a189cfddd1c’,
‘merchant_id’ => ‘B2A0E41840410’,
‘contract_id’ => ’40F5D0CA26AC3′,
‘td_email’ => $email,
‘td_first_name’ => ”,
‘td_last_name’ => ”,
‘td_address’ => ”,
‘td_city’ => ”,
‘td_country’ => ”,
‘td_user_data’ => $userId
);

$resultTest = post_to_url(“https://api.swipehq.com/createSubscriptionIdentifier.php”, $postDataTest);
if ($resultTest == false) {
echo “Error with test”;
exit;
} else {
$resultTest = json_decode($resultTest,1);
$idTest = $resultTest[‘data’][‘identifier’];
echo ‘

‘;
} */
} else {
// Not logged in, redirect to log in page
echo “Redirecting to log in page.”;
echo ‘

‘;
}

?>
[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

Download Now For FREE

SwingProfile golf swing analyzer and training aid is a must-have for golfers of all level.

Download on the App Store