ionos

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