Skip to content

Revamp for PHP 8.x and Magento 2#13

Open
napoly wants to merge 1 commit intomonero-integrations:masterfrom
napoly:revamp-magento2
Open

Revamp for PHP 8.x and Magento 2#13
napoly wants to merge 1 commit intomonero-integrations:masterfrom
napoly:revamp-magento2

Conversation

@napoly
Copy link

@napoly napoly commented Mar 28, 2024

should resolve: #12

  • adds number of confirmation ability
  • switches to sub-addresses
  • added zero unlock time for tx

For a live demonstration that can be tested, please run a Monero wallet RPC locally (host.docker.internal) and follow the manual setup instructions for Dockerized Magento available at https://github.com/napoly/docker-monero-magento/tree/monero-integration.

@serhack
Copy link
Member

serhack commented Jun 22, 2024

Hey sorry for the wait, but I didn't get any notifications about this :( Did you already try to run it?

@napoly
Copy link
Author

napoly commented Jun 23, 2024

Hey!.. no worries.. yes, there shouldn't be a problem to run it in docker if you follow https://github.com/napoly/docker-monero-magento/tree/monero-integration?tab=readme-ov-file#manual-setup

@napoly napoly requested a review from serhack October 9, 2024 03:30
Copy link
Member

@serhack serhack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review my comments and adjust as necessary.

Thanks a lot for the contribution!

 - adds number of confirmation ability
 - switches to sub-addresses
 - added zero unlock time for tx
@napoly
Copy link
Author

napoly commented Oct 24, 2024

Thanks! It's still a very rough MVP, but it would be great to hook it up on Packagist so folks can try it out and provide feedback.

@napoly napoly requested a review from serhack October 24, 2024 07:42
$first = $_GET['first'];
$errors = [];

if (isset($_GET['first'])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticing this, why $_GET? Are we sending everything as a GET? I would prefer a POST

Besides keeping the URL relatively cleaner, POST also lets you send much more information (as URLs are limited in length, for all practical purposes), and lets you send just about any type of data (file upload forms, for example, can't use GET -- they have to use POST plus a special content type/encoding).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better first ---> first_name

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line if (isset($_GET['first'])) { checks if the 'first' parameter is present in the URL query string. $_GET is a superglobal array in PHP that contains data sent via the URL. I'm not the original author of the code but I believe the shortened parameter version like 'first' was used intentionally as the URL length has some limitations.

}
if(isset($_GET['last'])){
$last = $_GET['last'];
if (isset($_GET['last'])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better last ---> last_name

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is being mapped to last name in $orderData: 'lastname' => $last,

<option value='WY'>Wyoming</option>
</select>
<br></br>
<form id='city' action='MoneroPayment' action='post'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The form here seems to send all the datas via POST, not sure why we needed GET?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a two-step process: first, retrieving the data from the URL using a GET request, and then, after the user fills in the data, sending it further through a POST request to the system.

@napoly napoly requested a review from serhack April 5, 2025 07:39
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.

Payment Module does not Show up (In admin panel)

2 participants