Answers.Body: <p>thanks for your guidance, here is the PHP error and it led me to the solution:</p>
  <pre><code>Fatal error: Uncaught Error: Call to undefined function bccomp() in
  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374
  ..
  </code></pre>
  <p>this prompted me to install bcmath:</p>
  <pre><code>sudo apt-get update -y 
  sudo apt-get install -y php7.2-bcmath 
  </code></pre>
  <p>restarted apache and the problem went away.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-26T12:15:52.863Z
Answers.LastActivityDate: 2020-08-26T12:15:52.863Z
Answers.UserDisplayName: Clement Leong
Body: <p>I was testing the Record Payment function in the following manner:</p>
  <ol>
  <li>Click Contribution under Contact A</li>
  <li>Click &quot;Record Contrirbution&quot;</li>
  <li>Create Contribution, set Status to &quot;Pending (Pay Later)&quot;</li>
  <li>Click &quot;more&quot; for the Contribution record, Select &quot;Record Payment&quot;</li>
  <li>Select Payment Method (I chose Cash)</li>
  <li>Click Record Payment</li>
  </ol>
  <p>This will result in spinning of the logo and nothing happens.  This requires a refresh of the page to get out.  No payment was recorded to the contribution.</p>
  <p>I have checked that this didn't happen to earlier versions (5.12).  Any insights?  Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T08:47:22.783Z
Comments.Text: can you check civicrm log for more details of the error?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T09:26:07.457Z
Comments.Text: Hello Pradeep,  I have enabled the dubugging and backtrace to test but there is no new logs entered in the ConfigAndLog. Thanks.
Comments.UserDisplayName: Clement Leong
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T09:34:34.593Z
Comments.Text: Can you open the record payment in a new tab and submit the payment?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T09:46:58.700Z
Comments.Text: When I open the record payment in new tab and submit, there is a HTTP 500 error. The URL that failed is xxx.example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fpayment
Comments.UserDisplayName: Clement Leong
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T11:05:23.177Z
Comments.Text: Can you check php error log?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-26T12:09:34.993Z
Comments.Text: Hello Pradeep, thanks for your guidance, here is the PHP error and it led me to the solution: 
  >
      Fatal error: Uncaught Error: Call to undefined function bccomp() in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374 ... 
  
  
  this prompted me to install bcmath: 
  
      sudo apt-get update -y 
      sudo apt-get install -y php7.2-bcmath 
  
  restarted apache and the problem went away.
Comments.UserDisplayName: Clement Leong
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-26T12:12:58.807Z
Comments.Text: can add it as answer ?
Comments.UserDisplayName: Pradeep Nayak
Tags: <contributions><paylater>
Title: Cannot Record Payment to a Contribution in Pending Pay Later Status (WordPress 5.0.10, CIVICRM 5.21.2)
ThreadText: # Cannot Record Payment to a Contribution in Pending Pay Later Status (WordPress 5.0.10, CIVICRM 5.21.2)
  
  (Asked by: username_0 on 2020-08-25)
  
  I was testing the Record Payment function in the following manner:
  
  1. Click Contribution under Contact A
  2. Click "Record Contrirbution"
  3. Create Contribution, set Status to "Pending (Pay Later)"
  4. Click "more" for the Contribution record, Select "Record Payment"
  5. Select Payment Method (I chose Cash)
  6. Click Record Payment
  
  This will result in spinning of the logo and nothing happens. This requires a refresh of the page to get out. No payment was recorded to the contribution.
  
  I have checked that this didn't happen to earlier versions (5.12). Any insights? Thanks.
  
  **Tags:** contributions, paylater
  
  > **Comments:**
  > **username_1**: can you check civicrm log for more details of the error?  
  > **username_0**: Hello username_1,  I have enabled the dubugging and backtrace to test but there is no new logs entered in the ConfigAndLog. Thanks.  
  > **username_1**: Can you open the record payment in a new tab and submit the payment?  
  > **username_0**: When I open the record payment in new tab and submit, there is a HTTP 500 error. The URL that failed is xxx.example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fpayment  
  > **username_1**: Can you check php error log?  
  > **username_0**: Hello username_1, thanks for your guidance, here is the PHP error and it led me to the solution:  >     Fatal error: Uncaught Error: Call to undefined function bccomp() in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374 ...    this prompted me to install bcmath:       sudo apt-get update -y      sudo apt-get install -y php7.2-bcmath   restarted apache and the problem went away.  
  > **username_1**: can add it as answer ?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-08-26. Score: 2 | Accepted answer
  
  thanks for your guidance, here is the PHP error and it led me to the solution:
  
  ```
  Fatal error: Uncaught Error: Call to undefined function bccomp() in
  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374
  ..
  
  ```
  
  this prompted me to install bcmath:
  
  ```
  sudo apt-get update -y 
  sudo apt-get install -y php7.2-bcmath 
  
  ```
  
  restarted apache and the problem went away.
  
  
  ---
  
  