Conversation
gagnieray
left a comment
There was a problem hiding this comment.
I trust you completely regarding the changes related to PostgreSQL 😉
| method = JSON_UNQUOTE(JSON_EXTRACT(request, '$.data.object.payment_method_types[0]')), | ||
| receipt_url = JSON_UNQUOTE(JSON_EXTRACT(request, '$.receipt_url')); |
There was a problem hiding this comment.
These ones shouldn't be dropped. Eventually use COALESCE if they are not part of the original request.
There was a problem hiding this comment.
method: createPaymentIntent() was always using ['card'] in v0.0.3 (_routes.php:200, Stripe.php:413); I've added it below - no need for a complex JSON query.
As far as I understood, recipt_url was previousely not stored - information about the URL or the METHOD is not present.
Also, you use JSON methods, while it was serialized in last table - upgrading from a 0.3 would have failed. I guess this works as expected only from on of the unstable releases :/
To be honest, this is not easy to follow or understand... :D
| method = request #>> '{data,object,payment_method_types,0}', | ||
| receipt_url = request #>> '{receipt_url}'; |
There was a problem hiding this comment.
Same comment as for upgrade-to-1.0.0-mysql.sql : these ones shouldn't be dropped. Eventually use COALESCE id they are not part of the original request.
| ), | ||
| method = request #>> '{data,object,payment_method_types,0}', | ||
| receipt_url = request #>> '{receipt_url}'; | ||
| member_id = COALESCE(substring(request from '"adherent_id";s:[0-9]+:"([0-9]+)"')::integer, 0); |
There was a problem hiding this comment.
Same question as for upgrade-to-1.0.0-mysql.sql : did you make this change because you think it is more reliable/simple to use the previous adherent_id than the value in the original request ?
| state = CASE state | ||
| WHEN 0 THEN 3 | ||
| WHEN 2 THEN 1 | ||
| WHEN 3 THEN 2 |
There was a problem hiding this comment.
| WHEN 3 THEN 2 | |
| WHEN 3 THEN 4 |
| state = CASE state | ||
| WHEN 0 THEN 3 | ||
| WHEN 2 THEN 1 | ||
| WHEN 3 THEN 2 |
There was a problem hiding this comment.
| WHEN 3 THEN 2 | |
| WHEN 3 THEN 4 |
| WHEN state = 0 THEN 3 | ||
| state = CASE state | ||
| WHEN 0 THEN 3 | ||
| WHEN 2 THEN 1 |
Without it, entries state was never updated and a notification sent again was stored twice.
Test environment sets PDO::ATTR_STRINGIFY_FETCHES, the history page could not be displayed there.
Their metadata are PHP serialized, states had other values, and prices are kept as core contributions types amounts when those are not set.
0138b0d to
a52fe8e
Compare
Co-authored-by: Guillaume AGNIERAY <107203963+gagnieray@users.noreply.github.com>
…od of legacy payments
No description provided.