login['username'] = $username; $this->login['password'] = $password; }/*}}}*/ function setOrder($orderid, $orderdescription, $tax, $shipping, $ponumber, $ipaddress, $merchant_defined_field_1, $merchant_defined_field_2, $merchant_defined_field_3, $merchant_defined_field_4, $merchant_defined_field_5 ) {/*{{{*/ $this->order['orderid'] = $orderid; $this->order['orderdescription'] = $orderdescription; $this->order['tax'] = $tax; $this->order['shipping'] = $shipping; $this->order['ponumber'] = $ponumber; $this->order['ipaddress'] = $ipaddress; $this->order['merchant_defined_field_1'] = $merchant_defined_field_1; $this->order['merchant_defined_field_2'] = $merchant_defined_field_2; $this->order['merchant_defined_field_3'] = $merchant_defined_field_3; $this->order['merchant_defined_field_4'] = $merchant_defined_field_4; $this->order['merchant_defined_field_5'] = $merchant_defined_field_5; }/*}}}*/ function setBilling($firstname, $lastname, $company, $address1, $address2, $city, $state, $zip, $country, $phone, $fax, $email, $website) {/*{{{*/ $this->billing['firstname'] = $firstname; $this->billing['lastname'] = $lastname; $this->billing['company'] = $company; $this->billing['address1'] = $address1; $this->billing['address2'] = $address2; $this->billing['city'] = $city; $this->billing['state'] = $state; $this->billing['zip'] = $zip; $this->billing['country'] = $country; $this->billing['phone'] = $phone; $this->billing['fax'] = $fax; $this->billing['email'] = $email; $this->billing['website'] = $website; }/*}}}*/ function setShipping($firstname, $lastname, $company, $address1, $address2, $city, $state, $zip, $country, $email) {/*{{{*/ $this->shipping['firstname'] = $firstname; $this->shipping['lastname'] = $lastname; $this->shipping['company'] = $company; $this->shipping['address1'] = $address1; $this->shipping['address2'] = $address2; $this->shipping['city'] = $city; $this->shipping['state'] = $state; $this->shipping['zip'] = $zip; $this->shipping['country'] = $country; $this->shipping['email'] = $email; }/*}}}*/ // Transaction Functions function doSale($amount, $ccnumber, $ccexp, $cvv="") {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Sales Information $query .= "ccnumber=" . urlencode($ccnumber) . "&"; $query .= "ccexp=" . urlencode($ccexp) . "&"; $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; $query .= "cvv=" . urlencode($cvv) . "&"; // Order Information $query .= "ipaddress=" . urlencode($this->order['ipaddress']) . "&"; $query .= "orderid=" . urlencode($this->order['orderid']) . "&"; $query .= "orderdescription=" . urlencode($this->order['orderdescription']) . "&"; $query .= "tax=" . urlencode(number_format($this->order['tax'],2,".","")) . "&"; $query .= "shipping=" . urlencode(number_format($this->order['shipping'],2,".","")) . "&"; $query .= "ponumber=" . urlencode($this->order['ponumber']) . "&"; $query .= "merchant_defined_field_1=" . urlencode($this->order['merchant_defined_field_1']) . "&"; $query .= "merchant_defined_field_2=" . urlencode($this->order['merchant_defined_field_2']) . "&"; $query .= "merchant_defined_field_3=" . urlencode($this->order['merchant_defined_field_3']) . "&"; $query .= "merchant_defined_field_4=" . urlencode($this->order['merchant_defined_field_4']) . "&"; $query .= "merchant_defined_field_5=" . urlencode($this->order['merchant_defined_field_5']) . "&"; // Billing Information $query .= "firstname=" . urlencode($this->billing['firstname']) . "&"; $query .= "lastname=" . urlencode($this->billing['lastname']) . "&"; $query .= "company=" . urlencode($this->billing['company']) . "&"; $query .= "address1=" . urlencode($this->billing['address1']) . "&"; $query .= "address2=" . urlencode($this->billing['address2']) . "&"; $query .= "city=" . urlencode($this->billing['city']) . "&"; $query .= "state=" . urlencode($this->billing['state']) . "&"; $query .= "zip=" . urlencode($this->billing['zip']) . "&"; $query .= "country=" . urlencode($this->billing['country']) . "&"; $query .= "phone=" . urlencode($this->billing['phone']) . "&"; $query .= "fax=" . urlencode($this->billing['fax']) . "&"; $query .= "email=" . urlencode($this->billing['email']) . "&"; $query .= "website=" . urlencode($this->billing['website']) . "&"; // Shipping Information $query .= "shipping_firstname=" . urlencode($this->shipping['firstname']) . "&"; $query .= "shipping_lastname=" . urlencode($this->shipping['lastname']) . "&"; $query .= "shipping_company=" . urlencode($this->shipping['company']) . "&"; $query .= "shipping_address1=" . urlencode($this->shipping['address1']) . "&"; $query .= "shipping_address2=" . urlencode($this->shipping['address2']) . "&"; $query .= "shipping_city=" . urlencode($this->shipping['city']) . "&"; $query .= "shipping_state=" . urlencode($this->shipping['state']) . "&"; $query .= "shipping_zip=" . urlencode($this->shipping['zip']) . "&"; $query .= "shipping_country=" . urlencode($this->shipping['country']) . "&"; $query .= "shipping_email=" . urlencode($this->shipping['email']) . "&"; $query .= "type=sale"; return $this->_doPost($query); }/*}}}*/ function doAuth($amount, $ccnumber, $ccexp, $cvv="") {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Sales Information $query .= "ccnumber=" . urlencode($ccnumber) . "&"; $query .= "ccexp=" . urlencode($ccexp) . "&"; $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; $query .= "cvv=" . urlencode($cvv) . "&"; // Order Information $query .= "ipaddress=" . urlencode($this->order['ipaddress']) . "&"; $query .= "orderid=" . urlencode($this->order['orderid']) . "&"; $query .= "orderdescription=" . urlencode($this->order['orderdescription']) . "&"; $query .= "tax=" . urlencode(number_format($this->order['tax'],2,".","")) . "&"; $query .= "shipping=" . urlencode(number_format($this->order['shipping'],2,".","")) . "&"; $query .= "ponumber=" . urlencode($this->order['ponumber']) . "&"; // Billing Information $query .= "firstname=" . urlencode($this->billing['firstname']) . "&"; $query .= "lastname=" . urlencode($this->billing['lastname']) . "&"; $query .= "company=" . urlencode($this->billing['company']) . "&"; $query .= "address1=" . urlencode($this->billing['address1']) . "&"; $query .= "address2=" . urlencode($this->billing['address2']) . "&"; $query .= "city=" . urlencode($this->billing['city']) . "&"; $query .= "state=" . urlencode($this->billing['state']) . "&"; $query .= "zip=" . urlencode($this->billing['zip']) . "&"; $query .= "country=" . urlencode($this->billing['country']) . "&"; $query .= "phone=" . urlencode($this->billing['phone']) . "&"; $query .= "fax=" . urlencode($this->billing['fax']) . "&"; $query .= "email=" . urlencode($this->billing['email']) . "&"; $query .= "website=" . urlencode($this->billing['website']) . "&"; // Shipping Information $query .= "shipping_firstname=" . urlencode($this->shipping['firstname']) . "&"; $query .= "shipping_lastname=" . urlencode($this->shipping['lastname']) . "&"; $query .= "shipping_company=" . urlencode($this->shipping['company']) . "&"; $query .= "shipping_address1=" . urlencode($this->shipping['address1']) . "&"; $query .= "shipping_address2=" . urlencode($this->shipping['address2']) . "&"; $query .= "shipping_city=" . urlencode($this->shipping['city']) . "&"; $query .= "shipping_state=" . urlencode($this->shipping['state']) . "&"; $query .= "shipping_zip=" . urlencode($this->shipping['zip']) . "&"; $query .= "shipping_country=" . urlencode($this->shipping['country']) . "&"; $query .= "shipping_email=" . urlencode($this->shipping['email']) . "&"; $query .= "type=auth"; return $this->_doPost($query); }/*}}}*/ function doCredit($amount, $ccnumber, $ccexp) {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Sales Information $query .= "ccnumber=" . urlencode($ccnumber) . "&"; $query .= "ccexp=" . urlencode($ccexp) . "&"; $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; // Order Information $query .= "ipaddress=" . urlencode($this->order['ipaddress']) . "&"; $query .= "orderid=" . urlencode($this->order['orderid']) . "&"; $query .= "orderdescription=" . urlencode($this->order['orderdescription']) . "&"; $query .= "tax=" . urlencode(number_format($this->order['tax'],2,".","")) . "&"; $query .= "shipping=" . urlencode(number_format($this->order['shipping'],2,".","")) . "&"; $query .= "ponumber=" . urlencode($this->order['ponumber']) . "&"; // Billing Information $query .= "firstname=" . urlencode($this->billing['firstname']) . "&"; $query .= "lastname=" . urlencode($this->billing['lastname']) . "&"; $query .= "company=" . urlencode($this->billing['company']) . "&"; $query .= "address1=" . urlencode($this->billing['address1']) . "&"; $query .= "address2=" . urlencode($this->billing['address2']) . "&"; $query .= "city=" . urlencode($this->billing['city']) . "&"; $query .= "state=" . urlencode($this->billing['state']) . "&"; $query .= "zip=" . urlencode($this->billing['zip']) . "&"; $query .= "country=" . urlencode($this->billing['country']) . "&"; $query .= "phone=" . urlencode($this->billing['phone']) . "&"; $query .= "fax=" . urlencode($this->billing['fax']) . "&"; $query .= "email=" . urlencode($this->billing['email']) . "&"; $query .= "website=" . urlencode($this->billing['website']) . "&"; $query .= "type=credit"; return $this->_doPost($query); }/*}}}*/ function doOffline($authorizationcode, $amount, $ccnumber, $ccexp) {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Sales Information $query .= "ccnumber=" . urlencode($ccnumber) . "&"; $query .= "ccexp=" . urlencode($ccexp) . "&"; $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; $query .= "authorizationcode=" . urlencode($authorizationcode) . "&"; // Order Information $query .= "ipaddress=" . urlencode($this->order['ipaddress']) . "&"; $query .= "orderid=" . urlencode($this->order['orderid']) . "&"; $query .= "orderdescription=" . urlencode($this->order['orderdescription']) . "&"; $query .= "tax=" . urlencode(number_format($this->order['tax'],2,".","")) . "&"; $query .= "shipping=" . urlencode(number_format($this->order['shipping'],2,".","")) . "&"; $query .= "ponumber=" . urlencode($this->order['ponumber']) . "&"; // Billing Information $query .= "firstname=" . urlencode($this->billing['firstname']) . "&"; $query .= "lastname=" . urlencode($this->billing['lastname']) . "&"; $query .= "company=" . urlencode($this->billing['company']) . "&"; $query .= "address1=" . urlencode($this->billing['address1']) . "&"; $query .= "address2=" . urlencode($this->billing['address2']) . "&"; $query .= "city=" . urlencode($this->billing['city']) . "&"; $query .= "state=" . urlencode($this->billing['state']) . "&"; $query .= "zip=" . urlencode($this->billing['zip']) . "&"; $query .= "country=" . urlencode($this->billing['country']) . "&"; $query .= "phone=" . urlencode($this->billing['phone']) . "&"; $query .= "fax=" . urlencode($this->billing['fax']) . "&"; $query .= "email=" . urlencode($this->billing['email']) . "&"; $query .= "website=" . urlencode($this->billing['website']) . "&"; // Shipping Information $query .= "shipping_firstname=" . urlencode($this->shipping['firstname']) . "&"; $query .= "shipping_lastname=" . urlencode($this->shipping['lastname']) . "&"; $query .= "shipping_company=" . urlencode($this->shipping['company']) . "&"; $query .= "shipping_address1=" . urlencode($this->shipping['address1']) . "&"; $query .= "shipping_address2=" . urlencode($this->shipping['address2']) . "&"; $query .= "shipping_city=" . urlencode($this->shipping['city']) . "&"; $query .= "shipping_state=" . urlencode($this->shipping['state']) . "&"; $query .= "shipping_zip=" . urlencode($this->shipping['zip']) . "&"; $query .= "shipping_country=" . urlencode($this->shipping['country']) . "&"; $query .= "shipping_email=" . urlencode($this->shipping['email']) . "&"; $query .= "type=offline"; return $this->_doPost($query); }/*}}}*/ function doCapture($transactionid, $amount =0) {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Transaction Information $query .= "transactionid=" . urlencode($transactionid) . "&"; if ($amount>0) { $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; } $query .= "type=capture"; return $this->_doPost($query); }/*}}}*/ function doVoid($transactionid) {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Transaction Information $query .= "transactionid=" . urlencode($transactionid) . "&"; $query .= "type=void"; return $this->_doPost($query); }/*}}}*/ function doRefund($transactionid, $amount = 0) {/*{{{*/ $query = ""; // Login Information $query .= "username=" . urlencode($this->login['username']) . "&"; $query .= "password=" . urlencode($this->login['password']) . "&"; // Transaction Information $query .= "transactionid=" . urlencode($transactionid) . "&"; if ($amount>0) { $query .= "amount=" . urlencode(number_format($amount,2,".","")) . "&"; } $query .= "type=refund"; return $this->_doPost($query); }/*}}}*/ function _doPost($query) {/*{{{*/ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://secure.networkmerchants.com/api/transact.php"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $query); curl_setopt($ch, CURLOPT_POST, 1); if (!($data = curl_exec($ch))) { return ERROR; } curl_close($ch); unset($ch); //print "\n$data\n"; $data = explode("&",$data); for($i=0;$iresponses[$rdata[0]] = $rdata[1]; } return $this->responses['response']; }/*}}}*/ function getIP(){ $tmp = getenv("HTTP_CLIENT_IP"); if ( $tmp && !strcasecmp( $tmp, "unknown")) return $tmp; $tmp = getenv("HTTP_X_FORWARDED_FOR"); if( $tmp && !strcasecmp( $tmp, "unknown")) return $tmp; // no sense in testing SERVER after this. // $_SERVER[ 'REMOTE_ADDR' ] == gentenv( 'REMOTE_ADDR' ); $tmp = getenv("REMOTE_ADDR"); if($tmp && !strcasecmp($tmp, "unknown")) return $tmp; return("unknown"); } } ?>{"id":2,"date":"2024-02-23T20:40:27","date_gmt":"2024-02-23T20:40:27","guid":{"rendered":"https:\/\/synergyis.info\/?page_id=2"},"modified":"2024-02-23T20:40:27","modified_gmt":"2024-02-23T20:40:27","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/synergyis.info\/?page_id=2","title":{"rendered":"Sample Page"},"content":{"rendered":"\n

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\n\n\n\n

Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin’ caught in the rain.)<\/p><\/blockquote>\n\n\n\n

…or something like this:<\/p>\n\n\n\n

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.<\/p><\/blockquote>\n\n\n\n

As a new WordPress user, you should go to your dashboard<\/a> to delete this page and create new pages for your content. Have fun!<\/p>\n","protected":false},"excerpt":{"rendered":"

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\n

\n

Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack,<\/p>\n<\/blockquote>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"yoast_head":"\nSample Page - test site<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/synergyis.info\/?page_id=2\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sample Page - test site\" \/>\n<meta property=\"og:description\" content=\"This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/synergyis.info\/?page_id=2\" \/>\n<meta property=\"og:site_name\" content=\"test site\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/synergyis.info\/?page_id=2\",\"url\":\"https:\/\/synergyis.info\/?page_id=2\",\"name\":\"Sample Page - test site\",\"isPartOf\":{\"@id\":\"https:\/\/synergyis.info\/#website\"},\"datePublished\":\"2024-02-23T20:40:27+00:00\",\"dateModified\":\"2024-02-23T20:40:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/synergyis.info\/?page_id=2#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/synergyis.info\/?page_id=2\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/synergyis.info\/?page_id=2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/synergyis.info\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sample Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/synergyis.info\/#website\",\"url\":\"https:\/\/synergyis.info\/\",\"name\":\"test site\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/synergyis.info\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sample Page - test site","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/synergyis.info\/?page_id=2","og_locale":"en_US","og_type":"article","og_title":"Sample Page - test site","og_description":"This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack,","og_url":"https:\/\/synergyis.info\/?page_id=2","og_site_name":"test site","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/synergyis.info\/?page_id=2","url":"https:\/\/synergyis.info\/?page_id=2","name":"Sample Page - test site","isPartOf":{"@id":"https:\/\/synergyis.info\/#website"},"datePublished":"2024-02-23T20:40:27+00:00","dateModified":"2024-02-23T20:40:27+00:00","breadcrumb":{"@id":"https:\/\/synergyis.info\/?page_id=2#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/synergyis.info\/?page_id=2"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/synergyis.info\/?page_id=2#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/synergyis.info\/"},{"@type":"ListItem","position":2,"name":"Sample Page"}]},{"@type":"WebSite","@id":"https:\/\/synergyis.info\/#website","url":"https:\/\/synergyis.info\/","name":"test site","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/synergyis.info\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/synergyis.info\/index.php?rest_route=\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/synergyis.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/synergyis.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/synergyis.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/synergyis.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2"}],"version-history":[{"count":0,"href":"https:\/\/synergyis.info\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions"}],"wp:attachment":[{"href":"https:\/\/synergyis.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}