I am working on a payment module for linkpoint. I had done a devel one for e_commerce and had messaged the developers for the uc one but they plan to wait and I want to proceed asap for drupalcommerce.

The issue I have is that the linkpoint api requires a phone number to be submitted as part of its billing information. I am not sure of the appropriate way to request a phone number in the billing information asked during checkout. Perhaps the addressfield project can be extended by some hook or function or it is done with some function on the commerce checkout or payment?

I did post days ago on the drupalcommerce forum asking for suggestions, but it appears posting on issues here has more activity, apologies.

Linkpoint Manual: https://www.firstdata.com/downloads/marketing-merchant/fd_globalgatewaya...

... string up to 32 numbers and letters only (no symbols or spaces),
billing phone number, the number should not contain dashes, Required for e-commerce, telephone and mail order transactions. Required for Telecheck or web transactions.


rszrama’s picture

Status: Active » Fixed

All you need to do from a UI standpoint is add a phone number textfield to your billing information customer profile. In your case you can add one when the module is installed but maybe use the payment method settings form to let the admin select the appropriate field to pull a phone number from in case they had already made one. A long as the default field you add isn't "locked," they can always delete it if they already had such a field.

fwiw, we won't be adding phone number support to Address Field.

webengr’s picture

I appreciate the quick answer, I had setup a drupal module sandbox and will git my code soon and post the sandbox location in the forums soon. Your authnet module was very helpful and I may have more comment lines than code on my test website module as I devel. :)

While I am old sysadmin for unix servers I can muck around php nominally, but it would help for a suggestion of an existing module or snippet example to put in a module that puts another textfield into something like the added customer billing profile from the module.install or however.

fyi, I understand not adding phone to addressfield, linkpoint was an example of must have info for some payment systems and if I nail this or another commerce contrib has already that will help for other contribs that have to have oddball info from buyer.


note to self:
"The only profile type the Customer module defines is a billing information profile. This profile has the default address field and nothing more, but it may be extended to include other fields pertinent to payment (like VAT numbers for B2B sales) by modules or the manage fields UI for that type."

well that was a clue.

bkosborne’s picture

Wow this is bizarre. I'm also working on this and came here to post this same exact question.

Webengr, obviously it doesn't make sense to work on two modules for the same task here. Want to join forces?

I came from Ubercart (I noticed you posted about porting to DC a while back). I had decided to begin the port over last weekend because of an additional request to do so. I think working together, we can really flesh this module out and add as much support for First Data as possible.

Let me know! Hope to hear from you, otherwise I will continue to develop the module. I'm going to implement Ryan's idea of having the module add a field on install and give the user an option to select the field to use.

webengr’s picture

yeah I posted awhile back about this,
I have been slowly working on this, but as afore mentioned I am a sysadmin not a programmer, and as you see I got stuck on phone field, I can put up what I go so far in my sandbox and add you, its still got cleaning to do. if drupal likes the sandbox it will go live
will post back here and drupalcommerce, http://www.drupalcommerce.org/node/546, with sandbox info.

also found a sandbox that is says the module 'Adds new field for specifying company information. It extends customer profile Billing information'
this may or hinder not help to reivew:

webengr’s picture

OKAY I have put up a sandbox at:

I added bkosborne as a maintainer.

and we probably should take this conversation off the commerce project and can do issues in the sandbox or on drupalcommerce forums I think.

UPDATE: JUNE 10, 2011
A project has been moved from sandbox:

rszrama’s picture

Hmm... one example may actually be the Customer module itself. If you look at what it does in hook_enable() or hook_modules_enabled(), it's looking for any newly defined customer profile types and adding a default, non-locked addressfield to the profile types. You can probably copy some code from here and just change it to add a textfield instead of the addressfield. : )

bkosborne’s picture

In case anyone else developing a payment implementation...

Ryan's suggestion above worked well. For my work on First Data, I just added a function call in my hook_enable to create a field as well as a field instance, attaching the field instance to the customer profile 'billing' that gets created in the commerce_customer module. The customer module obviously becomes a dependency in this case, but that's okay.

The added phone number field is unlocked, allowing someone to delete it if for whatever reason they already have for billing. The proper field to use for the phone number can be selected in the payment rule's settings.

The only problem I foresee is if a customer does indeed have a billing phone number already added, then there will be two billing phone number fields for a brief time until the admin goes and deletes one =/.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

iampuma’s picture

Issue summary: View changes

People arriving to this thread trying to figure out why you would need a module/sandbox to add an extra field to the checkout.

It is easily possible to add an extra field to billing information, following https://drupalcommerce.org/user-guide/configuring-creating-customer-prof... (make sure you enabled commerce_customer and commerce_customer_ui).

Maedi’s picture

And also you'll probably want the Telephone module:

millionleaves’s picture

I know this thread is marked as fixed, but since it ranks highly when searching this subject, I thought I'd mention another solution.

First, install addressfield_phone:


Yes, I know that the module page points back to this thread. The main issue with the released version of the module is that it doesn't allow you to make phone numbers mandatory.

So, the second step is to apply the patch in this thread which addresses this issue AND allows you to have more than one phone number field in the address:


This gives you the option when editing a profile to enable a phone field. If you do this, you get a choice of up to 4 phone numbers (Phone, Extension, Fax, Mobile), each of which can be Hidden, Displayed or Required.

At the time of writing, Addressfield Phone was on v1.3 and the patch in #13 applied successfully.

I prefer this solution to simply adding a phone number to the order or the address profile because it is integrated into the Addressfield profile rather than sitting outside it. For example, if you add a separate phone number field to the Shipping address profile, then the phone number field appears at checkout even if "My Shipping information is the same as my Billing information" is checked. This feels clunky to me. On the other hand, it doesn't validate the phone number, which you could do if you added a separate field.

rszrama’s picture

Awesome, thanks for the additional info. : )

wesjones’s picture

Yes, thanks millionleaves!