Authorize.net
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 27th February 2015 / by meera.l
We had faced an issue with invoice sent by authorize.net, for anonymous purchase a product in ubercart in one of our Drupal 7 site. After the purchase is completed, the user receives an invoice from authorize.net. But if the user is anonymous, the invoice's customer id is set as zero. We had sorted out the issue and fixed it. Read on to know how to solve this problem When anonymous user purchases, user account is created only on checkout complete and the data sent to authorize.net is set before the hook_uc_checkout_complete is called. The submit data is prepares inside the uc_authorizenet.module file's function _uc_authorizenet_charge() and it fetches the uid from the $user varibale, but at that time it is zero. So to remove senting the field cust_id for anonymous user we had added the following code inside _uc_authorizenet_charge() function. <?php // When a new user purchases an invoice with cust id '0' is sent. // Added to unset customer id. if ($user->uid == 0) { unset($submit_data['x_cust_id']); } ?>This code snippet helps to unset the customer id field in the invoice for anonymous users. Drupal Drupal 7 Ubercart Authorize.net 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 *
more_horiz
close

on 30th December 2014 / by prince.kr
Authorize.Net ARB is a standard recurring billing system module and gives you the freedom and flexibility to accept recurring payments without the need of a bulky shopping cart system. The users opting ARB payments mode will 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. Paypal too is an online payment gateway but the process is too length for a transactions to complete, fee for multiple transactions, no recurring payment options, cannot make a change in the amount variations on subscriptions. PayPal will not notify the users if the following happens: Transaction is approaching Transaction has occurred or not The current transaction was successful This transaction resulted in fault The entered credit card is approaching expiration A dispute occurred The ARB subscriptions has many advantages over getting subscribed to a paypal payment mode. Transaction amount from payment profile regurlary as per the customer need. If subscriptions will vary in terms of cost or frequency. You dont need to save your credit card information. Notifications if a card is expired/ fault. Provides reports for all transactions processed/ on pipeline. Canceling subscriptions can be made in few easy steps. Authorize.net Paypal Leave a reply Your email address will not be published. Required fields are marker *