How to correlate payment result with my store's order ID

bitty-software
New Community Member

Hi

 

I'm a new PayPal merchant and currently integrating in my site and testing in the sandbox.

 

I'm having difficulty achieving something I need and would appreciate advice from more experienced PayPal merchants.

 

I'm using PayPal hosted HTML buttons because I gather than unhosted buttons are not particularly secure.

 

Here's what I would like to do:

1. Buyer selects my product to create their order and clicks the Buy Now button (code generated by PayPal when I created the button).

 

2. My site has allocated a unique order ID to their order. I want to pass this ID to PayPal when Buy Now is clicked and have it passed back to me in a return URL so that I can correlate the completed purchase with the original order it relates to. 

 

I've tried passing a custom URL in a hidden form input field called "return" but this is not working. I think this is because I'm using hosted rather than unhosted buttons but I'm not sure. I've tried with Auto Return set to both true and false. I'm now stuck.

 

If this is not possible with hosted buttons, how do people generally ensure that they know that the order placed has been paid for. A "call back" to a URL without any reference to the order to which it relates seems a very loose way of doing things and likely to be prone to error or abuse.

 

Thanks in anticipation.

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.