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

Shetabit master #291

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aliqasemzadeh
Copy link
Contributor

Description

Describe your changes in detail.

Motivation and context

Why is this change required? What problem does it solve?

If it fixes an open issue, please link to the issue here (if you write fixes #num
or closes #num, the issue will be automatically closed when the pull is accepted.)

How has this been tested?

Please describe in detail how you tested your changes.

Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (if appropriate)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

Replaced the HTTP client code with cURL to handle API requests for the Zibal payment gateway. The change aims to streamline the request process, encapsulating the data and headers setup within the cURL functions.
This change removes the client object and switches to using cURL for handling the payment verification process. The updated implementation uses direct cURL functions to set the request parameters and handle the response, streamlining the verification process. Additionally, the `orderId` variable was removed as it was unused.
Replaced verbose cURL initialization with a streamlined approach using parameter arrays and JSON encoding. This improves readability and maintainability while preserving functionality. Added `ext-curl` dependency in composer.json to ensure required PHP extensions are declared.
Cleaned up redundant `@throws` annotations for GuzzleException in the `purchase` and `verify` methods. This improves code readability and maintains alignment with current code behavior.
Changed the return type from string to RedirectionForm in the redirectWithForm method of the Driver class. This ensures better type safety and clarity in the codebase.
@alissn
Copy link
Contributor

alissn commented Dec 31, 2024

سلام
وقت بخیر

امکانش هست یه توضیح در اینکه چی شد از guzzle به curl تغییر داده شد بدین🙏...(#283) باگ امنیتی چیزی برای guzzle گزارش شده؟ (برای اطلاعات خودم میخوام)
چون به نظرم guzzle خیلی تمیز تر و قابل فهمتر هستش.
@aliqasemzadeh @khanzadimahdi

@aliqasemzadeh
Copy link
Contributor Author

@alissn
کار نمی کرد
به نظرم بهتره از Http Client لارول استفاده کنیم.

@alissn
Copy link
Contributor

alissn commented Dec 31, 2024

@aliqasemzadeh

من توکن برای تست کردنش ندارم. ارور خاصی میداد؟ یا اتفاق خاصی تو روند ارسال به درگاه می افتاد؟
خود HTTP لاراول هم از Guzzle برای ارسال درخواست هاش استفاده میکنه... میتونید کلاس هاشو ببیند خودتون

تا جایی که من میدونم از این پکیج برای پروژه های غیر لاراولی هم استفاده میشه، بهتره که این روند حفظ بشه... البته که تصمیم گیرنده اصلی آقا مهدی هستن. @khanzadimahdi

@aliqasemzadeh
Copy link
Contributor Author

@alissn
متاسفانه کدهایی که اضافه میشه فقط نوشته شده کسی تست نمی کنه!
من خودم Http Guzzle را بیشتر دوست دارم.

@alissn
Copy link
Contributor

alissn commented Dec 31, 2024

@aliqasemzadeh

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

به هر حال من متوجه دلیل تغییرش نشدم...
مرسی که وقت گذاشتین

@khanzadimahdi
Copy link
Member

@aliqasemzadeh

لطفا کانفلیکت ها رو رفع کنید. الان کانفلیکت خورده و نمیشه مرج کرد.

@aliqasemzadeh
Copy link
Contributor Author

@khanzadimahdi
Copy link
Member

@khanzadimahdi aliqasemzadeh#1

شما از روی این برنچ PR ساختین روی fork خودتون. باید خودتون اونو resolve کنید و مرج کنید.

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

Successfully merging this pull request may close these issues.

3 participants