Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent duplicate PayPal payments?

I have a simple Pay Now button, the code created through the button maker, with a "custom" hidden field added to identify it. I wonder if there is some additional hidden field I can add to tell PayPal that "This transaction should not be made twice".

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="custom" value="{MYUNIQUEID}">
    <input type="hidden" name="hosted_button_id" value="{MYHOSTEDBUTTONID}">
    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" 
    border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

As it is now it's unlikely that the customer should be able to pay twice, but I noticed that when the Sandbox had a glitch I succeeded in paying the same transaction twice. Something that I absolutely want to avoid. Not just for the customer, that could get refunded, sure, but also since I don't want my database messed up and I would like to avoid extensive coding to catch duplicate payments...

like image 591
Paul Avatar asked Aug 01 '12 14:08

Paul


People also ask

How can the duplicate payments be avoided?

One of the most efficient ways of preventing duplicate payments is to use an accounts payable approval control software. This can be an external software or an integrated mechanism in the ERP system, however, the first solution can be harder to implement.

How do you resolve duplicate transactions?

To get rid of these duplicates transactions, you can merge them. To merge, click the checkboxes to the left of a set of duplicates. Then, at the top of the Transactions page, click Merge. Repeat for all duplicate sets.

What is the risk of duplicate payments?

Duplicate invoice payments occur far more often than most realize, resulting in cash leakage. It's estimated that companies make duplicate payments at the rate of 0.1% up to 0.5%.

What does it mean when it says a duplicate transaction has been submitted?

The error indicates that a transaction request was submitted within a few minutes of a previous attempt with the same information. Authorize.Net identifies duplicate transactions by matching the data provided with the transaction.


1 Answers

You would want to add a unique identifier to the "invoice" parameter; <input type="hidden" name="invoice" value="your unique invoice ID"> and enable "Block duplicate payments" within the 'Profile' > 'My selling tools' section on your account at www.paypal.com

like image 143
Robert Avatar answered Sep 21 '22 20:09

Robert