by

Surajit

15 Mar 2015, 06:26 am

about the author

Apart from having keen interest in website development, he loves to play cricket and football.

About Surajit

Z-Credit Payment Method Implementation In Magento Admin

Z-Credit Payment

Z-credit is a service assured credit card that works in sync with Checks. With its reputation as a gateway with low bounce rate and secure transaction, it has gained quite momentum. You can implement z-credit payment method easily in your payment gateway. All the customers have to do is have a z-credit card and your transaction will be done within minutes. With Z-Credit, you get detailed reports handy along with the transaction details.

 

Magento is one of the world’s leading open source CMS platforms. With its easy implementation and modifications along with the huge range of modules available, it is highly preferred for building eCommerce sites. Its payment gateway modules helps in creating gateways that are not only secure but also simplifies the entire process of transaction.

Also Read: Magento Web Development: Upload Product From Front-End To Different Stores

At first create custom payment method in Magento. Now we implement custom payment method.

Download Custom payment method extension from http://www.magentocommerce.com/magento-connect/

Install the extension in Magento with the following step:-

Step 1: move the file in Myname_Mygateway.xml in public_html/app/etc/modules folder

Step 2: move the folder Myname in   /public_html/app/code/local/Myname

Step 3: move the folder mygateway app/design/frontend/mytheme/template

Custom payment method is now installed and you can see from admin ->system->configure->payment method:-

Z-Credit Payment Method

Then we will change some setting from here

Active: yes

Title: Z-credit

New order status: Processor

Payment applicable from: Not Necessary

Sort by: 1 (if you can show first option in all payment methods)

Then we will implement z-credit payment in Magento

Now we will open redirect.phtml from app/design/frontend/mytheme/template

Here you can get order id:


// Retrieve order

$_order = new Mage_Sales_Model_Order();

$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();

$_order->loadByIncrementId($orderId);

Now we will include z-credit payment method file in redirect.phtml. This package will be provided by z-credit merchant gateway document


<strong></strong>include("".Mage::getBaseDir()."/ZCreditProxy_PHP/ZCreditProxy.php");

Now you can add in this code in redirect.phtml

Z-Credit follows some Z-credit payment parameters when used in creating a payment gateway for ecommerce sites. Below is the Z-credit payment parameter.

// Parameter

TerminalNumber = “0963222014”

UserName = “testws”

PaymentSum = 211.12

PaymentsNumber = 1

UniqueID = “xyz”

ItemDescription = “Item”

ItemQtty = 1

ItemPicture = “”

RedirectLink = “http://x.y.z”

NotifyLink = “http://x.y.z”

UsePaymentsRange = 0

ShowHolderID = 0

AuthorizeOnly = 0

HideCustomer = 0

CustomerName = “My custommer”

CustomerPhoneNumber = “0501234567”

CustomerEmail = “x@y.com”

CustomerBusinessID = “123123123”

CssType = 1

IsCssResponsive = 0

You can also change the language of your transaction, currency that you want to make your payment in etc from here.


if(isset($_REQUEST['run']))

{             

                try

                {

                                // Call pay method

                                 ZCreditHelper::Pay("0963222014",//Username

                                    "testws", //Password

                                    12.99,//Total Amount

                                    1,//If you can pay one time then write 1 if you will get payment in 3 installment write 3

                                    Languages::Hebrew,//Language change from here

                                    CurrencyType::NIS,// currency change

                                    "XX232lsUU",

                                    "Test Item",//the here all product item 

                                    1,

                                    "http://yoursite.com/thankyou",

                                    "http://yoursite.com/notsuccess",

                                    false,

                                    false,

                                    false,

                                    false,

                                    "Customer Name2",//Customer name

                     1, 1);

Then you change Z-credit credential like user name and password. This position too gives you the flexibility to change the language.

In the Thank-you page that follows, you can get the following information:

  1. Card Number
  2. Card Name
  3. Customer name
  4. Customer email
  5. Total amount of payment

And such other payment details as required by the payment gateway. These details are stored by the payment gateway in a discreet format and can be used for any transactions to be made in the future.


$GUID = $_REQUEST["GUID"];

$ID = $_REQUEST["ID"];

$Sum = floatval($_REQUEST["Sum"]);

$Currency = $_REQUEST["Currency"];

$Payments = $_REQUEST["Payments"];

$CardNum = $_REQUEST["CardNum"];

$CardName = $_REQUEST["CardName"];

$UniqueID = $_REQUEST["UniqueID"];

$Token = $_REQUEST["Token"];

$ApprovalNumber = $_REQUEST["ApprovalNumber"];

$CustomerName = $_REQUEST["CustomerName"];

$CustomerID = $_REQUEST["CustomerID"];

$CustomerPhone = $_REQUEST["CustomerPhone"];

$CustomerEmail = $_REQUEST["CustomerEmail"];

$CustomerExtraData = $_REQUEST["CustomerExtraData"];

Now all you have to do is save it in a table format. In order to successfully complete it, it is necessary that you go through the following steps.

Open app/design/frontend/base/default/template/mygateway/redirect.phtml. All values in connection to the payment gateway are posted here. All information regarding any order received is stored discreetly in this form field. It is mostly in the JavaScript format.

Once the above is done, check into your Magento admin panel to check that the extensions are all enabled by the navigation.

When all the above steps are complete the payment gateway is displayed in the Magento admin panel and your payment gateway for your ecommerce site is ready.

To create a successful payment gateway with Z-credit payment method however, it is extremely important for you to understand and go through all the file extensions thoroughly before starting with our development.

by

Surajit

15 Mar 2015, 06:26 am

about the author

Apart from having keen interest in website development, he loves to play cricket and football.

About Surajit
Comment with Facebook

trending

Featured Posts

Editors Choice

Reviews