Revamp for PHP 8.x and Magento 2#13
Revamp for PHP 8.x and Magento 2#13napoly wants to merge 1 commit intomonero-integrations:masterfrom
Conversation
|
Hey sorry for the wait, but I didn't get any notifications about this :( Did you already try to run it? |
|
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 |
- adds number of confirmation ability - switches to sub-addresses - added zero unlock time for tx
3c4a25d to
fe01d21
Compare
|
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. |
| $first = $_GET['first']; | ||
| $errors = []; | ||
|
|
||
| if (isset($_GET['first'])) { |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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'])) { |
There was a problem hiding this comment.
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'> |
There was a problem hiding this comment.
The form here seems to send all the datas via POST, not sure why we needed GET?
There was a problem hiding this comment.
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.
should resolve: #12
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.