Right now Pay module is bound to Postal module for collecting billing information. It would be preferable if it could also support Addresses module, which provides similar functionality to Postal. This patch adds support for Addresses to the pay_method_gateway class. Through the use of the validation handler, this moves all the $form_state variables to the original location so that the values match what Postal would use, making it so that we always get consistent data in each payment gateway.

Comments

moonray’s picture

Can we add this to the 7 version?

haleagar’s picture

StatusFileSize
new2.82 KB

I ran into this, and will give it a try to update for D7
It looks like this is a good module for addresses in D7
http://drupal.org/project/addressfield

any others that would be better or should alternatively supported?

Actually to make this field available to a form you need this patch
http://drupal.org/node/970048#comment-6217536

then I have a patch for pay_method_gateway.inc
but what is the format $element['billto'] should be transformed to?

haleagar’s picture

sorry this patch is against 7.x-1.0-alpha1
should I move this to a new issue so as not to hijack this one, though it's based on the above patch.

haleagar’s picture

StatusFileSize
new3.57 KB

A bit of trial and errors, but this has the values mapping correctly and being submitted to authorize.net successfully.
(using the donate module) http://drupal.org/project/donate
It's probably not viable to consider committing code dependent on a non committed patch in another module.
But maybe we can push along that patch for approval.

If there is a better field provider to use I'll be happy to work on supporting it as well.