Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script language="javascript">
- function mostrarValue(){
- var selObj = document.getElementById('test');
- var selIndex = selObj.options[selObj.selectedIndex].value;
- }
- </script>
- <p>Seleccione uno de los articulos</p>
- <label class="youplay-select">
- <select id="test" name="test">
- <option value="" selected>Seleccionar</option>
- <option value="1000">Articulo1</option>
- <option value="1001">Articulo2</option>
- <option value="1002">Articulo3</option>
- </select>
- </label>
- <?php
- $cert_id = 'CERTIFICADOPAYPAL';
- include("Class.PayPalEWP.php");
- $paypal = new PayPalEWP();
- $paypal->setTempFileDirectory("tmp");
- $paypal->setCertificate("my-pubcert.pem", "my-prvkey.pem");
- $paypal->setPayPalCertificate("paypal_cert_pem.txt");
- $paypal->setCertificateID($cert_id);
- $pp = array(
- 'cmd' => '_xclick',
- 'cert_id' => $cert_id,
- 'business' => 'xxxx@gmail.com',
- 'receiver_email' => 'xxxx@gmail.com',
- 'custom' => '1',
- 'item_name' => $_POST['test'],
- 'currency_code' => 'USD',
- 'amount' => '1',
- 'lc' => 'ES',
- 'no_note' => '1',
- 'no_shipping' => '1',
- //'return' => '',
- 'cancel_return' => '',
- //'notify_url' => '',
- 'cbt' => 'Volver al sitio web',
- );
- ?>
- <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" id="pay_pal_form" method="POST" name= "form1" onclick="mostrarValue();">
- <input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="cmd" value="_s-xclick">
- <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----<?php echo $paypal->encryptButton($pp); ?>-----END PKCS7-----"/>
- <input type="image" src="https://www.paypal.com/es_XC/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal, la forma más segura y rápida de pagar en línea.">
- <img alt="" border="0" src="https://www.paypal.com/es_XC/i/scr/pixel.gif" width="1" height="1"></p></div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement