فهرست مستندات پروژه
وندار
درگاه پرداخت Vandar. مبتنی بر REST.
پیکربندی
use Eram\Pardakht\Gateway\Vandar\VandarConfig;
$config = new VandarConfig(
apiKey: 'کلید-API-شما',
);
| پارامتر | نوع | الزامی | توضیحات |
|---|---|---|---|
apiKey | string | بله | کلید API وندار |
خرید
$gateway = $pardakht->create('vandar', $config);
$response = $gateway->purchase(new PurchaseRequest(
amount: Amount::fromToman(50_000),
callbackUrl: 'https://example.com/callback',
orderId: 'ORDER-123',
));
header('Location: ' . $response->getUrl());
تایید
$transaction = $gateway->verify();
تسویه
نیاز نیست. پرداختها بهطور خودکار تسویه میشوند.
نکات
- مبتنی بر REST
- مبلغ به ریال ارسال میشود
⁅درگاه پرداخت vandar مبتنی بر rest use eram pardakht gateway vandar vandarconfig config new vandarconfig apikey کلید api شما پارامتر نوع الزامی توضیح apikey string بله کلید api وندار gateway pardakht create vandar config response gateway purchase new purchaserequest amount amount fromtoman 50 000 callbackurl https example com callback orderid order 123 header location response geturl transaction gateway verify نیاز نیست پرداخت بهطور به طور خودکار تسویه شد مبتنی بر rest مبلغ به ریال ارسال شد⁆
⁅وندار⁆
⁅پیکربندیخریدتاییدتسویهنک⁆