Skip to content

Commit

Permalink
Update transaction process definition
Browse files Browse the repository at this point in the history
  • Loading branch information
lyyder committed Jun 25, 2020
1 parent b1d5fc0 commit f2ee11b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
11 changes: 5 additions & 6 deletions ext/transaction-process/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ This is the transaction process that the Flex Template for Web is designed to wo
The `process.edn` file describes the process flow while the `templates` folder contains notification
messages that are used by the process.

The process uses day-based booking and night-based pricing i.e. the quantity of booked units is
defined by the number of nights in the booking. The process has preauthorization and it relies on
the provider to accept booking requests.

For different process descriptions for varying booking and pricing models, see the
[Flex example processes repository](https://github.com/sharetribe/flex-example-processes)
Bookings in the process are day-based. Pricing uses privileged transitions and
the
[privileged-set-line-items](https://www.sharetribe.com/docs/references/transaction-process-actions/#actionprivileged-set-line-items)
action. The process has preauthorization and it relies on the provider to accept
booking requests.
14 changes: 6 additions & 8 deletions ext/transaction-process/process.edn
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@
:actions
[{:name :action/create-booking,
:config {:observe-availability? true}}
{:name :action/calculate-tx-nightly-total-price}
{:name :action/calculate-tx-provider-commission,
:config {:commission 0.1M}}
{:name :action/privileged-set-line-items}
{:name :action/stripe-create-payment-intent}],
:to :state/pending-payment}
:to :state/pending-payment
:privileged? true}
{:name :transition/request-payment-after-enquiry,
:actor :actor.role/customer,
:actions
[{:name :action/create-booking,
:config {:observe-availability? true}}
{:name :action/calculate-tx-nightly-total-price}
{:name :action/calculate-tx-provider-commission,
:config {:commission 0.1M}}
{:name :action/privileged-set-line-items}
{:name :action/stripe-create-payment-intent}],
:from :state/enquiry,
:to :state/pending-payment}
:to :state/pending-payment
:privileged? true}
{:name :transition/expire-payment,
:at
{:fn/plus
Expand Down

0 comments on commit f2ee11b

Please sign in to comment.