php - POST to sample URL for PayPal without "form" -


i having issue posting data specific url when testing payment transactions on paypal platform. although more technically understood, chose not use api , nvp platform because of requirement first create transaction, come , have create recurring profile (as opposed @ once - stupid design in opinion).

ultimately, trying take data have encrypted specific variable , post data url of choice without having treat form user clicks submit.

my html form works - code is:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank">'; <input type="hidden" name="cmd" value="_s-xclick"/>'; <input type="hidden" name="encrypted" value="'.$encrypted.'"/>'; <input type="submit" value="go checkout" name="submit" class="cartbutton" />'; </form> 

where $encrypted encrypted parameters. while code works - not want have user click link sent form. instead, want user click button first runs php script store data in temporary database push required elements (cmd , encrypted) post url (https://www.sandbox.paypal.com/cgi-bin/webscr).

any ideas how accomplish this? possible? use php , mysql site. using javascript of kind not solution.

edit 1

i have set use curl possible way post data 2 things happening: 1) getting no response whatsoever, 2) consumer needs redirected paypal payment pages posted data after database insert has taken place.

its not possible there way: fire 1 asynchronous background javascript event fires post own server store data... , synchronous foreground event sends form paypal secure processing.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -