I need to somehow secure source code of paypal button, so users can't change amount of money. But I also need user's input (custom input - Nickname for some game), because I'm using this input in IPN.
This is my code for paypal button:
<form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_xclick">
<input name='currency_code' type='hidden' value='CZK'
<input name='business' type='hidden' value='DHWYTXXXXXXXX'>
<input name='item_name' type='hidden' value='VIP Membership on server XXX'>
<input name='amount' type='hidden' value='5.00'>
<input name='lc' type='hidden' value='CZ'>
<input name='no_shipping' type='hidden' value='1'>
<input name='no_note' type='hidden' value='1'>
<input name='custom' type='text' placeholder='Nickname' required='required'>
<input name='notify_url' type='hidden' value='https://example.cz/paypal/ipn_process.php'>
<input name='return_url' type='hidden' value='https://example.cz/paypal/ipn_success.php'>
<input name='rm' type='hidden' value='2'>
<input type='submit' class='paypalSubmit' name='submit' value='Buy now'>
</form>
I tried encrypting it with OpenSSL, but I need user's input, so that didn't work.
So, Is there any other way how to protect the amount (or encrypt it, but also be able and use user's input), so users can't change the price?
Thank you very much! :)
Related
I may have hit my limit on knowledge on this :-)
I have a wordpress form to integrate with a CRM. When submitted it sends correctly all the data from the form apart from the file attachment. This won't upload.
My code is below... The varchar ID's match the CRM special fields and work fine and so does the re-direct to thank you page.
Am I missing something here to help upload the attachment, or is it an error and just not talking to the CRM's backend?
Many thanks
<form id="HubForm" action="https://www.CRM-DOMAIN-NAME/Api/FormAdd" method="post">
<input type="hidden" name="ClientId" value="123"><input type="hidden" name="FormTypeId" value="123">
<input type="hidden" name="redirect" value="https://www.CLIENTS-DOMAIN-NAME.co.uk/applied/">
<input id="firstname" class="emrform" name="firstname" type="text" placeholder="First Name" required /><br>
<input id="lastname" class="emrform" name="lastname" type="text" placeholder="Last Name" required /><br>
<input id="email" class="emrform" name="varchar3" type="text" placeholder="Phone number" required /><br>
<input id="firstname" class="emrform" name="email" type="text" placeholder="Email" required /><br> Upload your CV<br><input id="fileUpload" class="emrform" name="fileUpload" type="file" accept=".pdf,.doc,.docx" /><br> Interested in receiving further
emails?
<br>
<input type="radio" name="varchar4" value="yes" id="varchar4" checked> YES<br>
<input type="radio" name="varchar4" value="no" id="varchar4"> no<br>
<br>
<br>
<textarea class="emrform" id="textarea" rows="5" name="varchar2" placeholder="Message details..."></textarea>
<br>
<input type="submit" class="emrbtn emrbtn-primary" value="Submit"></form>
<div id="HubFormResult">
This is my question .
<form name="_xclick" action="https://www.sandbox.paypal.com/in/cgi-bin/webscr" method="post" style="opacity:0;height:42px;background:red;left:0;top:0; width:100%;margin:0px;position:absolute;">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="walapaybusiness#gmail.com">
<input type="hidden" id="paypal_text" name="return" value="${request.serverUrl}/marketProducts/productBuySuccess?productId=1&flag=10"/>
<input type="hidden" name="cancel_return" value="${request.serverUrl}/dudewala/paymentSuccess" />
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Dude dollar">
<input type="hidden" name="amount" value="10">
<input class="paypalBtn" type="image" style="height:42px;width:100%; " src="http://www.paypal.com/en_GB/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
This is my form for paypal sandbox mode and this is my success url from paypal
${request.serverUrl}/marketProducts/productBuySuccess
Here is it possible to attach transaction id from paypal?
May be the expected URL will look like
${request.serverUrl}/marketProducts/productBuySuccess?transactionId=123456789000
So I can fetch the transaction id as params.transactionId
I am doing this in grails so It will be great if you can give my answer in grails
Thanks in advance :)
PayPal send you Transaction ID with the txn_id name. You can also use others, like payer_id, etc...
on php or html page how can i do this:
name
password
and many buttons
if user press button1 he we redirct to :
http://domain.com/login.php?button1=123&name=test&password=111
buttom2:
http://domain.com/login.php?button2=456&name=test&password=111
buttom3:
http://domain.com/login.php?button3=789&name=test&password=111
Thank you
You have this simple option according to me.
<form action='login.php' method='get'>
<input type='text' name='name'>
<input type='password' name='password'>
<input type='submit' name='button1' value='123'>
<input type='submit' name='button2' value='456'>
<input type='submit' name='button2' value='789'>
</form>
Hope it helps
I have a form like these:
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='business' value='co_1331738237_per#gmail.com'>
<input type='hidden' name='item_name' value='Nueva compra en mi web'>
<input type='hidden' name='amount' value='10.15'>
<input type='hidden' name='page_style' value='primary'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='return' value='http://someurl.com/reserva-realizada/'>
<input type='hidden' name='rm' value='2'>
<input type='hidden' name='cancel_return' value='http://someurl.com/reserva-cancelada/'>
<input type='hidden' name='no_note' value='0'>
<input type='hidden' name='first_name' value='NOMBRE'>
<input type='hidden' name='last_name' value='APELLIDOS'>
<input type='hidden' name='night_phone_b' value='TELÉFONO'>
<input type='hidden' name='custom' value='Nota'>
<input type='hidden' name='lc' value='es'>
<input type="hidden" name="currency_code" value="EUR">
<input type='hidden' name='country' value='ES'>
The problem is that after pay i need to sing up the user in my site and the return it's not working. When I tried to pay something in the sandbox of paypal it doesn't return…
Any idea?
go to your PayPal merchant account-->profile-->Selling Preferences-->Website Payment Preferences-->Auto Return for Website Payments turn radio button to on,default it should off.i hope this help you.
I am having problem in integrating paypal IPN.I am implementing this code but it is not returning me the values to IPN
My form that is made after executing the code is as follow
<form method="post" name="paypal_form" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="cmd" value="_cart"/>
<input type="hidden" name="business" value="info#something.com"/>
<input type="hidden" name="return" value="http://abc.com/test.php?action=success"/>
<input type="hidden" name="cancel_return" value="http://abc.com/test.php?action=cancel"/>
<input type="hidden" name="notify_url" value="http://abc.com/test.php?action=ipn"/>
<input type="hidden" name="item_name_1" value="Adob photoshop"/>
<input type="hidden" name="item_number_1" value="10"/>
<input type="hidden" name="amount_1" value="15"/>
<input type="hidden" name="upload" value="1"/>
<input type="hidden" name="cn" value="1"/>
<input type="hidden" name="tx" value="TransactionID"/>
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="no_shipping" value="1"/>
<center><br/><br/>If you are not automatically redirected to paypal within 5 seconds...<br/><br/>
<input type="submit" value="Click Here"></center>
</form>
The problem is that the code is working fine for the return and cancel part but when I use this code for IPN it does not give me any value.My code for the IPN is as under
if ($pay->validate_ipn()) {
//do the insertion I have tested this insertion it is working fine
}
Have a look at History > IPN History inside your PayPal account. This should show the status of the IPN messages that were sent to you. Click on the message ID if you wish to find out more detailed information.
If it's retrying, double-check your error logs and ensure it's returning a proper HTTP/1.1 200 OK response when accessed by the PayPal IPN service (notify.paypal.com).