After purchasing the product, refresh the page and deduct the SegmentFault.

Source: Internet
Author: User
After purchasing the product by yourself, you can jump to the (prompt page-& amp; gt; OK), refresh the prompt page, and deduct the money again (and pass the code again ). I want to go to the success page after the purchase. If the user refresh the page with a bid, the user will be prompted that the purchase cannot be repeated. The user must go back to the product list and select "Buy now... after purchasing the product by yourself, you can jump to the (prompt page> OK) page, refresh the prompt page, and deduct the money again (and pass the code again ).

I want to go to the success page after the purchase. If the user refresh the page with a bid, the user will be prompted that the purchase cannot be repeated. The user must go back to the product list and select the purchase option.

I can't figure out how to make a decision.

Reply content:

After purchasing the product by yourself, you can jump to the (prompt page> OK) page, refresh the prompt page, and deduct the money again (and pass the code again ).

I want to go to the success page after the purchase. If the user refresh the page with a bid, the user will be prompted that the purchase cannot be repeated. The user must go back to the product list and select the purchase option.

I can't figure out how to make a decision.

The logic is wrong. Are you sure you want to jump to the pure prompt page? After the order is processed, the output of "OK" and "redirect" (for example, sending the header for url jump) to "OK" are different. The former will cause you, and the latter will not, because a successful page is usually almost a pure html, there will be no problem with how to brush it.
In addition, if a shopping cart is used, the shopping cart will be cleared after the order is generated. Therefore, refresh again because the shopping cart is empty, no repeated fee deduction will be generated.
Just think about it and you can easily solve it.

After the jump is successful, remember to die out all the programs, and check the program properly, as stated on the first floor.

After the purchase is completed, Jump twice immediately. Do not leave the user on the submit order processing page

Generally, users submit purchase information, program verification, and logic processing (adding order information, fee deduction, sending text messages/messages, etc.) and prompt information to purchase such programs. Here, the purchase information is submitted to the verification program, and then the verification program calls the logic processing method. After the processing is complete, the prompt page is displayed, therefore, in the development process, you should note that the logical processing part is separated from other parts (verification and prompt). The logical processing program cannot be called from other parts of the verification, you apparently entered the prompt information directly on the logic processing page, but did not go to the individual information prompt page. When you refreshed the page, you re-accessed the logic processing program.

You include the order ID in the url, for example,/order/1234578. When you open the page, you first get the order ID of the url and check whether the order is paid. The payment prompt is "paid, if the payment is not made, the customer is prompted to pay again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.