samp.directory
← Скрипты и библиотеки

SeniorAm/game-server-payment-gateways

Bilingual FA/EN guide: connect SAMP, MTA, FiveM shops to ZarinPal, Zibal, IDPay and currency gateways with automatic item delivery.

Другое★ 0обновлён авг. 2026 г.MIT
Открыть на GitHub

README.md

اتصال درگاه پرداخت به سرور SAMP / MTA / FiveM

راهنمای عملی برای صاحب سرورهایی که می‌خوان بازیکن از سایت خرید کنه، درگاه پرداخت رو تایید کنه، و همون لحظه پول یا آیتم بره تو اکانت بازی. بدون تیکت. بدون ادمین وسط کار.

This repo is bilingual. فارسی پایین، English further down.


فارسی

اگه تا حالا اینجوری کار کردی که بازیکن کارت به کارت می‌کنه، اسکرین‌شات می‌فرسته، بعد یه ادمین باید دستی بهش وی‌آی‌پی بده، این راهنما همون چیزیه که کم داری.

کار درست اینه:

  1. بازیکن تو سایت لاگین می‌کنه (با همون یوزرنیم بازی)
  2. پکیج رو انتخاب می‌کنه
  3. می‌ره درگاه (زرین‌پال / زیبال / آیدی‌پی یا درگاه ارزی)
  4. پول رو می‌ده
  5. سایت از API خود درگاه می‌پرسه این تراکنش واقعاً successe یا نه
  6. اگه successe، همون لحظه تو دیتابیس بازی ذخیره می‌شه
  7. سرور بازی از دیتابیس می‌خونه و به بازیکن می‌ده

ادمین این وسط هیچ کاری نباید بکنه. اگه ادمین هنوز باید تایید کنه، سیستم‌ت نصفه است.

چی اینجاست؟

بخشلینک
از کجا شروع کنیdocs/fa/00-shoru.md
معماری کل سیستمdocs/fa/01-memari.md
زرین‌پالdocs/fa/02-zarinpal.md
زیبالdocs/fa/03-zibal.md
آیدی‌پیdocs/fa/04-idpay.md
درگاه ارزی / کریپتوdocs/fa/05-dargah-arzi.md
تحویل خودکار بدون ادمینdocs/fa/06-tahvil-khodkar.md
SAMPdocs/fa/07-samp.md
MTAdocs/fa/08-mta.md
FiveMdocs/fa/09-fivem.md
امنیت و اشتباهات رایجdocs/fa/10-amniyat.md
سوالات پرتکرارdocs/fa/11-soalat.md
خروجی واقعی API (کنسول)docs/fa/12-khoroji-api.md

نمونه کد PHP، SQL، Pawn و Lua هم تو پوشه examples هست. خروجی خام درگاه‌ها (همان چیزی که API برمی‌گرداند) تو examples/console است. کپی‌پیست کورکورانه نکن. اول بخون، بعد با گیم‌مد خودت جور کن.

یه نکته قبل از شروع

درگاه‌های ایرانی برای کالای مجازی قوانین خودشون رو دارن. قبل از اینکه مرچنت بگیری، تو پنل زرین‌پال / زیبال / آیدی‌پی ببین فروش آیتم بازی قبول می‌کنن یا نه. اگه موضوع فعالیت‌ت با قوانین درگاه نخونه، بعداً حساب‌ت بسته می‌شه و بازیکن‌ها پول‌شون معلق می‌مونه. این بخش رو جدی بگیر.

برای من قبول کردن باید اثبات کنید که یک راه درامد مالی هست و تفهیم کنید که پرداخت درون برنامه ای هستش


English

If your players still pay, send a screenshot, and wait for an admin to hand out VIP, this guide is for you.

The flow should be:

  1. Player logs into the shop with their game username
  2. Picks a package
  3. Pays on ZarinPal / Zibal / IDPay, or a currency / crypto gateway
  4. Your site asks the gateway API if that payment is real
  5. If it is, the item or money is written to the game database immediately
  6. The game server reads that row and gives it to the player

No admin in the middle. If an admin still has to click “approve”, the shop is unfinished.

Contents

Sample PHP, SQL, Pawn and Lua live in examples. Raw gateway responses (copy-paste console dumps) are in examples/console. Read them first. Then wire them into your gamemode, not a random one from 2014.

Iranian card gateways have their own rules for virtual goods. Check the merchant terms before you go live. If the gateway later freezes the account, players are the ones who get stuck.


تماس / Contact

سوال، باگ نمونه کد، یا اینکه یه بخش برات گنگه:

If something in the samples is wrong for your gamemode, say which server (SAMP / MTA / FiveM) and which database you use. “It doesn’t work” without that doesn’t help much.

cryptocurrencydonatefarsifivemgame-servergtaidpayiraniranianluamtapawnpayment-gatewaypersianphpsa-mpsamptutorialzarinpalzibal

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью