[REF] calculate 'amount' on ContributionPage in a shared way in one scenario
I have discovered a lot of tests are creating invalid contributions - https://github.com/civicrm/civicrm-core/pull/15706
So far the issues have been in the test + us permitting something that doesn't work on the form - ie https://github.com/civicrm/civicrm-core/pull/15771
I'm trying to work through them all & then we can ideally validate payments in general. In this case
it turns out that because 'amount' is currently a 'required' parameter the tests have 'any value' stuck in there.
In a real submission it would be calculated so I'm trying to share the code that would do that with
the path used by the test (& in this case the api) and to move towards getting the tests valid