This topic can no longer be replied to because it has been locked.

SagePayments Customer Name reversed
Gravatar
Joined: 2014-01-08
Posts: 5
When an order is placed through Magento and the Credit Card info is sent off to SagePayments, an order confirmation e-mail is sent out from SagePayments. The template for this is simply Dear <#customer.billing.name#> If when entering my order I type in 'Bob Smith', it is comes to SagePayments as 'Smith Bob' (first and last names reversed). Since SagePayments only takes one field for Billing Name, I believe it must be getting passed to it reversed from Magento/eBizmarts. Can you point me to the correct location to look for this? Thanks!
Gravatar
Joined: 2012-03-08
Posts: 2668
Hi Michael,

We will get back to you on this shortly.

Best,
Pablo
Gravatar
Joined: 2012-03-08
Posts: 843
Hi Michael,

what version of SagePayments do you have? and what kind of integration do you use Server or Direct?

Regards
Gravatar
Joined: 2014-01-08
Posts: 5
Thanks for the help - we are using Direct integration and the version is Sage Payment Solutions PRO v3.0.0.
Gravatar
Joined: 2012-03-08
Posts: 843
Michael,

edit the file app/code/local/Ebizmarts/SagePaymentsPro/Model/SageMethodDirect.php

Search for the function _buildRequestWithoutToken, here you have (at line 142):

$data['C_NAME'] = $billing->getData('lastname') . ' ' . $billing->getData('firstname');

change for:

$data['C_NAME'] = $billing->getData('firstname') . ' ' . $billing->getData('lastname');

then change the line (at line 158):

$data['C_SHIPPING_NAME'] = $shipping->getData('lastname') . ' ' . $shipping->getData('firstname');

for

$data['C_SHIPPING_NAME'] = $shipping->getData('firstname') . ' ' . $shipping->getData('lastname');

and for the last, change the line (at line 169)

$data['C_SHIPPING_NAME']= $billing->getLastName() . ' ' . $billing->getFirstName();

for

$data['C_SHIPPING_NAME']= $billing->getFirstName() . ' ' . $billing->getLastName();

Thanks for your feedback, this fix will be available in the next release.

Regards
Gonzalo
Gravatar
Joined: 2014-01-08
Posts: 5
Thanks - I'll give that a try!
Gravatar
Joined: 2012-03-08
Posts: 2668
Let us know how it goes Michael.

Thanks.
Gravatar
Joined: 2014-01-08
Posts: 5
I passed your code onto our web developer who said that it led him to the correct answer. We are working correctly now - thank you!
Gravatar
Joined: 2012-03-08
Posts: 2668
Thanks for your feedback Michael.

NEWSLETTER

Subscribe to our newsletter to receive emails and useful news articles