Skip to content

Sending Fiat Tips

mayeaux edited this page Apr 4, 2022 · 3 revisions

Sending Fiat Tips is enabled via our payment processor.

The relevant code is in the handleSubmit function which makes the call to doSendCashTip at ui/component/walletSendTip/view.jsx:195

This ends up making the call in wallet.js at ui/redux/actions/wallet.js:718

Currently, a creator must have a bank account added to be able to receive cash tips. A viewer must also have a card connection to be able to give a tip.

You can add a test bank account to receive tips at: http://localhost:9090/$/settings/tip_account You can just hit the 'Use test info' button in each instance.

You can also add a card for testing at: http://localhost:9090/$/settings/card You can use 4242 4242 4242 4242 , any valid future date for expiry, any 3 numbers for CVV

This is a good test card, you can also test other scenarios (for example insufficient funds) with specific test cards at: https://stripe.com/docs/testing#declined-payments

Two checks are done while giving a tip to make sure that a card and a bank account are both present, at:

ui/component/walletTipAmountSelector/view.jsx:118 (checks customer's card) ui/component/walletTipAmountSelector/view.jsx:140 (checks creator's bank account)

A test channel that you can use to send tips to (that has a bank account added is): http://localhost:9090/@test35234:0b67b972c8e9a15ebc5fd1f316ad38460767c939?view=content

Clone this wiki locally