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;
    }

    Monday, December 30, 2013

    Input type validation using Regular Expression

    Three letter country code validation

    input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code"

    Email address validation

    ^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$

    Date validation[yyyy-mm-dd]

    ^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$
    Regular Expression Description
    [abc] Any character between the brackets
    [^abc] Any character not between the brackets
    [0-9] Any digit between the brackets
    [^0-9] Any digit not between the brackets
    (x|y) Any of the alternatives specified
    [a-z] Any character from lowercase a to z
    [A-Z] Any character from lowercase A to Z
    [^a-zA-Z] Any string not containing any of the characters ranging from a-z and A-Z.
    ^.{2}$ It matches any string containing exactly two characters.

    Change body background image using javascript

    Put the java script between head tag.Create a folder "images" and keep all the images in that folder

    HTML Code

    img id="imgRotator" src="" alt="" height="470" width="600"/

    Start Script

    script type="text/javascript"
    var picPaths = ['images/pic1.jpg','images/pic2.jpg','images/pic3.jpg','images/pic4.jpg'];
    var oPics = [];
    for(i=0; i < picPaths.length; i++){
    oPics[i] = new Image();
    oPics[i].src = picPaths[i];
    }
    curPic = Math.floor(Math.random()*oPics.length);
    window.onload=function(){
    document.getElementById('imgRotator').src = oPics[curPic].src;
    }

    End script


    Saturday, December 21, 2013

    Moneybookers Payment Gateway integration in php


    Moneybookers Payment Gateway.

    Moneybookers provide an easily customizable payment gateway that can be implemented without much headache.
    You just need to create two accounts on Moneybookers
    • Merchant
    • Buyer.
    Send a request to Moneybookers to convert these accounts into test accounts (for testing purpose). This is a manual process as Moneybookers provide no sandbox account like PayPal. After your account has been approved as test account, you can use it for transactions in your website. Moneybookers payment gateway integration code:

    ***Change merchant email,status URL,amount,currency & description fields as per your requirements

    ******Start HTML form
    form action="https://www.moneybookers.com/app/payment.pl" method="post"
    input type="hidden" name="pay_to_email" value="merchant-email@example.com"/
    input type="hidden" name="status_url" value="http://example.com/success.php"/
    input type="hidden" name="language" value="EN"/
    input type="hidden" name="amount" value="Total amount (e.g. 120.0)"/
    input type="hidden" name="currency" value="Currency code (e.g. USD)"/
    input type="hidden" name="detail1_description" value="Your description"/
    input type="hidden" name="detail1_text" value="License"/
    input type="submit" value="Pay Via Moneybookers!"/
    End of the ******form

    Thursday, December 19, 2013

    Payza integration


    Payza's Advanced Button in HTML

    Using simple HTML, you can integrate easily with Payza.Generate buttons and manage payment details from your Payza account with Standard Integration. No advanced technical knowledge needed. Create one-time or recurring payment buttons by customizing your buttons using Advanced Integration


    form method="post" action="https://secure.payza.com/checkout"
    input type="hidden" name="ap_merchant" value="apdevforum@gmail.com"/
    input type="hidden" name="ap_purchasetype" value="item-goods"
    input type="hidden" name="ap_itemname" value="MP3 Player"
    input type="hidden" name="ap_amount" value="50"
    input type="hidden" name="ap_currency" value="USD"
    input type="hidden" name="ap_quantity" value="1"
    input type="hidden" name="ap_itemcode" value="XYZ123"
    input type="hidden" name="ap_description" value="Lorem ipsum."
    input type="hidden" name="ap_returnurl" value="http://www.example.com/thankyou.html"
    input type="hidden" name="ap_cancelurl" value="http://www.example.com/cancel.html"
    input type="hidden" name="ap_taxamount" value="2.49"
    input type="hidden" name="ap_additionalcharges" value="1.19"
    input type="hidden" name="ap_shippingcharges" value="7.99"
    input type="hidden" name="ap_discountamount" value="4.99"
    input type="hidden" name="apc_1" value="Blue"
    input type="image" src="https://www.payza.com/images/payza-buy-now.png"
    /form>

    How to integrate Payza in wordpress?

    Easy integration of Payza payments / AlertPay payments to your WordPres Website. You can configure all options on WP Admin interface.

    Installation:

    Unzip the plugin and copy the payza-payments folder to your wp-content/plugins folder or install from wordpress.org repository and activate the plugin.

    Setting up the plugin

    • install the plugin in your WordPress Website
    • sign-up for a Payza account and verify it
    • enter API data on the plugin configuration page
    • set IPN URL in your Payza account
    • create your buttons with shortcodes


    Integrate Payza using WooCommerce Extension

    Payza is a money transfer service which allows customers to pay you using their E-Wallet. Customers are redirected to the secure Payza servers for payment, and then redirected back to your site after paying, relieving you of the need for a SSL certificate for your server. Merchants like Payza for the ease and convenience of accepting payment, customers prefer Payza because they know their financial details will be safe and secure.

    Installation

    • Buy this extension
    • Download and install into your WooCommerce store
    • Enter your Payza Live email on the settings page and save
    • Now you can easily transfers money

    Note:

    For more details please visit http://docs.woothemes.com/document/payza/

    PayPal Integration


    PayPal Buy Now Button

    If you know HTML you can avoid the Button Factory and create your own “Buy Now” buttons by changing the HTML code directly. The sample code below shows the minimum information you need to create a Buy Now button (in this case, to purchase a teddy bear).

    Sample URL Code for a Buy Now Email Payment Link

    You can write down your own URL for “Buy Now” payment links.
    The same variables and values that you include in HTML code for Buy Now buttons can be used in Buy Now email payment links. Separate the variables and their values from each other with ampersands (&). Do not include values in quotation marks; use plus signs (+) as substitutes for spaces in values, if needed.
    Note:
    You cannot include variables for option fields in email payment links. You can use the following URL as a starting point for writing your own URL for Buy Now email payment links. The value for the business variable should be a valid id of your PayPal account. You can change the values for other variables as per your requirements.

    Example 1 URL for a Buy Now Email Payment Link

    https://www.paypal.com/_xclick/business=me@mybusiness.com&item_name=Baseball&item_number=123&amount=120&currency_code=USD&undefined_quantity=1


    Set Up a PayPal Shopping Cart

    1. Go to http://www.paypal.com/
    2. Mouse over the "Get Paid" option in the menu and then click on "Accept Credit Cards"
    3. Click on the "Setting Up" tab
    4. Click on "set up your button"
    Once you're in the button builder you can customize lots of options on your form, including:
    • Change it to an "add to cart" button so that customers can shop for multiple items
    • Accept donations, set up subscriptions, or sell gift certificates
    • Use item IDs to have Paypal help you with your inventory
    • Change currencies or set up multiple prices
    • Add in shipping fees and taxes
    • Most importantly have Paypal use a Merchant ID for your transactions, so your email address is secure.
    • Customize checkout pages
    • And other options
    Once you're done choosing all the options, click on the "Save Changes" button. Then just paste the code that is generated into your website where you put the cart button.

    PayPal Shopping Cart Code

    Wednesday, December 11, 2013

    Paymall Payment Gateway Integration


    Paymall Payment Gateway(Code)

    How to integrate PAYMALL?

    Steps:

    • Create the HTML form:
    • Integrate the HTML form with below PHP code.It will working fine.


    Amount:
    Currency:

    Card Details


    Name On Card:
    Card Number:
    CardExpiration Date:
    Card Validation Value:

    Billing Info Details


    First Name:


    Last Name:

    Address Line1:

    Address Line2:

    City:

    State:

    Country:

    Postal Code:


    PHP Code:

    Note:-isset($_POST['paymall'])//////Here "paymall" is submit button name

    if(isset($_POST['paymall'])) {

    function do_post_request($url, $data, $optional_headers = null){
    $params = array('http' => array('method' => 'POST','content' => http_build_query($data),));
    if ($optional_headers !== null) {
    $params['http']['header'] = $optional_headers; }
    $ctx = stream_context_create($params);
    $fp = @fopen($url, 'rb', false, $ctx);
    if (!$fp) {
    throw new Exception("Problem with $url, $php_errormsg"); }
    $response = @stream_get_contents($fp);
    if ($response === false) {
    throw new Exception("Problem reading data from $url, $php_errormsg");}
    parse_str($response, $output); return $output;}

    The mp_IsTestTrans value must be changed to 'False' when the mp_AuthenticationID/mp_AuthenticationPassword test account values are replaced with values for a live account

    $postdata = array(
    'mp_APIVersion' => '2.0',
    'mp_IsTestTrans' => 'False', Live account
    'mp_AuthenticationID' => 'xxxxxxx' , Enter your AuthenticationID
    'mp_AuthenticationPassword' => 'xxxxxxx', Enter your AuthenticationPassword
    'mp_ConfigID' => '1',
    'mp_MessageRequestType' => 'Sale',
    'mp_TransClearingAction' => 'Capture',
    'mp_IsCardPresent' => 'False',
    'mp_PaymentMethod' => 'CreditCard',
    'mp_CardNumber' => $_REQUEST['mp_CardNumber'],
    'mp_NameOnCard' => $_REQUEST['mp_NameOnCard'],
    'mp_CardExpirationDate' => $_REQUEST['mp_CardExpirationDate'],
    'mp_CardValidationValue' => $_REQUEST['mp_CardValidationValue'],
    'mp_TotalAmount' => $_REQUEST['mp_TotalAmount'],
    'mp_CurrencyCode' => 'USD',
    'mp_OrderNumber' => '5678',
    'mp_BillingFirstName' => $_REQUEST['mp_BillingFirstName'],
    'mp_BillingLastName' => $_REQUEST['mp_BillingLastName'],
    'mp_BillingAddressLine1' => $_REQUEST['mp_BillingAddressLine1'],
    'mp_BillingCity' => $_REQUEST['mp_BillingCity'],
    'mp_BillingState' => $_REQUEST['mp_BillingState'],
    'mp_BillingPostalCode' => $_REQUEST['mp_BillingPostalCode'],
    'mp_BillingCountryCode' => $_REQUEST['mp_BillingCountryCode'],
    'mp_CustomerIPAddress' => $_SERVER['REMOTE_ADDR'],
    );
    $result = do_post_request('https://gateway.mtrex.com/omega.mp',$postdata);
    echo "Customer Name:".$_REQUEST['mp_BillingFirstName']."".$_REQUEST['mp_BillingLastName'];
    echo "
    ";
    echo "Your Transaction ID:".$result['mp_TransID']."\n";
    echo "
    ";
    echo "Transaction Result:".$result['mp_TransResult']."\n";
    echo "
    ";
    echo "Transaction Result:".$result['mp_TransResultMessage']."\n";
    echo "
    ";
    }
    ?> End Here

    GSPAY Gateway Integration(PHP Code)


    GSPAY Gateway Integration

    GSPAY provides a credit card payment gateway allowing you to clear all major credit cards against very competitive rates. We provide dependable Merchant Account Services. If you use the GSPAY you will benefit of a substantial sales increase, as well as lower costs. GSPAY offers these solutions in integrated packages that will perfectly adjust to your company requirements, in any field of work. We processes for both low-risk and high-risk merchant accounts. We set your rates as determined by your type of business. "Low risk" businesses such as web hosting qualify for a lower rate, whereas a “High risk” business such as travel merchant account has higher rates. A business is generally classified as high risk when both its chargeback potential and the likelihood that it will shut its doors and disappear over-night are considered high based on the history of that type of business. Whether a business is considered high-risk by GSPAY and our banks depends on on many variables. For high volume merchants GSPAY provide XML API interface for direct credit card transactions processing.

    GSPAY Benefits:-

    1.Support shopping cart systems: OSCommerce, CubeCart, X-cart, ZenCart, Shop-Script, Virtuemart, Magento

    2.Visa and Mastercard SecureCode available

    3.Quick online payment implementation

    4.Acceptance of the main credit card types

    5.Secure Server (SSL certificate)

    6.Customized shopping cart and order page design

    7.Immediate integration with your website

    8.Every country is welcome

    9.Powerful Marketing Tools

    10.Recurring billing supported as well as free demo for your clients

    GSPAY PHP Code

    "The E Check" Gateway Integration(PHP Code)

    echeck payment gateway integration in php 
    how to integrate ACH and electronic checks in your website
    echeck merchant account



    First Name
    Last Name
    Address
    City
    State
    Zip Code
    Phone
    Email
    Bank Account Number
    Routing Number
    Plan
    Amount


    //create array of data to be posted

    $post_data['security_key'] = 'xxxxxxxxxx'; // Insert your security key here
    $post_data['purchaser_firstname'] = $_REQUEST['fname'];
    $post_data['purchaser_lastname'] = $_REQUEST['lname'];
    $post_data['purchaser_address'] = $_REQUEST['address'];
    $post_data['purchaser_city'] = $_REQUEST['city'];
    $post_data['purchaser_state'] = $_REQUEST['state'];
    $post_data['purchaser_zipcode'] = $_REQUEST['zip'];
    $post_data['purchaser_phone'] = $_REQUEST['phone'];
    $post_data['purchaser_email'] = $_REQUEST['email'];
    $post_data['transaction_amount'] = $_REQUEST['amount'];
    $post_data['purchaser_ip'] = $_SERVER["REMOTE_ADDR"];
    $post_data['purchaser_account'] = $_REQUEST['paccount']; // The test account number is 000000
    $post_data['purchaser_routing'] = $_REQUEST['prouting']; // The test routing number is 011000015
    foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; }

    //create the final string to be posted using implode()

    $post_string = implode ('&', $post_items);

    //create cURL connection

    $curl_connection = curl_init('https://theecheck.com/backoffice/api/api.php');

    //set options

    curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); // Must be set to recieve transaction
    curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);

    //set data to be posted

    curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);

    //perform our request

    $result = curl_exec($curl_connection); // Catches the result from the request into a variable
    echo "Transaction Result: " . $result . "

    ";

    //show information regarding the request

    print_r(curl_getinfo($curl_connection)); information regarding the CURL request
    echo curl_errno($curl_connection) . '-' . curl_error($curl_connection);

    //close the connection

    curl_close($curl_connection);
    }

    Monday, December 2, 2013

    PHP code sample for Secure Web Pay Checkout

    Payments Gateway(is now FORTE)

    Secure Web Pay(SWP)Checkout allows you to call the Payments Gateway payment form for entering and securely submitting transaction information.You can customize the look and feel of the form by either selecting a predefined form style in the Virtual Terminal(VT) or passing in fields along with the call.
    URLs
    Sandbox:https://sandbox.paymentsgateway.net/swp/co/default.aspx
    Live:https://swp.paymentsgateway.net/co/default.aspx

    Saturday, November 30, 2013

    Importing your products using CSV file

    Currently shopify support CSV imports, either through an application or in the admin. xml file uploads, would not be supported.

    When importing products, Shopify does all the work for you. Instead of creating each product one at-a-time, Shopify extracts data from CSV file and turns them into products in your Shopify store.

    1) If you are creating your CSV file from scratch, click the Download a sample CSV template to see an example of the format required link. 
    2) Make sure to match the order on that CSV file to yours so that it can be successfully uploaded to Shopify. 
    3) Save your CSV file somewhere on your computer.
    4) Back in your shop admin, click on the Import products by CSV link.
    5)Click the Choose File button.
    6) Locate your CSV file, then click the Open button and on the "Import product by CSV" page, click the Upload file button.

    If your CSV file was successfully uploaded you should recieve an email from Shopify to the email account used to setup your Shopify store, saying that the process was successful.
     

    Monday, November 18, 2013

    Product collection

    Create Product Collection/Catagory:-

    • Go to shopify admin
    • Click the collections tab
    • Add collection
    • fill the collection page like name,description,Select products,Search engine information & select Visibility to visible
    • Click the SAVE button.
    • To add a new product in your store,just select the collection name & the product is added to that collection



    Product:Shopify store


    Add New Product:Shopify store

    Here are the steps to add a product to Shopify:

    1. Describe your product

    • From your shop admin, go to the Products tab.
    • From the Products tab, click the Add product button. Put the product information details.
    • Under Product Details, enter the product "Name", "Description," "Price," "Compare-at price," "Product type" and "Product vendor" with the appropriate information.

    2. Shipping, taxes and inventory

    •  "Charge taxes on this product" if the product requires it.
    •  "Require a shipping address" if the product is a physical good.
    • Under "SKU," enter a product SKU number if you have.
    • Under "Barcode," you can change the universal product code (UPC) for your product.
    • Under "Weight," change your product's weight.
    • Product variants:- check the box for "This product has multiple options." A new panel should appear.
    • From the first drop-down menu, choose which option you would like your product variants to have.  Product option could be Size/Color.

    3. Add Product Images

    • Product Images:-, hit the Choose images button and add your image to your product.
    • To ensure your product images will display as the same size as each other in your store, you'll have to keep the "aspect ratio" equal between images.

    4. Add Product Tags

    • Select previously used Tags or enter a new tag for this product.

    5. Add your new product to a collection

    • Under Collections tab, select a checkmark beside each collection you would like this product to be included in.

    7. Save your product

    Click the Save button to save your new product. Your product will now appear on the main Products page.

    Add the new Product in a page

    • Go to shipify admin panel
    • UNDER WEBSITE tab,click pages and Click the button "Add pages"
    • Fill the page title,content,Search Engine information details and make sure that your page is visible.
    • Save the page
    • Click the navigation tab and select "edit link list"
    • Put the "link name" and select "link to" collection --> collection name.

    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