Hi
I run multiple websites through my paypal account, the issue with multiple websites is that I need to pass the credit card descriptor to paypal so customers know where the charge came from. I can't use BrainTree because I am in Canada so I am stuck with payments pro.
I contacted paypal and they said I need to pass the following parameters to paypal MERCHDESCR & MERCHANTCITY through the API
I think I found where to set the information (I could be wrong)
under /app/code/core/Mage/Paypal/Model/Api/nvp.php but I am stuck after that.
Thank you in advance for your help.
Jonathan
Hi,
Did you manage to get this to work? We have multiple sites and need this adding.
Thanks
Matt
Hi jwypych,
We're still having problems implementing this so if you've managed to get anywhere any help would be much appreciated.
Thanks
Matt
Hi jwypych,
Thanks for the reply, it doesn't sound good that PayPal can't support this kind of thing. I don't suppose you've still got the code to pass the extra information to PayPal so we can give it a quick go?
It would save us a lot of time if you could help us out.
Thanks in advance.
Matt
Hi
Modify the file here
under /app/code/core/Mage/Paypal/Model/Api/nvp.php
There are a few parts of the code that need modification to pass the values correctly.
Around line 79, under the $_globalMap = array (
Add the following two lines
'MERCHDESCR' => 'merchdescr',
'MERCHANTCITY' => 'merchantcity',
Around line 261
Modify the function
protected $_doDirectPaymentRequest = array(
include the two values 'MERCHDESCR', 'MERCHANTCITY'
should look like this
protected $_doDirectPaymentRequest = array(
'PAYMENTACTION', 'IPADDRESS', 'RETURNFMFDETAILS',
'AMT', 'CURRENCYCODE', 'INVNUM', 'MERCHDESCR', 'MERCHANTCITY', 'NOTIFYURL', 'EMAIL', 'ITEMAMT', 'SHIPPINGAMT', 'TAXAMT','CREDITCARDTYPE', 'ACCT', 'EXPDATE', 'CVV2', 'STARTDATE', 'ISSUENUMBER', 'AUTHSTATUS3DS', 'MPIVENDOR3DS', 'CAVV', 'ECI3DS', 'XID',
);
Around line 667
Modify
public function callDoDirectPayment()
should look like this
public function callDoDirectPayment()
{
$request = $this->_exportToRequest($this->_doDirectPaymentRequest);
$this->_exportLineItems($request);
if ($this->getAddress()) {
$request = $this->_importAddresses($request);
}
//credit card descriptor //PP
$request['MERCHDESCR'] = "DESCRIPTOR";
$request['MERCHCITY'] = "ADDITIONAL DESCRIPTOR";
$response = $this->call(self:O_DIRECT_PAYMENT, $request);
$this->_importFromResponse($this->_doDirectPaymentResponse, $response);
}
You can also try to replace the above with
'SOFTDESCRIPTOR'
'SOFTDESCRIPTORCITY'
Neither worked for me
If you turn on logging you should see that the values are being passed to paypal. I did a bunch of test charges with my personal credit card and it didn't do anything.
I even got it verified by a paypal technician that they where receiving the values correctly and they where, but are at a loss on why it was setting correctly.
Hope it could be some help.
Jonathan
Hi jwypych,
Just tried this for my self and I couldn't get the information to pass through at all? I've turned on the logs and the two new values are no where to be seen!
Is there something I'm still missing?
Thanks in advance,
Elliot.
That should work above, the only thing I could think of is if you are not using payments pro with direct payment you wouldn't see the values. If you are using express checkout those get modified in a different function.
I'm 100% using Payments Pro whilst testing this, I'm using a Sandbox Credit Card to test this, although I wouldn't think this would cause a problem?
Here are the modifications as copied from you, below:
protected $_globalMap = array(
........
'MERCHDESCR' => 'merchdescr',
'MERCHANTCITY' => 'merchantcity',
);
protected $_doDirectPaymentRequest = array(
'PAYMENTACTION', 'IPADDRESS', 'RETURNFMFDETAILS',
'AMT', 'CURRENCYCODE', 'INVNUM', 'MERCHDESCR', 'MERCHANTCITY', 'NOTIFYURL', 'EMAIL', 'ITEMAMT', 'SHIPPINGAMT', 'TAXAMT',
'CREDITCARDTYPE', 'ACCT', 'EXPDATE', 'CVV2', 'STARTDATE', 'ISSUENUMBER',
'AUTHSTATUS3DS', 'MPIVENDOR3DS', 'CAVV', 'ECI3DS', 'XID',
);
public function callDoDirectPayment()
{
$request = $this->_exportToRequest($this->_doDirectPaymentRequest);
$this->_exportLineItems($request);
if ($this->getAddress()) {
$request = $this->_importAddresses($request);
}
$request['MERCHDESCR'] = "DESCRIPTOR";
$request['MERCHANTCITY'] = "ADDITIONAL DESCRIPTOR";
$response = $this->call(self:O_DIRECT_PAYMENT, $request);
$this->_importFromResponse($this->_doDirectPaymentResponse, $response);
}
I'm sure these should be the same as you, though!
Thanks again.
We are trying to accomplish the same thing - to have different descriptors appear on the bank/credit statements of the customer. If Joe's Garage made a sale, Joe's Garage should appear on the statement, and if Barney's Garage made a sale it should be Barney.
My questions to anyone are: