Drupal Commerce
close

on 28th November 2017 / by harikrishnan.v
Online merchandising has experienced a rapid growth over the past several years. This has lead to the emergence of a number of e-commerce systems that helps merchants to sell their products and services. Both proprietary and open source e-commerce systems come with a handful of features. There are times when we feel confused about choosing an e-commerce system that best matches our unique requirements. This article will help you to sort out your dilemmas. It was back in 2011, that the first version of Drupal Commerce platform was released. Since then it has been evolving according to the changing market structure and consumer requirements. Drupal Commerce is the only e-commerce system that is built on top of an enterprise content management system. Recently, Drupal commerce released its latest version Commerce 2.x, which helped it to enter into the new league of enterprise commerce that offers more customization, scalability, and robustness. Drupal Commerce 2.x is built for Drupal 8. Marrying Drupal Commerce with Drupal is an ideal solution for organizations that wish to build a merchandiser platform that needs customizations at various levels. When using Drupal commerce module with Drupal, we get a tightly integrated solution that elevates e-commerce and content marketing up a notch. As the data flow seamlessly between the two systems, it can be harnessed to deliver great customer experiences. Also, new feature additions will not affect the communication between Drupal and Drupal Commerce. Given below are some of the use cases where Drupal Commerce can be used. Product Customization Gayle is a company that sells Gypsum boards to contractors and installers. Gayle delivers marketplace features like quote generation and mass order placements on their platform. This helps users to generate a quote for products and make online payments for the same. It is the flexibility of Drupal commerce that allows Gayle to deliver custom features in the portal and customize the order management process. Yell Fish is a company that sells frozen fish. It delivers fish in various forms and quantities. For increasing the community engagement, they have created a community portal that showcases editor picked recipes. Along with recipes, Yell Fish also lists the ingredients that are needed for preparing that dish. This provides the customers the ease of ordering all ingredients as a bundle. Product bundling feature in Drupal Commerce has been utilized to make this happen. Feature Customization Klaro is a garments dealer. They do have both wholesale dealers(B2B) and consumers(B2C) in their customer base. To deliver an optimum digital experience to both of these customers, they decided to build a merchandiser platform that addresses the needs of both dealers(B2B) and consumers(B2C). Dealers usually search for products based on their specifications and model numbers. Also, they purchase in large numbers. So it’s essential to have an order list feature that help dealers to organize their order. Dealers usually purchase using their credit. On the other hand, consumers purchase directly from Klaro using online payments. Consumers also have options to try products virtually and confirm the order. Both dealers and consumers share a common inventory, but with a different pricing model and purchase mechanism. Drupal Commerce works well for all the use cases mentioned above. Let’s check the general implementation approach that can be taken to build a merchandiser platform using Drupal and Drupal Commerce. Implementation Model As Drupal offers a great deal of digital marketing support, the product catalog can be displayed using Drupal. For the e-commerce system, Drupal Commerce can be used. Advantages of using Drupal Commerce Safe and secure e-commerce system Drupal and Drupal Commerce delivers updates at a regular basis. This will help the system to be updated and secure against threats. Customizable Both Drupal and Drupal Commerce can be customized according to business needs. This is not possible in SaaS systems. Digital marketing enabled system Using Drupal for product catalog display will help to bring out the digital marketing capabilities of Drupal. Scalability Being built on Drupal and Drupal Commerce, the system facilitates scalability to next level. This includes feature additions and allows for integration with multiple systems. License free Unlike SaaS or proprietary e-commerce systems, Drupal Commerce is open source and there is no licensing cost or usage limits. You can customize it as you wish. Zyxware has helped several organizations in building merchandiser platforms to serve their customers in a better way. Our e-commerce experts work with the client to understand their business problems and implement a solution that best addresses it. Read a case study on how we helped a ticket-selling business set up a merchandiser platform that suits their custom requirements. To know more about how we can help you, get in touch with us! Ecommerce Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *
close

on 18th January 2016 / by Bipasha Baijulal
You all know that, unlike a normal website, an e-commerce website sells its products or services online. Customers visit these websites not only to gather information but to also make a purchase, and this calls for an extremely user-friendly experience. This means, e-commerce websites will need a much more powerful technology to function without any disruptions. Since money transactions are involved, marketers need a strong and secure system to build their e-commerce websites. Drupal has been the building block of numerous high-profile websites, but does it provide a strong yet flexible framework for building an e-commerce website? Absolutely! And here is why Drupal commerce is the best choice for e-commerce sites: Better site performance: E-commerce sites cannot afford to be slow to load, as they will lose prospective customers. Since there is stiff competition, there are a lot of options available for users. So, if your website is slow, users will swiftly move onto the next site. However, Drupal commerce ensures optimum site performance for your e-commerce site. Protects guest check-outs and logins: Drupal’s secure page module makes sure that your guest is on a secure page when they create profile, view user details, check-out or login. Lets you build a Responsive e-commerce website: Drupal’s mobile-first architecture lets developers build a responsive e-commerce website, which functions easily on any smart device including mobile phones. Allows multiple payment gateways: Drupal Commerce is equipped with many useful third-party integrations for payment gateways which allow multiple payment modes for users. High security: For an ecommerce website, security is the top priority. And, as you know, Drupal is the CMS that provides top-notch security. Free, open-source: Being an open-source CMS, you don’t have to pay any cash to access any features of Drupal commerce that you require for your e-commerce website. Offers quick currency and language conversions: Drupal Commerce has modules that can take care of multicurrency conversions, tax, and multiple language needs. Lets you create versatile product searches: With Drupal Commerce, you can perform product searches in numerous ways, such as by price, size, gender, occasion, manufacturer and so on. With this option, users can save time and shop more conveniently. To sum it up, Drupal commerce provides a powerful structure to build an e-commerce website, offering you outstanding customer experience and security. Marketers can update fresh content constantly, create an awesome online store design, ensure attractive product displays, and connect with users on social platform with ease through Drupal commerce. If you want a dynamic and user-friendly e-commerce site for your product/service, build it in Drupal along with Drupal commerce. We, at Zyxware, can provide you all the Drupal solutions needed for your e-commerce site. give us a call today to know about our Drupal services and packages. Reference: Core features Why Drupal Commerce? Drupal Development services Ecommerce Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *
close

on 25th November 2015 / by Moses Raymond
At the heart of all Ecommerce sites, lies a powerful Content Management System, and therefore it is extremely important to choose the right platform. A Content Management System is a computer application that permits us to make changes to the Ecommerce website and publish the necessary changes. Since the CMS allows organization and modifications to the content, it is the core of your Ecommerce business in all respects. Making the right choice of the CMS is absolutely essential for the smooth and seamless functioning of your store and thus needs careful consideration before deciding on one. Store owners have their task fairly cut out, as Drupal Commerce and Ubercart are the obvious choices when it is time to choose. The below discussion will help you make an informed choice about this important part of your business. Drupal Commerce: This versatile open-source ecommerce solution is an obvious choice for building applications and websites and has been at the centre of many leading ecommerce websites. It is well-equipped to understand and fulfil your requirements to build an adaptable online store. Let us look at the features that Drupal Commerce has to offer: Flexibility is a virtue: Since there are no hard-coded assumptions about product display requirements, there is a huge flexibility to go ahead and build a site that meets all your needs. You can easily expand the store or make the necessary changes as per process needs and design. So, go ahead and give your online store the much-needed makeover whenever you desire to. Adaptability at your disposal: Your site can change as the business grows. With Drupal Commerce as your platform, making layout changes or business logic variations becomes an easy affair. Packed with features: Availability of a shopping cart, checkout form and a full administration system in place makes Drupal Commerce the appropriate CMS for an online store. The fact that it support various languages and multiple currencies is a bonus factor that acts in its favour. Ubercart: This open-source platform is a quick to use and implement software that has multiple modules at its disposal and ensures complete fulfilment of your needs. It's built-in payment processing is a boon for setting up the store in real quick time. Being the first Drupal ecommerce platform for Drupal 6, Ubercart has evolved and grown into a user-friendly and refined structure that finds favour with many ecommerce owners. Ubercart offers some great features too. So let’s take look at them: Ubercart is perfect for beginners in ecommerce and ideal for small- sized stores Order processing page can be customized as per the business model you have adopted Payment and shipping options are in-built, giving users the discretion to choose as an entire package or a-la-carte. There is absolutely no hassle when it comes to knowing a particular order status at any stage of the buying process. Drupal commerce is better suited to handle complicated maintenance cycles and programming processes and is ideal for mid-sized and large Ecommerce stores, while Ubercart is perfect for the new and small stores. Drupal commerce scores over Ubercart in terms of flexibility and growth and thus has found favour amongst the world’s leading shopping sites. Zyxware is completely geared up to manage your ecommerce store by using the most advanced and technologically suited platform for your business. Connect with us to know more about our Drupal website development services and how this critical choice could impact and support your business model. References: Ubercart Vs Drupal Commerce – Which Platform Should eCommerce Owners Choose In 2015 Ubercart vs Drupal Commerce Drupal Development services Drupal Development Drupal Commerce Ubercart Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 01st September 2015 / by sarika.k
The Commerce Card on File module provides an API with a user interface for storing and reusing credit card data on subsequent orders. This module didn't hold full card numbers locally. Instead of this it stores the remote ID of the full card data from the payment gateway that is used to validate and process your credit card transactions. Now lets checkout some requirements based on the module. Commerce Card on File module requires the following modules: Commerce Commerce_ui Commerce_payment Commerce_order Commerce_customee Entity This module is required by following modules. Card on File - Recurring Commerce Card on File Testing To work the Commerce Card on File module, there should be an attached payment method, which implements the CIM API. In this, I'm using the Commerce Authnet payment method that is to provide Card on File payment support. Commerce Card on File works by storing a reference to a credit card. It can then use that reference to recollect that credit card and create and charge new orders. Card type Cardholder name Last 4 digits of the credit card number Numeric expiration month and year Many payment gateways support "card on file" functionality,that permit you to process an authorization or capture for a credit card and give you a token to perform follow-up transactions using that same card data. Such a transaction are referred to as a reference transaction and some of its examples are implementations being PayPal's reference transactions, Cyber Source's Managed Billing / subscriptions, or Authorize.Net's Customer Information Manager (CIM). To solve the Drupal integration, we can use Commerce Card on File module, which does all this and more within Drupal Commerce, which works through payment method callbacks, allowing any payment module to implement the callbacks to integrate reference transactions through its payment gateway's API. Get a Quote for a new Drupal integration, and get a smarter web site, contact us for more queries. Drupal Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 31st July 2015 / by antony.glen
This article focuses on how to add new members to Drupal commerce store. Usually, when a new user created with admin role tries to access the store, the action will be restricted with an "Access denied" message. For a user to access the commerce store, he should be a member of the store. Let's find out how to resolve this issue. On creating a store 'member_id' and 'user_id' will be created in 'commerce_store_role' table. In hook_entity_insert(), collect all the administrative user id's from user's table along with member_id and admin id. Insert the user id and member id or admin id in table 'commerce_store_user_role' so that user can access commerce store. Inside the hook_entity_insert() implementation, we need to fetch users in commerce store who has the administrator role, and also fetch the members in store with role administrator. The constant 'COMMERCE_STORE_ADMINISTRATOR_ROLE' stands for a role name of store administrator. /** * Implements hook_entity_insert(). */ function custom_module_entity_insert($entity, $type) { if ($type == 'commerce_store') { $query = db_select('users', 'users'); $query->innerJoin('users_roles', 'users_roles', 'users_roles.uid = users.uid'); $query->innerJoin('role', 'role', 'role.rid = users_roles.rid'); $query->condition('role.name', 'administrator'); $query->fields('users', array('uid')); $rows = $query->execute(); $admin_users_list = $rows->fetchAll(); $query = db_select('commerce_store_role', 'com_str_rol'); $query->condition('com_str_rol.name', array(COMMERCE_STORE_AUTHENTICATED_ROLE)); $query->condition('com_str_rol.store_id', $entity->id); $query->fields('com_str_rol', array('rid')); $member_rid_query = $query->execute(); $member_rid_lists = $member_rid_query->fetchAll(); foreach ($member_rid_lists as $member_rid_list) { $member_rid = $member_rid_list->rid; } $query = db_select('commerce_store_role', 'com_str_rol'); $query->condition('com_str_rol.name', array(COMMERCE_STORE_ADMINISTRATOR_ROLE)); $query->condition('com_str_rol.store_id', $entity->id); $query->fields('com_str_rol', array('rid')); $admin_rid_query = $query->execute(); $admin_rid_lists = $admin_rid_query->fetchAll(); foreach ($admin_rid_lists as $admin_rid_list) { $admin_rid = $admin_rid_list->rid; } foreach ($admin_users_list as $admin_user) { $admin_users[] = $admin_user->uid; if ((isset($member_rid)) || (isset($admin_rid))) { db_insert('commerce_store_user_role')->fields(array('uid' => $admin_user->uid, 'rid' => $member_rid))->execute(); db_insert('commerce_store_user_role')->fields(array('uid' => $admin_user->uid, 'rid' => $admin_rid))->execute(); commerce_store_access_rebuild_permissions(array($entity->id)); } } } }The constant 'COMMERCE_STORE_AUTHENTICATED_ROLE' is the role name of store member. We will get the users with admin roles from the '$admin_users_list' variable and member id from '$member_rid' in the above code snippet. Finally, we will insert the user id 'uid' to 'commerce_store_user_role' table. After it is done, call 'commerce_store_access_rebuild_permissions()' function to rebuild store access permissions. Following the above steps permission will be add to the newly created store user. We may find out the permission added to user not displayed in the listing page. For updating store members list page use hook_entity_presave(). Here we will be once again fetching all users with role 'administrator' and assigns the admin id as commerce store target id. /** * Implements hook_entity_presave(). */ function custom_module_entity_presave($entity, $type) { if ($type == 'commerce_store') { $members = array(); if (isset($entity->cmp_m_store[LANGUAGE_NONE])) { foreach ($entity->cmp_m_store[LANGUAGE_NONE] as $item) { if (isset($item['target_id'])) { $members[] = $item['target_id']; } } } $query = db_select('users', 'users'); $query->innerJoin('users_roles', 'users_roles', 'users_roles.uid = users.uid'); $query->innerJoin('role', 'role', 'role.rid = users_roles.rid'); $query->condition('role.name', 'administrator'); $query->fields('users', array('uid')); $rows = $query->execute(); $admin_users_list = $rows->fetchAll(); foreach ($admin_users_list as $admin_user) { if (!in_array($admin_user->uid, $members)) { $entity->cmp_m_store[LANGUAGE_NONE][]['target_id'] = $admin_user->uid; } } } }Implement hook_module_implements_alter hook for our purpose, we should ensure two things: Make sure entity_insert runs last when hook_entity_insert is invoked. Make sure entity_presave runs last when hook_entity_presave is invoked. /** * Implement hook_module_implements_alter(). */ function custom_module_module_implements_alter(&$implementations, $hook) { // Testing with isset is only necessary if module doesn't implement the hook. if ($hook == 'entity_insert') { // Move our hook implementations to the bottom. $group = $implementations['custom_module']; unset($implementations['custom_module']); $implementations['custom_module'] = $group; } if ($hook == 'entity_presave') { // Move our hook implementations to the bottom. $group = $implementations['custom_module']; unset($implementations['custom_module']); $implementations['custom_module'] = $group; } }The above hook implementation helps to order the implementation in reverse order, using &$implementations we could get the module implementations done here in our example, say 'example_custom', which will be stored inside the $group variable. After we will unset all the implementations in 'custom_module', the re-assigns the implementations stored in '$group'. Following this method, we could add members in commerce store with admin role. We can help you further in Setting up and configuring Ubercart and Drupal Commerce in your Drupal Site. We offer a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to find more. Drupal Drupal 7 Drupal Commerce Drupal Planet Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 31st July 2015 / by alfred.paul
Drupal commerce is a popular e-commerce module for Drupal. It is used to build ecommerce websites and applications and leverages the outstanding features of Drupal 7 for greater flexibility. Here, we will find out how to create a payment gateway module for Drupal commerce. There are mainly two types of payment gateway integration in Drupal Commerce: On site Off site On site payment is processed by a third party API through web services with the information gathered from our site through a checkout form (For example Credit/Debit card credentials). Offsite payment method, on the other hand, processes data entered in the payment gateway page. Off site payment method redirects the user to the payment gateway's processing page using a checkout form. After the payment is completed, user will be redirected to payment page from where he can go forward or backward during the checkout process. Payment gateways offer multiple types of payment services, which often provides on-site and off-site options. Each of these services is represented by a different payment method in Drupal Commerce. A default payment method rule will be defined, when a payment method module is enabled. This could be used to configure your payment methods. During the checkout process, all the active payment method rules will be evaluated and the respective payment methods would be enabled for use on the checkout form. You can actually use one or more rules to enable any given payment method using a different set of API credentials or transaction configurations based on conditions of the order being paid for. Note that, no payment method is enabled by more than one rule. Commerce payment module in the Drupal commerce provides API for creation of payment methods in Drupal commerce. The Payment module includes functions designed to support common types of payment services, the most common being credit card payments. The file commerce_payment.credit_card.inc includes helper functions for building and validating credit card forms and data. Whenever a payment is done, a payment transaction should be created that references to the order for which payments were attempted and the payment status should be reflected in the transaction's status. For reference of creating a payment gateway module, we can refer commerce_paypal as it contains both on-site and off-site payment methods. Now, a payment method should contain the following functions. Define the payment method via hook_commerce_payment_method_info(). This hook will return a keyed array like the one below:$payment_methods['paypal_wps'] = array( 'base' => 'commerce_paypal_wps', 'title' => t('PayPal WPS'), 'short_title' => t('PayPal'), 'description' => t('PayPal Website Payments Standard'), 'terminal' => FALSE, 'offsite' => TRUE, 'offsite_autoredirect' => TRUE, ); Each element in the array is explained in the link payment-info-hooks. Define your callback functions to add setting form to the payment method's rule. Collect the necessary information on the checkout and administrative payment forms, and accommodate the redirection process for off-site payment methods. Define menu items for additional payment transaction operations and providing the forms and API integration necessary to perform the operations. Integrate with the payment service to actually process payments, validate payment notifications, and otherwise interact with the available APIs. On Site Payments A simple example of on-site payment method is the Paypal WPP module in the Commerce Paypal project. Here it is important to note that you have to set off-site parameter in the payment method data to FALSE and off-site_redirect to FALSE. The function callbacks are defined in the callbacks key in the payment method array. For on-site payments, submit_form, submit_form_validate, and submit_form_submit functions need to be defined as it shows returns form elements to collect details from the customer required to process the payment and validates. Off Site Payments A simple example of on-site payment method is the Paypal WPS module in the Commerce Paypal project. You have to set off-site parameter in the payment method data to TRUE to enable redirection to payment gateway. off-site_redirect to TRUE if you are redirecting to payment gateway page, FALSE if you are using iframe to show the payment method page. The function callbacks are defined in the callbacks key in the payment method array. For off-site payments, redirect_form, redirect_form_validate, and redirect_form_submit functions are needed. redirect_form - This function returns form elements which should be submitted to the redirected payment service. It is because of the array merge that happens upon return and the service’s URL that should receive POST variables. The POST variables should be set in the #action property of the returned form array. redirect_form_validate - This function returns from a redirected payment service. This callback provides an opportunity for the payment method to validate any returned data before proceeding to checkout completion; should return TRUE or FALSE indicating whether or not the customer should proceed to checkout completion or go back a step in the checkout process from the payment page redirect_form_submit - This function returns from a redirected payment service. This callback gives an opportunity for the payment method to perform any submission functions necessary before the customer is redirected to checkout completion. Drupal payment module development can be tricky. You may need to hire experts to get this done. We provide you a wide range of Drupal services to help you maintain and manage your Drupal websites. Drupal Drupal 7 Drupal Commerce Drupal Planet Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 06th July 2015 / by fazeela.ma
Commerce Discount module provides a user-friendly UI for managing discounts. The Discount UI (available under Admin → Commerce → Store → Discounts) allows creating and editing discounts. Each discount consists of two related entities: Commerce Discount and Commerce Discount Offer. The Discount allows you to choose what type of entity this discount this will apply to i.e. "Order Discount" or "Product Discount". The Commerce Discount Offer denotes the result the discount produces. Drupal Commerce installation. This module is used to create discounts, apply the discount using views, and to display discount to the customers. To install drupal commerce discount, install the module from the the following link, commerce discount. Using drush, drush en commerce_discount -y; After installing the module, you could see a new menu item 'store' on the admin bar. On clicking on store, you are now on the second item on the list is discount. Using the link we can add discounts to the products for sale. Using discounts link, we are now on the following page, Use +Add Discount link on the top to see the UI for adding discount. In this screen, we have fields, Admin title - This field is mandatory and is used by admin to manage the discounts, not seen by customers. Lets say 'T-Shirts_discount', when we fill-in the field an automatic machine name is generated. Name - This field is optional and is visible to customers. Let us give it as 'T-Shirts discount'. Discount type - There are 2 discount types, Product discount. Order discount. Product discount conditions - These are the conditions we set to give discount on the product. The sub fields include Apply to - Is a drop down list. All - ie, we want to apply the discount to all products for sale. User - Here we have another sub field to enter the user id. The module will check whether the current logged in user have the same id as that of the one entered in the text field. Lets fill it with 1. Also, let us consider the admin id be 1. Now, when ever the admin logs in to buy a product the discount will be enabled, for all other users the discount will be disabled. Product - Here we have another sub field to enter the SKU of the product. We can enter SKU's of as many products by comma separation. For the product having the SKU entered in the textfield, discount will be enabled, for others the discount will be disabled. Suppose we have a product 'T-Shirts' with the SKU as 143. Let us enter it as 143 in the text field. Product type - Here, we have a drop down to enter which content type used for adding products should have this discount. Suppose we have created content types 'product-tshirt', 'product-jewellery'. Lets select product type as 'product-tshirt'. Here module will enable the discount for all the products using content type as product-tshirt. Product attributes - The discount is active if the product has the selected term(s). There is a button 'Add a new condition', we can new condition. There is a check box 'negate'. So our condition will become, For User - discount will be active for all current logged-in user except the one with user id 1. For product - discount will be activated for all the products except the product with SKU '143'. For product type - discount will be enabled for all the product types except 'product-tshirt'. Choose offer type - Type of order offered to the customers. The types include, $ offer - Here, we will a give a discount in price. Lets say $12, In this $12 will be reduced from the actual price of the product. % offer - The discount is in percentage. Say 12%, In this case, reduction of 12% will be made from the actual price of the product. Free products - There wont be any discount in the price. Here the customer will be given free products. To the top right, there is a drop down to set the discount active or inactive. Now, we are set to Save discount. Apply the discount on products. Now we have created a discount, in order to integrate we need to configure it in the views page. Open the Views admin page by selecting Structure-> Views from the Drupal admin menu. Find the Shopping cart summary view and click the edit button. Under Fields, click (Line items referenced by commerce_line_items) Commerce Line item: Total (Total). Under Formatter, select Formatted amount with components. Save the field and the view. Display discount on product detail page. For the customers to see whether the product they are buying have any discount, if so what is the amount of discount on the product. For this we are using the drupal module, Commerce Price Savings Formatter Install the module from the following link, commerce price savings formatter or using drush drush en commerce_price_savings_formatter -y; After enabling the module, go to store -> configuration ->product variation types -> manage display -> for the price texfiels select 'Formatted amount with savings'. Click save and done. The module and its dependencies are mainly used in commerce sites, were the owner can manage the discount on his/her products. It allows the customer to know, what the exact price is, discount amount, and current price of the product. Drupal Drupal 7 Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 05th March 2015 / by prince.kr
Authorize.net is payment gateway service allowing users to accept credit cards or other payment mode through websites. It allows users to manage transactions, manage payments on the basis of low-cost without any extra transaction fees. Authorize.net deals with many transactions through payment gateway from simple to complex e-commerce products and reports. The only need by a customer to choose an appropriate API suiting your business and transactions and thereby directly creating an account with Authorize.net. Authorize.Net ARB is a type of payment API where users can opt recurring billing systems to their product subscriptions. The users opting ARB payments mode would be charged the first amount of payment the next day after they subscribe on website, then the recurring billing will start after the first membership period. Links to others resources for advanced references: http://developer.authorize.net/api/ http://developer.authorize.net/api/arb/ Following are the steps to configure Authorize.net ARB Please check whether you have the following details before ARB integration for an Authorize.Net Payment Gateway account in your Drupal site For development purposes create a Sandbox account in Authoirze.net Obtain authentication data such as API login ID and transaction key Enable following modules : Authnet ARB Commerce Libraries Payment Download the Authorize.net SDK to your /sites/all/libraries/anet_php_sdk directory and enable before Authnet ARB Authorize.net SDK requirements: PHP 5.2+ An Authorize.Net Merchant Account or Test Account. Next is to add the recurring products lists in the site. The products lists are the real payment sources to the sites. Go to Administration > Store > Products > Add Product (admin/commerce/products/list) to add the products/ subscription types in the site. Configuration for Authorize.Net Enable Payment method in Administration > Store > Store Configuration > Payment Methods We have to enable the payment methods module to use the payment configurations.(admin/commerce/config/payment-methods) Go to admin/config/workflow/rules and enable rule- Authorize.Net AIM - Credit Card Set Authorize.Net API login ID and Transaction Key. Also select proper Transaction mode and Default credit card transaction type. (admin/config/authnet-arb) Drupal Authorize.net Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 12th January 2015 / by manoj.k
In Drupal, drupal_commerce module can be integrated with authnet_arb module by which we can implement Auhorize.Net subscription or recurring billing. Before integration we have make some hack on the sandbox module to make it effectively work with drupal_commerce and bug free. In Drupal organization hacking module and generating a patch is more oftenly done by all drupal contributors. Basically to be a good drupal contributor before hacking a set of code we need to have clear idea of what is the cause of problem and why we need to fix it. Hence we can look on the problem, whenever creating ARB subscription or an API request is been to happen SDK will check for sandbox boolean value is true or false. Since authnet_arb is a sandbox module its not checking whether the payment method is been set as sandbox and then set the SDK sandbox boolean as proper. So we have to hack the sandbox module for this to work properly before each API request is to created or generated. Here come the sample code needed to set sandbox boolean of SDK. $request = new AuthorizeNetARB($settings['login'], $settings['tran_key']); if ($settings['sandbox']) { $request->setSandbox(TRUE); } else { $request->setSandbox(FALSE); } Another feature we needed while implementing Authorize.Net ARB is the option for update subscription details such as credit card.authnet_arb sandbox module doesn't provide this update feature, instead they says it need to be implemented. Here I havehack that also as follow: function authnet_arb_update_subscription ($update_values) { $settings = authnet_arb_settings(); require_once authnet_arb_sdk_path().'/AuthorizeNet.php'; $subscription = new AuthorizeNet_Subscription; $subscription->billToFirstName = $update_values['first_name']; $subscription->billToLastName = $update_values['last_name']; $subscription->billToAddress = $update_values['thoroughfare'] . ' ' . $update_values['premise']; $subscription->billToCity = $update_values['locality']; $subscription->billToState = $update_values['administrative_area']; $subscription->billToZip = $update_values['postal_code']; $subscription->billToCountry = 'US'; $subscription->creditCardCardNumber = $update_values['card_number']; $subscription->creditCardExpirationDate = $update_values['expiration_date']; $request = new AuthorizeNetARB($settings['login'], $settings['tran_key']); if ($settings['sandbox']) { $request->setSandbox(TRUE); } else { $request->setSandbox(FALSE); } $response = $request->updateSubscription($update_values['subscription_id'], $subscription); return $response; } There is one more feature need to implement delete subscription. That you can try and publish as an article like this. That's all enjoy coding and hacking. Drupal Authorize.net Drupal Commerce ARB Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 12th January 2015 / by manoj.k
Authorize.net is a popular alternative to Paypal for eCommerce websites especially its recurring transaction product - Authorize.net ARB (Automated Recurring Billing). Drupal support for Authnet ARB is available through Ubercart but it is not available for Drupal_commerce. However there is a workaround to setup Authorizet.net ARB to work with Drupal commerce. Read on to know more. There is no Authorize.net ARB module for Drupal commerce but there is a sandbox module - Authnet ARB This module does not work straight out of box but you need to make a few changes. But before that lets get familiar with the module Drupal authnet_arb sandbox module uses authorize.net SDK for ARB API request, so we have to install the sdk for using this module. First of all we can look on what else features the authnet_arb module provide and then we can look on how to integrate it with drupal commerce. Features provided by authnet_arb module. Payment method for ARB: The sandbox module provides an additional payment method named 'Recurring payments with Authorize.Net ARB (with credit card)' along with default drupal commerce payement methods. Enabling this payment method, we get an option for choosing 'Recurring payments' method of payment in drupal commerce payment form. /** * Implements hook_commerce_payment_method_info(). */ function authnet_arb_commerce_payment_method_info() { $payment_methods = array(); $payment_methods['authnet_arb'] = array( 'base' => 'authnet_arb', 'title' => t('Recurring payments with Authorize.Net ARB (with credit card)'), 'short_title' => t('Authorize.Net ARB CC'), 'display_title' => t('Recurring payments'), 'description' => t('Integrates Authorize.Net ARB for transactions.'), 'callbacks' => array( 'settings_form' => 'authnet_arb_commerce_settings_pane', 'submit_form' => 'authet_arb_payment_pane', 'submit_form_submit' => 'authet_arb_payment_pane_submit', 'submit_form_validate' => 'authet_arb_payment_pane_validate', ), 'file' => 'commerce.inc', ); return $payment_methods; } Silent post URL: Silent post is the feature provided by Authorize.Net, which will post a http request to our domain silent url (which we need to configure in Authorize.Net account settings page) with the transaction details of ARB subscriptions payement as xml. Using this we can listen to the post request coming to our drupal site and do necessary business logic according to transaction status details. /** * Implements hook_menu(). */ function authnet_arb_menu () { $items = array(); $items['authnet-arb-silentpost'] = array( 'type' => MENU_CALLBACK, 'page callback' => 'authnet_arb_silentpost', 'access callback' => TRUE, ); return $items; } Authnet ARB settings: Admin config page for setting the API login Id and transaction key. This form also provide an option for sandbox transactions, which will be more useful while testing. ARB Subscription cancellation form: Using this subscribers can cancel their ARB subscription any time they want. Since we are now familiar with the module, lets get to work on those changes to make this module production ready. Stay tuned for our second part. Drupal Authorize.net Drupal Commerce Leave a reply Your email address will not be published. Required fields are marker *