Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

توضیحات، ایمیل و شماره تلفن برای هر درخواست #190

Open
Masoud180 opened this issue Aug 7, 2019 · 3 comments

Comments

@Masoud180
Copy link

سلام خدمت شما
در بخش تنظیمات درگاه ها، به عنوان مثال زرین پال، ایمیل، شماره و توضیحات تراکنش را در تنظیمات مشخص کرده اید. چطور هنگام اجرای درخواست پرداخت این مقادیر در آن لحظه و طبق سفارش کاربر مقدار دهی شوند؟
ممنون از شما

@hamed-ehtesham
Copy link

سلام
بعد از این که
gateway
رو ساختید با متدهای مختلف میتونید این کار رو انجام بدید:

$gateway = \Gateway::make(new \Mellat());

   // $gateway->setCallback(url('/path/to/callback/route')); You can also change the callback
   $gateway
        ->price(1000)
        ->setDescription('description')
        ->setEmail('email')
        ->setMobileNumber('number')
        ->ready();

@Masoud180
Copy link
Author

ممنون
ولی خطا میده
هر کدوم از متد های توضیحات، ایمیل و تلفن وجود داشته باشه خطا میده.

این خطا:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function setEmail() on null

مشکل از کجا میتونه باشه؟

@hamed-ehtesham
Copy link

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

$zarin = new \Zarinpal();

$zarin
    ->setDescription('description')
    ->setEmail('email')
    ->setMobileNumber('number');

$gateway = \Gateway::make($zarin);

   // $gateway->setCallback(url('/path/to/callback/route')); You can also change the callback
   $gateway
        ->price(1000)
        ->ready();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants