ionos

Wednesday, December 10, 2014

How to Fix the 500 Internal Server Error on Your WordPress?


1.Checking for Corrupt .htaccess File

The first thing you should do when troubleshooting the internal server error in WordPress is check for the corrupted .htaccess file. You can do so by renaming your main .htaccess file to something like .htaccess_old. To rename the .htaccess file, you will need to login to your site using the FTP. Once you are in, the .htaccess file will be located in the same directory where you will see folders like wp-content, wp-admin, and wp-includes. Once you have renamed the .htaccess file, try loading your site to see if this solved the problem. If it did, then give yourself a pat on the back because you fixed the internal server error. Before you move on with other things, make sure that you go to Settings » Permalinks and click the save button. This will generate a new .htaccess file for you with proper rewrite rules to ensure that your post pages do not return a 404.

2.Increasing the PHP Memory Limit

  • Create a blank text file called php.ini
  • Paste this code in there: memory=64MB
  • Save the file
  • Upload it into your /wp-admin/ folder using FTP

3.Deactivate all Plugins

4.Re-uploading Core Files

re-uploading the wp-admin and wp-includes folder from a fresh WordPress install.

Monday, March 31, 2014

MIGS Gateway integration


  • Integration is very simple.
  • Need two accounts on for test and other for Production/live.
  • we need Migs Merchant ID ,Migs AccessCode, and Migs Signature for implementing the payment gateway in our website
After submiting the Buy button we need to validate the details provided by the user after the validation insert those details to DB and in the server side we need to generate the url that we need to post the details
/*"vpc_AccessCode" the accesscode given by Migs
"vpc_Amount" Amount that is multiplied by 100
"vpc_Command" ='pay',default pay
"vpc_Locale" = 'en' // language
"vpc_MerchTxnRef" orderId // Should be Unique for each payment
"vpc_Merchant" // your merchant ID
"vpc_OrderInfo" // Description/details of Product
"vpc_ReturnURL" // SuccessUrl
"vpc_Version" = '1'
&vpc_SecureHash = // create MD5 of all the values that are passed */

form action="http://abcd.com/migs159-2/" method="post">
input type="hidden" maxlength="250" name="virtualPaymentClientURL" size="65" value="https://migs.mastercard.com.au/vpcpay"
input type="hidden" maxlength="8" name="vpc_Version" size="20" value="1"
input id="vpc_Command" type="hidden" name="vpc_Command" value="pay"
input type="hidden" maxlength="16" name="vpc_Merchant" size="20" value="TESTGTB815073A36"
input type="hidden" maxlength="8" name="vpc_AccessCode" size="20" value="72DC6O95"
input id="vpc_MerchTxnRef" type="hidden" name="vpc_MerchTxnRef" value="test1234/1"
input id="vpc_OrderInfo" type="hidden" name="vpc_OrderInfo" value="trst"
input id="vpc_Amount" type="hidden" name="vpc_Amount" value=""
input id="vpc_Currency" type="hidden" name="vpc_Currency" value="USD"
input type="hidden" maxlength="250" name="vpc_ReturnURL" size="65" value="https://abcd.com"
input id="btnPay" type="submit" name="btnPay" value="Register with GTPay" style="background:#999" /
/form

Sunday, January 19, 2014

WorldPay Payment Gateway integration


WorldPay integration code

WorldPay provides a globally connected, locally coordinated payment processing service for all sorts of businesses like big,small and mid size.WorldPay help you collect payments securely, swiftly and with total confidence.

WorldPay Benefits:

  • Global support
  • Secure and reliable
  • Responsive and proactive
  • Improve your cash flow, as you control how often you receive money
  • Helps you minimise your risk of exposure to fraud
  • Experience in helping companies involved in retail, mail order and online businesses.

WorldPay Code

form action="https://secure-test.worldpay.com/wcc/purchase" name="BuyForm" method="POST"
input type="hidden" name="instId" value="211616"
input type="hidden" name="cartId" value="abc123"
input type="hidden" name="currency" value="GBP"
input type="hidden" name="amount" value="120"
input type="hidden" name="desc" value=""
input type="hidden" name="testMode" value="100"

Authorize.Net integration in PHP




Authorize.Net Advanced Integration Method (AIM):

Start PHP code
$post_url = "https://test.authorize.net/gateway/transact.dll";
$post_values = array(
// the API Login ID and Transaction Key must be replaced with valid values
"x_login" => "API_LOGIN_ID",
"x_tran_key" => "TRANSACTION_KEY",
"x_version" => "3.1",
"x_delim_data" => "TRUE",
"x_delim_char" => "|",
"x_relay_response" => "FALSE",
"x_type" => "AUTH_CAPTURE",
"x_method" => "CC",
"x_card_num" => "4111111111111111",
"x_exp_date" => "0115",
"x_amount" => "19.99",
"x_description" => "Sample Transaction",
"x_first_name" => "John",
"x_last_name" => "Doe",
"x_address" => "1234 Street",
"x_state" => "WA",
"x_zip" => "98004"
);
// This section takes the input fields and converts them to the proper format
// for an http post. For example: "x_login=username&x_tran_key=a1B2c3D4"
$post_string = "";
foreach( $post_values as $key => $value )
{ $post_string .= "$key=" . urlencode( $value ) . "&"; }
$post_string = rtrim( $post_string, "& " );
$request = curl_init($post_url); // initiate curl object
curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.
$post_response = curl_exec($request); // execute curl post and store results in $post_response
curl_close ($request); // close curl object
// This line takes the response and breaks it into an array using the specified delimiting character
$response_array = explode($post_values["x_delim_char"],$post_response);
The results are output to the screen in the form of an html numbered list.
echo "
    \n";

foreach ($response_array as $value)
{
echo "

  • " . $value . " 
  • \n";
    }
    echo "
    \n";
    End PHP here

    Saturday, January 18, 2014

    PaySimple Payment Gateway integration



    PaySimple provides:

    • Payment Acceptance
    • Billing and Invoicing Automation
    • Mobile Payments & Management
    • Customer Management
    • Unlimited recurring billing schedules
    • mobile app
    You'll have all the tools you need at your fingertips to simplify how you operate your business.

    Steps to create PaySimple payment form:

    • 1.login into your PaySimple dashboard
    • 2.Click "settings" tabs at top.
    • 3.Click on "Web Payment Pages"
    • 3.Click on " Add New Payment Form"
    • Fill up the payment form and save it
    • Copy the URL from the link and paste it into any webpage
    The web payment page is a secure webpage that your customers can use to make payments or pay bills online.Copy the URL from the link and paste it into any webpage in your website to link to the payment form you created.

    Saturday, January 11, 2014

    How to manually specify the current active page with wp_nav_menu()

    Wordpress wp_nav_menu Code

    wp_nav_menu(array('theme_location' =>'primary','menu_class' => 'navigation'))
    "functions.php" is stored with each Theme in the Theme's subdirectory in wp-content/themes.
    Each theme has its own functions file, but only the "functions.php" in the active Theme affects how your site publicly displays. If your theme already has a functions file, you can add code to it. If not, you can create a plain-text file named "functions.php" to add to your theme's directory.

    Wordpress active page Code

    add_filter('nav_menu_css_class', 'add_active_class', 10, 2 );
    function add_active_class($classes, $item) {
    if( $item->menu_item_parent == 0 && in_array('current-menu-item', $classes) ) {
    $classes[] = "active";
    }
    return $classes;
    }

    Featured Post

    Payza integration

    Payza's Advanced Button in HTML Using simple HTML, you can integrate easily with Payza.Generate buttons and manage payment details f...

    Most Popular