$date = date("Y-m-d");
 $expdate = date('Y-m-d', strtotime("+" . $_SESSION['Period'] . " " . $_SESSION['PeriodType'] . ""));
 $param = array('Email' => "{$email}", 'UserName' => "{$UserName}", 'Password' => "{$Password}", 'FirstName' => "{$firstname}", 'LastName' => "{$lastname}", 'StreetAddress' => "{$address}", 'City' => "{$city}", 'State' => "{$state}", 'PostalCode' => "{$postal}", 'Phone' => "{$phone}", 'ExpiryDate' => "{$expdate}", 'PublicationID' => "{$publicationid}", 'SubscriptionPlanID' => "{$planid}");
 $client3 = new soapclient('http://etypeservices.com/Service_SubsciberRegistration.asmx?wsdl');
 $response1 = $client3->SubscriberRegistration($param);
 $xprD = $_POST['cc_exp_yr'] . $_POST['cc_exp_mo'];
 $fullname = $_POST['firstname'] . " " . $_POST['lastname'];
 $mercid = $_POST['MerchantID'];
 $cardnumber = $_POST['ccnumber'];
 $amt = $_POST['amount'];
 $pamt = $_POST['amount'];
 $merckey = $_POST['RegKey'];
 /* send request web service */
 $params = array('PublicationID' => "{$publicationid}", 'SubscriberID' => "{$planid}", 'Mercid' => "{$mercid}", 'MercregKey' => "{$merckey}", 'MercinType' => "1", 'tranCode' => "1", 'CardNumber' => "{$cardnumber}", 'xprDt' => "{$xprD}", 'reqAmt' => "{$amt}", 'fullName' => "{$fullname}", 'addrLn1' => "{$address}", 'city' => "{$city}", 'state' => "{$state}", 'zipCode' => "{$postal}", 'country' => "{$planid}", 'email' => "{$email}", 'indCode' => "1", 'prodType' => "5");
 $clientss = new soapclient('http://etypeservices.com/Service_SaveTransfirstRequest.asmx?wsdl');
 $responsess = $clientss->SavePaymentRequest($params);
 $reqid = $responsess->SavePaymentRequestResult;
 /* end */
 $params1 = array('PublicationID' => "{$pubid}");
 $clients2 = new soapclient('http://etypeservices.com/service_GetPublisherEmail.asmx?WSDL');
 $responses3 = $clients2->GetPublisherEmail($params1);
 $receiver_email = $responses3->GetPublisherEmailResult;
 $torec = $receiver_email;
 $headers = "MIME-Version: 1.0" . "\r\n";
 $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
 $headers .= 'From: Hays Free Press ' . "\r\n";
 $subject = "New subscriber Registration - Hays Free Press ";
 $publname = "Hays Free Press  ";
 class merc
 {
     public $id;