How to create an account before sending the payment form?

Connecting payment systems to the site, I encountered one interesting problem.

The payment system does not matter, but for example let's take perfectmoney.

To connect perfectmoney to our website is enough for us to place payment form with specific data (usually this is the account id, payment amount, account number and additional data type descriptions, etc.).

The task to do so:
The user visits the site -> choose the product or service -> clicks to pay and goes to the site perfectmoney.

The problem
The problem is that we need to substitute in the form of an account number, which must be paid by the user.
Ie at the time when the user goes to the page with the form of payment, we have no id.

No need to complicate
Easily solve the problem by asking the user to create the account, and only then pay. But it is a superfluous action, which complicates the use of the site and TK does not allow to do so!

There is another way
I noticed here a way:
https://github.com/yii-dream-team/yi...directForm.php

Ie we make a request to your server, create an account, generate a form for perfectmoney and using js submit the form.
But and as the same is turned off js ? Yes, such users are few, but we're perfectionists. How much this method kosyachny ?

From the above, the question arises:
Please tell me how to arrange payment through the payment system creating the user account ?
September 19th 19 at 00:12
4 answers
September 19th 19 at 00:14
Decision: to Expel the originator of TK without compensation. Hire a specialist.

PS. perfectmoney is not seen, but I bet 100 to 1 that the "perfectionist" there are two fields to fill in can't.
frankly, I do not understand. You want to say that it is best to create an account, and then pay for it? - Elissa_Nitzsche89 commented on September 19th 19 at 00:17
ask any accountant how better to first create or pay - Seth commented on September 19th 19 at 00:20
: please comment on the following idea:
When entering the page, create a temporary account ( not visible to user), a pop account id. Only after payment of this invoice is displayed. - Elissa_Nitzsche89 commented on September 19th 19 at 00:23
don't understand why it is so carefully from the client account to hide. all online stores that I use, I first show details of what I'm paying, and only then take money. I don't understand why a temporary id and what it is. I would have given a permanent ID, and told the user to record it. So if there are any problems, he could at least have something intelligible to say to the operator. - Seth commented on September 19th 19 at 00:26
in the online store easier, as there is a basket. What if you just need to recharge the internal account of the site ? Ie I want to click the Deposit button and immediately go on the website of the payment system and to pay. - Elissa_Nitzsche89 commented on September 19th 19 at 00:29
You yourself have described the whole process. The customer clicks to pay - invoice is created - redirect to payment system with parameters. - camryn.Howe commented on September 19th 19 at 00:32
September 19th 19 at 00:16
Maybe I don't quite understand what you want, but have been working with payment systems and everywhere the same method. Account number he personally need your service, then that would be a payment system where the client will pay, I'll send you a request that a particular bill is paid.

Roughly speaking, a table with accounts
id, user_id, sum, paid

User id 777, who wants to pay 500 rubles, clicks "pay" create a new account:
1, 777, 500, false

Then your script sends the payment request specifying invoice id = 1, and the sum of 500 well and other data if required.

After the customer pays, the payment system will be sent requesting that the account with id 1 paid 500 rubles. You are on this id, determine which user has paid and how much and add to it the expense of 500 rubles or give him a service or a product.

and change data in the table

1, 777, 500, true
"Then your script sends the payment request specifying invoice id = 1, and the sum of 500 well and other data if required."

Here is how you make a request to the payment system ? It would be great to make a post request with redirect without js. - Elissa_Nitzsche89 commented on September 19th 19 at 00:19
: redirect the user to the payment system site with GET parameters account number and amount - Seth commented on September 19th 19 at 00:22
September 19th 19 at 00:18
But and as the same is turned off js ?

Method is not always useful to be a perfectionist. Because "best" as it is known - the enemy of "good."
you may be right, but that is still dumb. - Elissa_Nitzsche89 commented on September 19th 19 at 00:21
September 19th 19 at 00:20
Here the problem lies elsewhere. Then how are you going to identify which client and what is paid for on the website? If you were a charity you would rather be in the ID field to substitute a time value in microseconds, for example.

You describe the structure of the shop, no order is created in your database, without identifying the value of the order, the currency peg to the client. Then the client should contact you to get the item? To write in support for specifying and screengrab. of the payment from the wallet? Not gemorno whether it is compared with the creation of the order.
Do you plan to automatic processing of orders, when you return the data into your return (server interaction) url? How will you notify the customer that his order has been paid and he will get it in time, or is he just supposed to wait until the Manager will tear the ass and decide to write to the client?

The user visits the site -> choose the product or service -> clicks to pay and goes to the site perfectmoney.

A description of your action is not final, after the payment, he needs to get to the store said that everything is OK.

The problem is not in js, and not in a smaller quantity of clicks or one action more. The problem is, how will you notify customers, not creating on the website orders.
This is not the store it was described as an example. The task is to replenish the account without further action. Well, the most simple identification method is the username in the comment. - Elissa_Nitzsche89 commented on September 19th 19 at 00:23
: you need to fix the orders anyway. Because users don't want to wait until someone manually enroll them to account. This automatic notification service from the payment system. But how will you fix what you have already added an account to the client for this amount? Some systems notify multiple times, some up to 3 days until you get an answer. If you are noted in the database that the order with this ID is already enrolled, then you just napomynaet client account. But if this bug is found, it will peel. You have two options can do via js or create the order for each entry. - Seth commented on September 19th 19 at 00:26

Find more questions by tags PHPPayment systems