anypay / web3-checkout

2 stars 1 forks source link

"Pay USDC" on Polygon Button That Opens Metamask #89

Open owenkellogg opened 1 year ago

owenkellogg commented 1 year ago

When USDC on Polygon is an option, display the button and then open Metamask and prompt user to approve transaction.

owenkellogg commented 1 year ago

Plan for USDC payments development:

By the end of this development mini sprint new use will be concentrated around making payments in the web for polygon and solana using two web-based wallets: metamask and phantom. Those manually wallets will serve as a testing ground for USDC payments using wallet bot and ultimately Edge. Adjustment will come to the web checkout sdk to display payment option buttons for USDC on Polygon and USDT on Polygon, as well as native MATIC tokens. The button should only be display for invoices that have USDC on Polygon as an option. It will work by clicking the Pay USDC button which will prompt to open and authorize metamask. The resultant transaction hex and metadata is returned to the browser where they anypay sdk is used to submit that transaction for validation and ultimately confirmation before updating users. The user interface should update in real time in response to transaction and consensus events, especially for solana transactions since those have a quick confirming period so the interface must respond in real time over web sockets. Polygon transactions will immediately go into a "confirming" state thereby preventing additional transaction submissions. Within a matter of seconds or minutes the polygon transaction will confirm and websocket / webhook clients are notified.

All the same principal patterns from Polygon and metamask apply to Solana and its popular phantom wallet. But that can come next after the first Polygon implementation is in a solid proof of concept complete stage.

powco-dev[bot] commented 1 year ago

Thank you for making this issue!

Please get it some attention by boosting it here https://powco.dev/github/anypay/web-checkout-sdk/issues/89

Bounties may be sent to this address https://whatsonchain.com/address/1Ad1UMMKAChTaVAhxUXizosq2pnmdMV17v and will be paid to the worker who completes your issue.

powco-dev[bot] commented 1 year ago

Thank you for making this issue!

Please get it some attention by boosting it here https://powco.dev/github/anypay/web-checkout-sdk/issues/89

Bounties may be sent to this address https://whatsonchain.com/address/1Ad1UMMKAChTaVAhxUXizosq2pnmdMV17v and will be paid to the worker who completes your issue.

derrickhorton commented 1 year ago

This appears to exist now. Mark complete? @owenkellogg

Screenshot 2023-04-19 at 14 35 45
owenkellogg commented 1 year ago

No it isn't merged into production

owenkellogg commented 1 year ago

Isn't that next.anypayx.com?

derrickhorton commented 1 year ago

Ah yes, right, thank you! Looks good.