Payments
How the gateway abstraction works and what a real provider needs.
The honest version
The core ships with a gateway abstraction, not with a provider baked in.
App\Services\Payments\PaymentGateway the contract
App\Services\Payments\PaymentManager the registry
App\Services\Payments\MockGateway what a fresh install has
A module registers its gateway in a service provider; checkout lists whatever is registered. So the money always moves through your merchant account with your provider, and the core never knows which one.
What a fresh installation has
Only the mock gateway. It marks an order as paid, issues tickets and skips the redirect to a payment page. That is what the demo uses, and it is enough to rehearse the whole flow — seat hold, order, tickets, PDF.
It does not move money and must not be offered to buyers on a live site.
Connecting a real provider
A live provider is a module. During installation one of these is attached to your merchant account:
- Robokassa — cards, SBP and wallets for rouble payments.
- Stripe — international cards.
Your provider gives you a shop identifier, a password and a signature algorithm. They go into the module settings, never into the code.
The confirmation path
This is the part that decides whether you lose money, so it is worth reading even if someone else does the setup.
- The site creates an order with a status of pending and holds the selected seats for one hour.
- The buyer is redirected to the provider.
- The provider calls your result URL from its server, with a signature.
- The site verifies the signature, compares the amount with the order and only then marks it paid.
- Tickets with QR codes are issued. If the same notification arrives twice, the second one finds the order already paid and does nothing.
The Success URL the buyer returns to is cosmetic: a buyer can close the tab and the order is still confirmed by the server callback. A buyer can also forge a success page, which is why nothing is issued there.
Sandbox first
Every provider has a test mode. Run at least one full purchase in it — including a deliberately failed payment and a repeated notification — before switching the live credentials on.
Refunds
Refunds are made in the provider's dashboard. The admin panel records the status change on the order; it does not call the provider's refund API, because that requires permissions most shops do not grant to a website.
If an order is stuck as pending
Check, in this order: the result URL in the provider's dashboard, the provider's own log of notifications, and storage/logs/laravel.log. A wrong result URL is the single most common cause — the buyer pays, the site never hears about it, the seats are released after an hour.
Not covered here?
Write to sales@scenecms.com — we answer within one business day.