• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

CBM not passing correct info to PayPal gateway - Confirmed by PP Merchant Support

Ross K

Basic Pleskian
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Parallels Plesk Panel w/CBM, v10.3.1, CentOS, 64-Bit

We are trying to use Customer & Business Manager along with the PayPal PayFlowPro gateway. However, when a transaction is processed, the transaction is declined and the following error is return:

1000: Generic processor error: 10713-There's an error with this transaction. Please enter a country in the billing address.

The country information has been included on the signup and is displayed on the order confirmation screen, but it does not appear to get passed to PayPal, which is required.

PayPal Merchant Technical Support ([email protected]) have given me the following answer:

A 10713 error means you're passing an incomplete billing address (specifically the Country value is missing or invalid) and you're required to include it in the API request. I'm not sure what kind of options you get using the Plesk software but is there an option you can toggle to include the "COUNTRYCODE" variable in your requests? Passing that along with the rest of the buyers billing address would resolve the problem.

I'd be grateful if someone from Parallels could confirm if this is a bug affecting all users, or if it is a problem with our setup.

Thanks.
 
Hello, Ross

I've checked documentation and it seems that COUNTRY field is not mandatory.
Unfortunately I have no test account in PayPal to reproduce the issue and to find the root cause.
If it's possible, could you please provide switch your account into testing mode and provide me with credentials?
 
Hi Eugene,

Thanks for getting back to me.

I've PM'ed you details of our PayPal sandbox account. Did you need the details/credentials for our Panel too?
 
Hi, Ross
I sent you a PM a couple of days ago and I can repeat my questions here.

Naturally PayPal has a number of different APIs and units which process payments.
CBM is integrated with only two of them
1. Website Payments Standard solution - off-site payment solution when your customers see button "Pay with PayPal" in your store, click it and go to PayPal secure site to pay. CBM will later receive payment confirmation, close the invoice and start service provisioning.
This payment solution can be tested via PayPal Sandbox which credentials you've provided me via private message.
I also have account there so I do no need them.
2. PayFlow Pro solution - on-site payment solution when your customers enter credit card details in your store, CBM saves them in database in encrypted form and communicates with PayPal using PayFlow Pro API in background.
This solution can not be tested via PayPal Sandbox because physically it's another system.
I do not have account there, you have not given me it and PayPal Support team still have not provided me with it.

But there are also a number of other solutions like Website Payments Pro which also works in background using PayPal API. And CBM is not integrated with it.

So my question is:
What solution do you want to integrate with and what solution do you have credentials for?
 
Hi EugeneL,

We have a Web-site Payments Pro account, but we definitely using the 'PayFlow Pro' solution (We go to Profile -> Request API Credentials -> Set up Payflow Pro API access) and have generated the relevant username, password, vendor and partner info.

So in answer to your specific questions:

We want to integrate the PayFlow Pro solution. Obviously our primary PayPal account is linked to all our bank accounts and credit cards - but I can give you the Payflow Pro API credentials for testing. I will PM these to you.
 
Hello, Ross

Strange issue...
I've checked this on my environment and got successful transaction - see the screenshot.

I created Payflow Pro gateway, selected to enable test mode and selected to accept all credit cards.
Firstly I entered my own credentials - they were wrong and the first transaction was failed with appropriate error (ID 1)
Then I entered your credentials - and transaction was approved (ID 2)
I suppose that you can see this transaction in your PayPal Manager panel.

I'll continue my investigations - now I try to contact PayPal to get my own account.
Could you please give me the access to your server? I'll try to enable debug mode there and look in details what requests CBM sends to PayPal and what it receives.
 

Attachments

  • PFP.jpg
    PFP.jpg
    83 KB · Views: 5
Hi Eugene,

That's very strange! I can only think of a couple of reasons why this could be the case:

1) The test transaction, for whatever reason, will go through where as a live one will not (I will try and test this).

2) It could be a bug in connection with the specific details I'm entering and for whatever reason, either the panel or PayPal isn't liking it.

In either case, I have PM'ed you the login details to our panel.

Kind regards,

Ross
 
Hi, Ross

Looks like the issue is connected to the fact that you are in UK.
In test mode gateway works OK but when PayPal attempts to send the transaction into UK bank, bank returns the error that country is not specified. Although this field (country) is optional in API specification...

Open the file: /opt/plesk-billing/lib/lib-mbapi/include/modules/gateway/payflowpro.php
Find the lines below and make sure that you have inserted the line in bold:
$tempPostValues = array(
// basic authentication that needs to be a part of any hit on PayFlowPro's API
'PARTNER' => $this->config['partner'],
'PWD' => $this->config['password'],
'USER' => $this->config['username'],
'VENDOR' => $this->config['vendor'],

// required postfields for all transactions
'ACCT' => $this->params['billingCardNum'],
'AMT' => $this->params['paymentAmount'],
'EXPDATE' => str_pad($this->params['billingCardExpMonth'],2,'0',STR_PAD_LEFT).substr($this->params['billingCardExpYear'],2,2),
'TENDER' => 'C',
'TRXTYPE' => $TRXTYPE,

// optional postvalues that do can magic things like lower merchant rates
// please note: magic things might also include appearance of unicorns and rainbows
'NAME' => billing_get_full_name($this->params['contactFirstName'], $this->params['contactLastName']),
'STREET' => (isset($this->params['contactAddress1']) && trim($this->params['contactAddress1']) != '') ? $this->params['contactAddress1'] : '',
'ZIP' => (isset($this->params['contactZip']) && trim($this->params['contactZip']) != '' ) ? $this->params['contactZip'] : '',
'COUNTRY' => (isset($this->params['countriesISO2']) && trim($this->params['countriesISO2']) != '' ) ? $this->params['countriesISO2'] : '',
'CVV2' => (isset($this->params['cardCVV2']) && trim($this->params['cardCVV2']) != '') ? $this->params['cardCVV2'] : '',
'ORIGID' => (isset($ORIGID) && trim($ORIGID) != '') ? $ORIGID : ''
);

Of course, make a file backup before your changes.
Once you do this, try to make one more transaction and please send me the result.
 
Hi Eugene,

Thanks for your thorough investigative work! I have made the changes to the file. I'm currently away at the moment, so I'll ask my colleague to put through a test transaction and I'll let you know what happens!

// optional postvalues that do can magic things like lower merchant rates
// please note: magic things might also include appearance of unicorns and rainbows

No unicorns or rainbows have appeared yet!! ;-)

Ross
 
Hi Eugene,

My colleague has attempted a live transaction. It failed, but with a new yet similar error, this time stating the CITY is missing.

The error is as follows:

7: Field format error: 10710-There's an error with this transaction. Please enter a city in the billing address.

It is starting to look like PayPal are requiring the full address? I imagine if you provide code for the city line, it will then probably ask for more...! Not sure, what do you think?
 
Hi, Ross

It looks like our plug-in works incorrectly with any banks except US ones which do not require contact information.

Typical sale transaction contains the following properties (according to PayPal's specs):
[+]TRXTYPE=S
[+]TENDER=C
[+]USER=SuperMerchant
[+]PWD=SuperUserPassword
[+]PARTNER=PayPal
[+]ACCT=5105105105105100
[+]EXPDATE=1209
[+]AMT=99.06
[-]COMMENT1=Reservation
[-]FIRSTNAME=John
[-]LASTNAME=Jones
[+]STREET=123 Main St.
[-]CITY=San Jose
[-]STATE=CA
[+]ZIP=123451234
[-]COUNTRY=US
[+]CVV2=123
[-]CUSTIP=0.0.0.0
All fields marked with [+] are already sent by the plug-in - you can see this from the code in my previous post.

I can suggest you to try to add more lines into plug-in:
'CITY' => (isset($this->params['contactCity']) && trim($this->params['contactCity']) != '' ) ? $this->params['contactCity'] : '',
'STATE' => (isset($this->params['contactState']) && trim($this->params['contactState']) != '' ) ? $this->params['contactState'] : '',
'COUNTRY' => (isset($this->params['countriesISO2']) && trim($this->params['countriesISO2']) != '' ) ? $this->params['countriesISO2'] : '',

COMMENT1 and CUSTIP look like optional in this case. But if they produce the error, you can add them with code
'COMMENT1' => 'Hosting services from Plesk and CBM',
'CUSTIP' => '10.10.10.10',

We send NAME field instead of FIRSTNAME and LASTNAME fields. I do not think it can be the issue.
But if it will cause the issue, you can change this replacing
'NAME' => billing_get_full_name($this->params['contactFirstName'], $this->params['contactLastName']),
with
'FIRSTNAME' => (isset($this->params['contactFirstName']) && trim($this->params['contactFirstName']) != '' ) ? $this->params['contactFirstName'] : '',
'LASTNAME' => (isset($this->params['contactLastName']) && trim($this->params['contactLastName']) != '' ) ? $this->params['contactLastName'] : '',

Unfortunately I can't test this on my own since I have no merchant account in any UK bank, I can't send live transactions. In test mode everything works OK. US customers also have no complains about this plug-in.

I'll be happy if you tell me about the result of your experiment.
I'm ready to post a bug to Development team to fix this in the nearest release.
 
Hi Eugene,

Apologies for the delay in getting back to you. I've been away on business and just got back.

I'm having a look at this now, so hopefully should have some news for you shortly! Fingers crossed...!
 
Hi Eugene,

I made the above changes (adding City, State and Country). Now, when submitting the payment information, it takes a while to load, then eventually gives the following error:

This online store is temporarily unavailable.
Unfortunately, the online store is temporarily unavailable.
 
Hi Eugene,

Just another update for you.

I commented out the "STATE" line and I was able to successful place the order and I can see in PayPal the transaction was processed correctly! So that appears to all be fixed now, so thank you! If you need any further clarification in order to send a fix to your developers, just let me know.

Unfortunately, whilst payment was successful, the order did not provision. From what I can work out, there also appears to be a bug in the OpenProvider domain registrar API too. Should I start a new thread for that, or post the details here?
 
Great thanks for your reply, Ross

I'll check what's wrong with STATE field... I've tried to pay invoice from admin UI, not from online store, and transaction has passed successfully. Will check the same using online store form ASAP.

What about OpenProvider API - it'll be better to start a new thread. I'll be happy to help you with it.
 
I added the same lines into plug-in (CITY, STATE and COUNTRY) and transaction passed successfully - I used test mode.
Maybe you made some mistake while adding STATE line - missed ',' or something...

You can try to add this line again and execute command
php -l /opt/plesk-billing/lib/lib-mbapi/include/modules/gateway/payflowpro.php
to check PHP syntax
 
I did copy and paste the lines exactly as pasted here. I just checked the line (as I only //'ed it out) and it does appear to be correct. Thinking about it, as my 'partner' is PayPalUK, that could be the reason - we don't have any such thing as a 'state' in the UK - only city. I will try re-adding it again - perhaps it could have been a temporary problem. I'll let you know the results.

I will start a new thread for the OpenProvider API issue.
 
Back
Top