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

Possibility with integrating with new ERC20 token #6

Open
DannyBoy5240 opened this issue Mar 13, 2023 · 8 comments
Open

Possibility with integrating with new ERC20 token #6

DannyBoy5240 opened this issue Mar 13, 2023 · 8 comments

Comments

@DannyBoy5240
Copy link

Dear contributors!
How are you? Hope you are well and everything is going well.

First of all, thanks for your effort and dedication to this project.
Currently I am building a project and while investigating and searching, I found your project.
And I thought your project is well-suite and is very necessary.
So I would like to use your project for it.
By the way, I would like to ask a few questions about it.
Hope you understand me and I appreciate if you answer my questions as soon as possible.

I have a magento2 project and I am gonna implement all the payments done by new made ERC20 token on private Ethereum chain.
What I mean is that I have new made ERC20 token on private Ethereum chain. It is still in test case, so I have test tokens.
So what I would like to know is that with your project, can I implement such a kind of my problem
If it is possible, it will be very great! If it possible, then can you please let me know how to do it briefly?
But if not, then what other solutions can you recommend me?

I would like to know these things.
Please read it carefully and let me know.

Thanks for again from bottom of my heart.
Kind regards

@torys877
Copy link
Owner

Hello @DannyBoy5240

This module is implemented for ether payment only, to use it for ERC20 payment you need modify it anyway. I'm going to create new one with tokens payment, but still does not have enough time :).

so, main payment function is:
https://github.com/torys877/crypto-metamask-eth-payment/blob/main/view/frontend/web/js/web3payment.js#L128
Funcion above just send direct transaction, but not uses smart contract

But I have module with ERC20, you can combine both modules and try to implement what you need
claim ERC20 tokens, just for example:
https://github.com/torys877/crypto-magento-discount-token/blob/main/view/frontend/web/js/customer/web3component.js#L74

@DannyBoy5240
Copy link
Author

Hi. @torys877

Thanks for your swift and clear response.
Mainly I got your points and I will try to implement with using the two modules you mentioned.
If everything is going well, I will definitely let you know. And if you want or need, then I can share it to you.
Or if I have some questions, then I will ask you. Is it okay for you? Hope you understand me.

I would like to know one thing about the 'crypto-metamask-eth-payment'.
I tried to install this module to my Magento2.4.4 project according to your instruction on github.
In admin panel, I can see installed module like this :
image
But in client panel, I can't find Ether Payment option :
image
Could you please help me to find the issue?
I tried to solve the problem for a while but I can't. And I need it urgently.
Please help me to solve this issue.
Look forward to hearing from you as soon as possible.

Thanks again from bottom of my heart.
Warm regards

From the member who loves and interested in your projects...

@torys877
Copy link
Owner

@DannyBoy5240

There also need ETH currency set for store and on store front you should also change currency from current to ETH currency.

After it you should see catalog product with ETH currency and on checkout you should see payment method

@DannyBoy5240
Copy link
Author

Thank you very much for your support and kindness!

I followed you and it works! Really thank you!

By the way, may I ask you a few things more?
In Magento2.4.4, it displays default currency rate support Fixer.io but I think it doesn't work well now ( of course, mainly crypto part ).
So for this I found github.com/ecommpro/custom-currency/ and installed it and worked with it.

I appreciate if you inform me about these two questions too!
Anyway thanks again from bottom of my heart for your support and kindness.
If you agree, then I would like to be your friend, dev partner :)

Thanks very much!
Warm regards

@DannyBoy5240
Copy link
Author

Hello. Sorry, but one more question...
I installed the module : https://github.com/torys877/crypto-metamask-eth-payment/blob/main/view/frontend/web/js/web3payment.js#L128
I think I have followed you but I wonder what I have missed.
When I purchase products, it shows Connect Wallet button but if I click that button, connect metamask function doesn't work.
When I take a look in my order page, there is no button : ETH Payment.
What do I missed do you think? Please teach me.
image
Thanks.

@torys877
Copy link
Owner

Hi @DannyBoy5240

First of all, my modules were made just because I'd like to use blockchain directly as it should be. From peer to peer. And it is a bit more difficult, than use some payment gateway.

For your purposes, maybe it would be better to use some third party services, if you need implement faster.

Some of them, as I know, have modules for magento for pay in cryptocurrency.
For example:
https://marketplace.magento.com/coinremitter-magento2.html
https://marketplace.magento.com/coingate-magento2-plugin.html

About questions:

  1. I don't know modules for crypto currency rate, I'm going to create one, but later maybe and for it I'd use some crypto exchange api to get current stock rate. Or maybe even some decentralized exchange api. I've not researched this area deeply yet. To implement it you need, for example, use free Binance api to get its currency rate and update rate in magento by cron, for example one time per hour/minute etc.

  2. Anyway, magento is quite complicated system, so it is not enough to combine and change only 2 files. I think there will be much more work.

  3. unfortunately, I don't have enough information to help you with button, I even don't know what page is on your screen :). It can be email, custom page, success page, customer order page, any other implementation :).

  4. and I would not like to continue discussion here, because it seems a bit private, if you have any question I can help, when I have free time, but in direct messages. So, feel free to connect me on linkedin - https://www.linkedin.com/in/igor-alekseyenko/

Thanks, for your interest

@DannyBoy5240
Copy link
Author

Dear @torys877

Thanks for your kind support and help.
I followed you and mainly works fine.
By the way, I have one more question.
In admin panel, there is Lifetime sales, Average order etc.
How can I update this? Though there are several payment transactions but it isn't updated.
image
What do I miss?
Please help me with this.

Thanks again for your kind support.

@DannyBoy5240
Copy link
Author

Hello. @torys877 Long time no see. How are you?
Hope everything goes well in your work and life.

I have got a small problem with using this project. It is very helpful and I enjoyed working with this.
By the way, when I order and make a payment, how can I get current purchasing product category type and sub category type information? How can I customize your project?

Look forward to hearing from your response soon.
Best regards

Repository owner deleted a comment from sabrinekhoualdi Feb 23, 2024
Repository owner deleted a comment from alvesmariadefatima Feb 23, 2024
Repository owner deleted a comment from alexandresimoesf Feb 23, 2024
Repository owner deleted a comment from SuryaSg Feb 23, 2024
Repository owner deleted a comment Feb 23, 2024
Repository owner deleted a comment from jabreuint Mar 19, 2024
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

3 participants
@torys877 @DannyBoy5240 and others