CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Membership Contributions payment processor Error in 4.3x
Pages: [1]

Author Topic: Membership Contributions payment processor Error in 4.3x  (Read 15891 times)

sonia

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: drupal 7.7
  • MySQL version: 5
  • PHP version: 5.3
Membership Contributions payment processor Error in 4.3x
June 21, 2013, 03:40:25 pm
After recent upgrade to 4.3.4 from 4.2.7, membership contributions and donations are not being processed. We receive the following error message:   Payment Processor Error message: 9013: Error - from payment processor: [4 Invalid amount].

Checked civicrm_price_filed_value_table and some prices are 75 while others are 75.00. Developer updated db, problem still persist.
Event payments are processed w/o issues.

Checked with PayPal, no record on their end of the transaction. 

Any insight is appreciated.

Thanks,
Sonia

kreynen

  • I post occasionally
  • **
  • Posts: 105
  • Karma: 8
Re: Membership Contributions payment processor Error in 4.3x
June 24, 2013, 08:13:55 am
@sonia You are missing some details required for anyone to help with this issue. This is only happening when using the old PayPal Payflow gateway.  I don't think you can even purchase a PayFlow account from Paypal anymore.  The Paypal options now are Basic, Advanced, and Pro. 

The only reference I found for this error was from nopCommerce...

 http://www.nopcommerce.com/boards/t/1040/found-fix-paypal-payflow-pro-error-4-invalid-amount-.aspx

Quote
Well found the fix for this problem.  if you load up the database and checkout table "dbo.Nop_ProductVariant"  unders column there is one object called Price(money) that variable needs to be changed to Price (numeric(18,2), not null)  this will remove the 4 decimals places and move the prices to two decimals places allowing transations to process with Payflow pro as normal 2 decimal place prices instead of passing 2 additional decimal places to pypal and kicking back an invalid amount.  Hope this helps everyone experiencing this problem.

That error is coming from PayPal, so it's a little ridiculous for them not to have a record of what the amount that CiviCRM attempted to process that was rejected.

https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/result_values_for_transaction_declines_or_errors.htm


ptpmark

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Membership Contributions payment processor Error in 4.3x
June 25, 2013, 06:07:57 am
FYI it looks like payflow is still in play.  You can sign up with paypal in the U.S., anyway.

https://www.paypal.com/webapps/mpp/payflow-payment-gateway

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership Contributions payment processor Error in 4.3x
June 25, 2013, 12:44:22 pm
Since 'best guess' so far is that the AMOUNT passed is not formatted as expected (i.e. doesn't have 2 decimal places) - maybe next step is to add debug statement to the processor code and dump the values being passed to the log.

So you could dump the value of $params['amount'] in CRM/Core/Payment/PayflowPro.php somewhere near the beginning of doDirectPayment.

Code: [Select]
crm_core_error::debug_log_message('$params[amount]', $params['amount']);

I don't see any changes in schema and checked my local values in price_option_value for both 4.2 and 4.3 and in both cases there were a mix of NN and NN.NN values - so if the formatting is the issue I'm guessing there's a code change in the code passing $params to the processor.
Protect your investment in CiviCRM by  becoming a Member!

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Re: Membership Contributions payment processor Error in 4.3x
July 24, 2013, 03:50:39 pm
Thanks Dave. I'm running into the same issue. I've taken your advice regarding the debug statement and got back what looks to be a correctly formatted amount. In my case, it returned the following value:

Code: [Select]
200.00
So, it appears that PayPal is getting the amount in the correct format. As the original poster requested, any insights or suggestions about how to go about fixing this would be very much appreciated.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Membership Contributions payment processor Error in 4.3x
July 24, 2013, 06:25:14 pm
Does changing it from 200.00 to '20000' cause any change (ie. editing it @ your debug point)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Membership Contributions payment processor Error in 4.3x
July 24, 2013, 06:29:51 pm
Note that there is disconnect in the payflow product. They still call it paypal but there are accounts that interact with the legacy payflow interface & the new one. The payflow module was written against the legacy interfact. The new interface is probably exactly the same as a paypal branded account

I think they purchased payflow & are integrating it into PAYPAL

I found this
https://cms.paypal.com/cms_content/en_US/files/developer/PP_PayflowPro_Guide.pdf

which indicates the string to payflow should look like

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

BUT, am pretty sure paypal works with an 'amount' variable rather than 'AMT'

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Re: Membership Contributions payment processor Error in 4.3x
July 25, 2013, 08:08:49 am
Many thanks for the suggestions Eileen!

I believe I've gotten to the bottom of the issue. Turned out that $params['amount'] had a leading space in it. Once removed, payments were processed as expected. As Dave suggested, it makes sense that something changed with how $params are getting passed to the payment processors. Here's what I did to PayflowPro.php to get things back up and running:

Code: [Select]
[Line 109]  'AMT' => urlencode(trim($params['amount'])),
...
[Line 139]  $payflow_query_array['OPTIONALTRXAMT'] = trim($params['amount']);

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership Contributions payment processor Error in 4.3x
July 25, 2013, 09:29:11 am
Thx for debugging this and coming up w/ a fix. I've filed an issue to fix this in the codebase in the next 4.3 release. We'll do a bit more investigation to see if the trimming should be done upstream.

http://issues.civicrm.org/jira/browse/CRM-13115
Protect your investment in CiviCRM by  becoming a Member!

pratik.joshi

  • I’m new here
  • *
  • Posts: 9
  • Karma: 2
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Membership Contributions payment processor Error in 4.3x
August 12, 2013, 04:48:02 am
Hello,

Can you please try out if this patch works for you (after removing your changes) : https://github.com/pratik-joshi/civicrm-core/commit/735fe42d4fef190d987021f54b35ce4c354a291b .

Thanks,
Pratik.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Membership Contributions payment processor Error in 4.3x

This forum was archived on 2017-11-26.