feat(payment): enhance payment flow with new pay endpoint and POST redirect method

This commit is contained in:
hamed
2026-07-02 12:19:43 +03:30
parent 02c34bac8e
commit 1e342a695f
5 changed files with 129 additions and 19 deletions
@@ -4,10 +4,16 @@ namespace App\Payment\Gateway;
final class PaymentInitResult
{
/**
* @param 'GET'|'POST' $redirectMethod نحوهٔ انتقال به درگاه: GET (302) یا POST (فرم auto-submit)
* @param array<string, string> $redirectParams فیلدهای فرم برای حالت POST
*/
public function __construct(
public readonly bool $success,
public readonly string $redirectUrl = '',
public readonly string $token = '',
public readonly string $errorMessage = '',
public readonly string $redirectMethod = 'GET',
public readonly array $redirectParams = [],
) {}
}