The idea is that we will marshal the payment, send it to the campsite’s instance by email, and then unmarshal it as a booking, that way we can have a one way replication from the internal to the public instance with a way back to send the payments. For testing purposes, i just create the booking in the same instance. Had to change the booking relation’s permissions to allow insert from a guest, much like for payments, because the notification from Redsys comes as a guest connection. I need this even with all the marshal/unmarshal shenanigans because not everyone will have an internal instance, thus need to allow bookings from guest connections.
8 lines
136 B
PL/PgSQL
8 lines
136 B
PL/PgSQL
-- Verify camper:marshal_payment on pg
|
|
|
|
begin;
|
|
|
|
select has_function_privilege('camper.marshal_payment(integer)', 'execute');
|
|
|
|
rollback;
|