Browse project documentation

Parsian (Pec)

Pardakhtv1.0.0-beta.4View sourceEnglish / Persian

Parsian E-Commerce gateway. SOAP-based with mandatory settlement step.

Configuration

use Eram\Pardakht\Gateway\Parsian\ParsianConfig;

$config = new ParsianConfig(
    pin: 'your-pin-code',
);
ParameterTypeRequiredDescription
pinstringYesPIN code from Parsian bank

Purchase

$gateway = $pardakht->create('parsian', $config);

$response = $gateway->purchase(new PurchaseRequest(
    amount: Amount::fromToman(50_000),
    callbackUrl: 'https://example.com/callback',
    orderId: 'ORDER-123',
));

// POST form redirect
echo $response->renderAutoSubmitForm();

Verify

$transaction = $gateway->verify();

Settlement (Required)

Parsian requires settlement after verification. Unsettled payments are reversed automatically.

use Eram\Pardakht\Contracts\SupportsSettlement;

if ($gateway instanceof SupportsSettlement) {
    $transaction = $gateway->settle($transaction);
}

Notes

  • SOAP-based — requires ext-soap
  • Uses POST form redirect (not GET)
  • Settlement is mandatory
  • Amount is sent in Rials

Search documentation

Search across all projects. Close this window to return to your guide.

Tab to navigate · Enter to openEsc to close