How to create web payment system using PHP

Asked

Viewed 10,379 times

5

I would like to create an e-commerce, but I do not have much knowledge about it. And I still have the following question. How to create a payment system via boleto or card, is there any framework or API, which offers the service? , if there is a way to attach to the site. How to launch boletos? , there is some framework to assist in creating boletos pdf, these must have a tax validation?

3 answers

9


Well, that’s a lot of questions, come on:

How to create a payment system via boleto or card, there is some framework or company offering the service?

Via boleto, it’s easy, talk to your manager to provide some numbers that you will use. Some banks provide the example code to create the billet, I did once with the Federal Savings Bank. You can also look for an external solution, I saw but I did not use: http://boletophp.com.br/. The billets usually have a deadline to confirm receipt after paid and do not expect to be as short as that of large stores, when I did for example it took 2 to 5 days depending on a lot of things.

Card is more complicated, you talk to the card carrier from which you will receive, usually involves transaction, you send a packet of data, the carrier’s server responds, you send another confirming or with some other data and finally, you receive the completion.

, if there is a way to attach to the site?.

In the case of tickets, record the identification of the ticket in the open payment information, in the case of card, usually the payment is in the act, but there may be different treatment that I do not know, will depend on the operator. You can use "our number" and "document number" to identify the ticket. The "our number" is unusual to identify each billet, but in my case I had to use it.

How to launch boletos?

Send the values to the application that generates them and it generates, without any complication, but also there is no record, you must register in your code.

, there is some framework to assist in creating pdf boletos, they must have a tax validation?

Yes, example in the answer to the first question, but are not in PDF, is not necessary. There are also paid solutions, super easy to find on Google, looking for "boleto online" appear various solutions. No tax validation required, but a word from your manager is recommended. For example, for what I developed for use in the box, we generated three billets together with the manager and tested if everything was valid.

4

Dude, try to use the services like pagseguro or mercadopago, in it you leave the question of receipt (cards, boletos, etc) on their account, and both provide a web service to monitor the status of your payments and the scripts needed for integration.

  • In the case of communication with these services, do you have an API to assist ? is done via url ? , is paid? and last has some tutorial teaching to use ?

  • 1

    Both services charge fees for receipt, but with them it is possible to sell with billet, credit card, etc and receive the view. Pagseguro: https://pagseguro.uol.com.br/v2/guia-integracao/index.html Mercado Pago: https://developers.mercadopago.com/? lang=pt_BR

2

spoke of the paid and paid market, but forgot the Paypal and Traycheckout, I think it’s more business to outsource this issue with these payment gateways, sometimes on the websites of these companies there is a developer session there that explains how to use the api of their services. paypal for example is here at this link paypal dev.

As for the framework, use anyone who feels comfortable, frameworks are generic for virtually any system, you just need to find a good one payment gateway and communicate with the api’s using a framework, or do at hand, example frameworks: zend, codeigniter, cake...

  • If it is to give more options have also Moip and Bcash (former Digital Payment).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.