Answers.Body: <p>A proposed fix has just been written. Can you please check and give feedback on <a href="https://github.com/civicrm/civicrm-core/pull/29313" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/29313</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-15T19:33:56.307Z
Answers.Text: We have tested this PR on our Civi 5.69.2 and unfortunately we are getting the exact same error logged. Apologies for the delayed response. Thank you for the suggested fix though, we will keep digging!
Answers.UserDisplayName: MattEMBA
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-07T21:06:59.593Z
Answers.LastActivityDate: 2024-02-07T21:06:59.593Z
Answers.UserDisplayName: Coleman
Body: <p>When staff attempt to use the Civi backend option:</p>
  <p>'Contact &gt; Events &gt; Submit Credit Card Event Registration'</p>
  <p>Entering a credit card into the embedded Stripe field and clicking 'Save' results in the error:</p>
  <p>$Fatal Error Details = array:3 [
  &quot;message&quot; =&gt; &quot;Property 'currency' has not been set.&quot;
  &quot;code&quot; =&gt; null
  &quot;exception&quot; =&gt; BadMethodCallException {#1883
  #message: &quot;Property 'currency' has not been set.&quot;</p>
  <ul>
  <li><p>Full error log is below.</p>
  </li>
  <li><p>Frontend event registration payments for these same events function correctly, no errors. Issue is isolated to backend Stripe payments for events.</p>
  </li>
  <li><p>Issue is isolated to backend Event Registration payments only. Using 'Contact &gt; Contributions &gt; New C/C Contribution' for a donation works correctly, no errors.</p>
  </li>
  <li><p>Option for 'Send Confirmation and Receipt' is un-checked/disabled.</p>
  </li>
  <li><p>In Stripe, an &quot;Uncaptured&quot; payment is created.</p>
  </li>
  <li><p>No Contribution record of any Status is created in Civi.</p>
  </li>
  <li><p>'Civi &gt; Admin &gt; Localization' has 'Default Currency' set to 'USD'</p>
  </li>
  <li><p>'Individual Event config &gt; Fees' has 'Currency' set to 'USD'</p>
  </li>
  <li><p>These events all have available participant capacity.</p>
  </li>
  </ul>
  <p><strong>Site details:</strong></p>
  <ul>
  <li>CiviCRM 5.69.2</li>
  <li>Stripe Payment Processor 6.10.2</li>
  <li>Payment Shared 1.2.20</li>
  <li>Joomla 4.4.2 Stable</li>
  </ul>
  <p><strong>Full error log:</strong></p>
  <p>2024-02-07 08:49:20-0800  [error]
  $Fatal Error Details = array:3 [
  &quot;message&quot; =&gt; &quot;Property 'currency' has not been set.&quot;
  &quot;code&quot; =&gt; null
  &quot;exception&quot; =&gt; BadMethodCallException {#1883
  #message: &quot;Property 'currency' has not been set.&quot;
  #code: 0
  #file: &quot;/home/USER/public_html/administrator/components/com_civicrm/civicrm/Civi/Payment/PropertyBag.php&quot;
  #line: 322
  trace: {
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/Civi/Payment/PropertyBag.php:322 {
  Civi\Payment\PropertyBag-&gt;get($prop, $label)
  ›   }
  ›   throw new \BadMethodCallException(&quot;Property '$prop' has not been set.&quot;);
  › }
  }
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/Civi/Payment/PropertyBag.php:796 { …}
  /home/USER/public_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:259 { …}
  /home/USER/public_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:613 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Form/Participant.php:953 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Form/Participant.php:808 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php:625 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php:355 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Page/Tab.php:100 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Page/Tab.php:158 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:322 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm.php:121 { …}
  /home/USER/public_html/administrator/components/com_civicrm/civicrm.php:40 { …}
  /home/USER/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 { …}
  /home/USER/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 { …}
  /home/USER/public_html/libraries/src/Component/ComponentHelper.php:361 { …}
  /home/USER/public_html/libraries/src/Application/AdministratorApplication.php:143 { …}
  /home/USER/public_html/libraries/src/Application/AdministratorApplication.php:186 { …}
  /home/USER/public_html/libraries/src/Application/CMSApplication.php:293 { …}
  /home/USER/public_html/administrator/includes/app.php:61 { …}
  /home/USER/public_html/administrator/index.php:32 { …}
  }
  }
  ]</p>
  
Tags: <civievent><stripe><currency>
Title: Error "Property 'currency' has not been set." when using 'Submit Credit Card Event Registration' in Civi backend
ThreadText: # Error "Property 'currency' has not been set." when using 'Submit Credit Card Event Registration' in Civi backend
  
  (Asked by: username_0 on 2024-02-07)
  
  When staff attempt to use the Civi backend option:
  
  'Contact > Events > Submit Credit Card Event Registration'
  
  Entering a credit card into the embedded Stripe field and clicking 'Save' results in the error:
  
  $Fatal Error Details = array:3 [
  "message" => "Property 'currency' has not been set."
  "code" => null
  "exception" => BadMethodCallException {#1883
  #message: "Property 'currency' has not been set."
  
  * Full error log is below.
  * Frontend event registration payments for these same events function correctly, no errors. Issue is isolated to backend Stripe payments for events.
  * Issue is isolated to backend Event Registration payments only. Using 'Contact > Contributions > New C/C Contribution' for a donation works correctly, no errors.
  * Option for 'Send Confirmation and Receipt' is un-checked/disabled.
  * In Stripe, an "Uncaptured" payment is created.
  * No Contribution record of any Status is created in Civi.
  * 'Civi > Admin > Localization' has 'Default Currency' set to 'USD'
  * 'Individual Event config > Fees' has 'Currency' set to 'USD'
  * These events all have available participant capacity.
  
  **Site details:**
  
  * CiviCRM 5.69.2
  * Stripe Payment Processor 6.10.2
  * Payment Shared 1.2.20
  * Joomla 4.4.2 Stable
  
  **Full error log:**
  
  2024-02-07 08:49:20-0800 [error]
  $Fatal Error Details = array:3 [
  "message" => "Property 'currency' has not been set."
  "code" => null
  "exception" => BadMethodCallException {#1883
  #message: "Property 'currency' has not been set."
  #code: 0
  #file: "/home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php"
  #line: 322
  trace: {
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php:322 {
  Civi\Payment\PropertyBag->get($prop, $label)
  › }
  › throw new \BadMethodCallException("Property '$prop' has not been set.");
  › }
  }
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/Civi/Payment/PropertyBag.php:796 { …}
  /home/USER/public\_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:259 { …}
  /home/USER/public\_html/media/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php:613 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Participant.php:953 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Form/Participant.php:808 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Form.php:625 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php:355 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php:100 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Event/Page/Tab.php:158 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:322 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm.php:121 { …}
  /home/USER/public\_html/administrator/components/com\_civicrm/civicrm.php:40 { …}
  /home/USER/public\_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 { …}
  /home/USER/public\_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 { …}
  /home/USER/public\_html/libraries/src/Component/ComponentHelper.php:361 { …}
  /home/USER/public\_html/libraries/src/Application/AdministratorApplication.php:143 { …}
  /home/USER/public\_html/libraries/src/Application/AdministratorApplication.php:186 { …}
  /home/USER/public\_html/libraries/src/Application/CMSApplication.php:293 { …}
  /home/USER/public\_html/administrator/includes/app.php:61 { …}
  /home/USER/public\_html/administrator/index.php:32 { …}
  }
  }
  ]
  
  **Tags:** civievent, stripe, currency
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-07. Score: 0
  
  A proposed fix has just been written. Can you please check and give feedback on <https://github.com/civicrm/civicrm-core/pull/29313>
  
  > **Comments:**
  > **username_0**: We have tested this PR on our Civi 5.69.2 and unfortunately we are getting the exact same error logged. Apologies for the delayed response. Thank you for the suggested fix though, we will keep digging!  
  
  ---
  
  