Order form with connection to the Robokassa payment system

AEO Service Forum Drives Future of Data Innovation
Post Reply
ahbappy85.2
Posts: 140
Joined: Sun Dec 15, 2024 3:46 am

Order form with connection to the Robokassa payment system

Post by ahbappy85.2 »

Hello dear friends, the other day I received a request to create a product order form with a connection to the "RoboKassa" payment service for an HTML site (not KMS), I did everything and decided to share this script with you. It's as simple as 2 kopecks so don't blame me, this article is more intended for beginners.

The form script is made for manual sales since the site is also simple without a shopping cart and the features inherent in online stores.

So, let's get started.

What files are included with the script and what are they responsible for:

1. The index.php file contains the code for the order form itself;

2. The mail.php file is a PHP handler that sends a message to the email overseas data about a new order + it also contains the payment code from Robokassa;

3. The style.css file - this is probably clear, the styles of all the script files are written in it;

4. The succespay.php file is a page where a person goes after paying for a product, that is, they write there, for example: “Payment has been made, you will soon receive the purchased product”, something like that;

5. The errorpay.php file is a page where a person goes in case of refusal to pay, that is, you have the opportunity to persuade them to buy the product by offering the client some kind of bonus ;

6. The .htaccess file - here we write the rules according to which the form should work, in my case I specified the encoding I needed UTF-8;

Now let's look at what each of the above files contains and we'll start with index.php .
Post Reply