Repository navigation
Pay through Rotur payment requests - #108
Merged
Merged
Conversation
Deploying scratch-gui with
|
| Latest commit: |
3679823
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7f2c91d9.scratch-gui.pages.dev |
| Branch Preview URL: | https://rotur-payment-requests.scratch-gui.pages.dev |
Mistium
force-pushed
the
rotur-payment-requests
branch
from
October 2, 2026 17:35
ae2a1fa to
c740b2b
Compare
This was referenced Oct 2, 2026
Buying a project or game product, donating with a comment and refunding a game product now open Rotur's approve page in a window. The person approves the payment there with their password, and mistwarp-api confirms it with Rotur. MistWarp no longer moves credits with the person's own token, so it no longer needs credits:transfer for any of these. Supporting a project and donating on a profile link to the person's Rotur pay page. New bounties are paused until Rotur can hold credits for them; funded bounties still pay out and can be cancelled. The admin payouts warning goes, with the payouts queue it reported on.
Declining on Rotur, letting the request expire or closing its window now shows "Payment cancelled." on the project page, in the game shop and on a donation, as the products modal does for refunds, instead of nothing.
…current mistwarp-api refuses purchase intents without a returnUrl, which only editors and exports from before payment requests leave out.
Mistium
force-pushed
the
rotur-payment-requests
branch
from
October 3, 2026 07:47
f96a68d to
3679823
Compare
mc20000-01
pushed a commit
to mc20000-01/scratch-gui
that referenced
this pull request
Nov 7, 2026
Pay through Rotur payment requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buying a project or a game product, donating with a comment, and refunding a game product now go through Rotur payment requests (https://docs.rotur.dev/build-an-app/payments). MistWarp no longer moves credits with the person's own token, so none of these need
credits:transfer.Deploy together with MistWarp/api#31. That PR changes the intent and confirm calls this one makes: intents answer
{key, requestId, approveUrl}and confirms take{key}. Neither side works with the other side's old version.How paying works
{type: 'rotur:payment', id, status}back to this page (checked againsthttps://rotur.devand the request id), then mistwarp-api confirms with Rotur and delivers the purchase. If the window just closes, the page still asks mistwarp-api twice, in case it was paid but couldn't say so. Nothing on this page decides what was paid.The shared code is in
src/lib/rotur/payment-window.js, used by:purchase.jsand the confirm dialog on the project page.game-shop.js). A packaged game isn't on MistWarp's origin, so Rotur can't message it, and it asks mistwarp-api until the payment shows up or the window closes.CommentThread.jsx. The comment is posted with the donation's key, once it's paid.refundKey.Links instead of transfers
rotur.dev/pay/<username>in a new tab, with a note. These are gifts from one person to another, with nothing to deliver, so a payment request isn't needed.Removed
sendCommercePayment,payUser,createCommerceBountyandisInsufficientFunds. Rotur now checks the balance on its approve page.Screenshots
The community site at this branch, with mistwarp-api and api.rotur.dev mocked. The Rotur window is the live rotur.dev approve page, fed a mocked payment request.
Confirming a purchase (Firefox). Since #114 there's no balance line; Rotur shows the balance on its own page:

Waiting while Rotur's window is open (Firefox):

Rotur's approve page, with the split between the creator and MistWarp:

Paid. Rotur tells MistWarp and closes the window:

The project is unlocked and loading (Firefox):

Declined on Rotur (Firefox). Declining, an expired request and closing the window all show "Payment cancelled." on the project page, in the game shop, on donations and in packaged games:

The same flow passes end to end in Chromium and in Firefox: intent, approval, the
rotur:paymentmessage, confirm and unlock.Testing
rotur-payment-window.test.jsis new.developafter Remove the wallet, and send people to Rotur for their credits #114 and Stop projects moving credits through the Rotur bridge #115. The conflicts in the buy confirmation,credits.js,Profile.jsxandclient.jskeep Remove the wallet, and send people to Rotur for their credits #114's wallet removal (no balance lookup, no wallet link) and this PR's payment window.isPaymentPermissionErrorinclient.jswent too: withclaimDailyandpayUserboth gone, nothing used it.pnpm run test:unit:ci: 1950 tests in 326 suites), and so dopnpm lint,deps:check,i18n:community:check,i18n:editor:checkandcheck:community-css.