Skip to content

A Laravel package for connecting to all Iranian Banks

License

Notifications You must be signed in to change notification settings

AmirAghighi02/gateway

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

گرفتن اطلاعات درگاه از دیتابیس : با استفاده از جدول gateways اطلاعات رو در دیتابیس ذخیره کنید:

name = نام درگاه
config = اطلاعات درگاه (به صورت جیسون )
is_default = پیشفرض بودن درگاه

  • ممکنه چندین اطلاعات متفاوت برای یک درگاه داشته باشید و بخواین یکیشون اطلاعات پیشفرضتون باشه. با تغییر این فیلد به true این اتفاق میافتته.




برای assign کردن یک درگاه به یوزر بعد از مایگریت کردن دیتابیس :

  • تریت HasGateway رو به مدل User اضافه کنید
    درگاه رو به یوزر اضافه کنید :
 $gatewayModel = َApp\Models\Gateway::first();
 $user->attachGateway($gatewayModel)  /// مدل یا آی دی مدل رو به عنوان ورودی به تابع میدیم
/// or  $user->attachGateway($gateway->id)

حالا موقع استفاده از تابع make از فساد gateway یوزر رو به عنوان ورودی دوم بدید :

 $gateway = \Gateway::make('saman',$user);

About

A Laravel package for connecting to all Iranian Banks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 93.4%
  • Blade 6.6%