Questions about Payment Form extension

Shipping address -> Auth.net

  • msd_lab
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 11 months ago #9677 by msd_lab
Shipping address -> Auth.net was created by msd_lab
One more little thing I'm trying to get working with my form. I need to get a shipping address (different from the billing address) to Auth.net.

I made custom fields for all the shipping info, with names like pf_ship_first_name etc. However, when I test on Auth.net, the billing info shows up in the shipping info section of the receipt. How can I get the shipping fields to map to the Auth.net shipping fields? Or can I?

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #9765 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Shipping address -> Auth.net
Hi

In this case, you will need to customize the Authorize.net payment plugin to pass custom fields as shipping address . Please have a look at components/com_pmform/os_authenet.php, looks at processPayment function, you will see the code where shipping address passed to authorize.net . Simply modify that code to pass the information you want .

Hope this help .

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #10454 by ozneilau
Replied by ozneilau on topic Re: Shipping address -> Auth.net
Hi msd_lab,

I was faced with a similar challenge with passing a custom field through to eWay.

As per the advice in this thread from Tuan (thanks!), I amended the processPayment function section of /components/com_pmform/payments/os_eway.php as follows:

Commented out line 423:
Code:
// $this->setCustomerInvoiceRef($row->id);

And replaced it with this:
Code:
$db =& JFactory::getDBO(); $db->setQuery("SELECT payment_id,field_id,field_value FROM joom_pf_field_value WHERE payment_id = $row->id AND field_id = 16"); $rn = $db->loadObject(); if (isset($rn)) $referencenumber = $rn->field_value; $this->setCustomerInvoiceRef($referencenumber);

Now one of our custom fields is passed through and appears on the eWay email instead of a meaningless sequential transaction number.

I hope this helps.

Neil.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc