Bitcoin Forum
July 17, 2024, 05:21:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to add add payment button to website and check if transaction was successful  (Read 45 times)
indubhushan (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 1


View Profile
July 16, 2024, 02:02:43 PM
Merited by ABCbits (1)
 #1

Hello. I am beginner/junior programmer (asp.net/c#), and want to grow as developer of websites which sell goods & services. I was struggling with adding payment systems (WayForPay and LiqPay) to my website, but after no success decided to switch to accepting bitcoin.

I want to have a possibility on my website to pay to bitcoin-address/wallet. I never used bitcoin before, so I am very new to all this and don't know what to begin with.
Ideally, what I want, is that buyer should be able to pay from his visa/master-card bank-card(s), just by entering xxxx-xxxx-xxxx-xxxx card-number, month/year, and cvv code (or pay using GooglePay or app of his bank, so no need to enter secret cvv code on my site). I am ukrainian, so our currency here is UAH (Ukrainian Hryvnia), so I suggest that there should be some way to pay from UAH-bank-card (visa/mastercard) - to my e-shop's bitcoin wallet address.

I don't know if there are such possibilities to accept visa/mastercard payment to convert it then automatically to bitcoins. I've seen some site which converts USD/EUR to bitcoins, but don't know anything about such for Ukrainan currency.

Well, if it is not common to pay using bank-cards on website to transfer money to bitcoins automatically, maybe it is not a problem, ok.
I am ready to make a way for buyer to pay from his/her bitcoin wallet to bitcoin address of our internet shop.
As I can understand, anyone who want to buy something online using bitcoin, just has to install BitcoinCore wallet (or other? tell me which one is best). And then he can put money into his bitcoin wallet using some "bitcoin ATM" (at least we have one in my city). Or another maybe easier way for buyers is to register on binance (I guesss it is biggest bitcoin exchange company nowadays), and then transfer money from visa/mastercard to his binance wallet address.

But my bigger problem is how then I can, as owner of website, internet-shop (more precisely, I am making websites for my friends, not to sell own goods/services) - how can I integrate bitoin payment to website?
I googled for "bitcoin asp.net" - because my favorite back-end programming language is c# (asp.net), and found GoURL asp.net project. But when I tried to set it up, I noticed that they don't write what kind of bitcoin wallet address types they do support, and when I wrote them email - they didn't even answer (I contacted using a form on site,and sent email which I found there). Also, they take some commision, plus have some kind of minimum amount which I need to receive first from buyers of my site (inet-shop), and that is not very happy news to me.

I also found out that GoURL has wordpress plugin. On wordpress plugin page I also found many bitcoin plugins available. But they are just for PHP in which wordpress  is written.

So, what I want next is to find out that maybe there is some common "bitcoin API", which is always available on some URL (www address), which accepts some incoming requests to get bitcoin transactions/wallets information, and maybe that would be best for me.

What I have found out, is that all bitcoin transactions are recorded online and are open to everyone (but in encrypted form). So there are sites which provide info about given wallet address, and what kind of transactions were done with it, what is the amount of money on that wallet etc.

I would need just a way to record on my website/shop a public key (wallet address) of a buyer/client. Probably I'ld provide a form where he would enter that information. And next there would be a field with my bitoin wallet address, and probably even it's qr-code, so he can scan it with mobile and sent money from his mobile bitcoin app. And I think I'ld need there on website a button "I confirm that I sent money for this good/service" (so there is exact amount of money attached to this transaction). And they I need a way on my server to go online to some web-address, to send there some data to check that there was a transaction from that buyer's wallet address to my wallet address (seller/shop address). And I expect to receive "callback" etc from some "bitcoin API" (or whatever/however it is called), so I can know automatically that mobney indeed was transferred, amount is correct, everything is fine, so I can consider good/service is sold, so I can unlock it on website, give an access to it. I want in the beginning to make some online services, like some cost for registration on site (so customer can read some articles), and maybe there would be a closed "cabinet" of user, where he can download bought files (books etc) - after he sends bitcoins/satoshis for that.


If any bitcoin programmers are reading this, with knowledge about how to implement such bitcoin payment on website (preferrably asp.net, but any other programming language / platfroms / technologies also is OK) - please answer


thank you all in advance
ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7666


Crypto Swap Exchange


View Profile
Today at 10:23:19 AM
 #2

I'm not programmer, so i can't answer your main question.

What I have found out, is that all bitcoin transactions are recorded online and are open to everyone (but in encrypted form).

It's not encrypted at all and I recommend you learn more about Bitcoin to avoid misconception which may lead to loss money. You might want to read https://learnmeabitcoin.com/ and https://github.com/bitcoinbook/bitcoinbook for starter.

And I think I'ld need there on website a button "I confirm that I sent money for this good/service" (so there is exact amount of money attached to this transaction).

Many website which accept Bitcoin automatically check and notify whether the address receive appropriate amount of Bitcoin. So ideally this step should avoided.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ranochigo
Legendary
*
Offline Offline

Activity: 2996
Merit: 4202



View Profile
Today at 01:43:09 PM
 #3

Generally, you would want to configure it with Bitcoin Core and the relevant RPCs. The process would go like this: Customer goes to the payment page -> You generate a unique address for them and set a callback using Bitcoin Core's RPCs -> Listen for callbacks for X confirmations and subsequently confirm their transaction and send whatever goods you're selling.

The easy part is implementing this, but the difficult part is ensuring that it doesn't run into any errors, ie. Bitcoin Core crashing, attackers gaining access to your backend, etc, etc. The easiest way, by far is to just use BitPay as a POS and have them handle it for you. They do have integration with plenty of languages.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!