Buy Now button and variables return / Retour avec bouton "buy now"

Pylou
Contributor
Contributor

Hi everyone!

I'm currently creating a "buy now" button but I run into some annoying details

I would like Paypale to return variables, some linked to its own form, and others that I would pass along.

To be clear, in the following code, I'd like Paypal to return

  • The selected radio button value (1, 3 or 5), that I suspect is stored in variable on0
  • My custom variable valtoto, that I put in an invisible field from the PHP variable toto

How do I

  • Send all those variables without Paypal ditching those it does not recognize (valtoto)
  • Tell Paypal to return it
  • Receive them accordingly

Thanks and have a nice read


Salut à tous!

Je suis en train de créer un bouton type "buy now", mais je bute sur un détail.

J'aimerais que Paypal me renvoie des variables, certaines liées à son formulaire, et d'autres que je lui passerai.

Pour être précis, dans le code suivant, j'aimerais que Paypal me renvoie

  • La valeur du bouton radio sélectionné (1, 3 ou 5), que je suppose être stockée dans sa variable on0
  • Ma variable valtoto, que j'ai planqué dans un champ invisible sous le nom toto

Comment faire pour

  • Envoyer toutes ces variables sans que Paypal ne flingue celles qu'il ne connait pas (toto)
  • Lui dire de les renvoyer
  • Les recevoir correctement

Grand merci et bonne lecture

 


<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" align="center">
  <input type="hidden" name="cmd" value="_s-xclick" />
  <input type="hidden" name="hosted_button_id" value="[MonID]" />
  <table align="center">
    <tr>
      <td>
        <input type="hidden" name="on0" value="Choisissez un pack" />
<?php echo '<input type="hidden" name="valtoto" value="'.toto.'" />'; ?>
      </td>
    </tr>
    <tr>
      <td>
  <fieldset>
  <legend style="font-family:verdana">Choisissez un pack:</legend>
  <div>
    <input type="radio" id="huey" name="os0" value="1" />
    <label for="huey" style="font-family:verdana"><?php echo nbpak1.' '.photo." ".pxpak1." ".DVZ; ?></label>
  </div>
  <div>
    <input type="radio" id="dewey" name="os0" value="3" />
    <label for="dewey" style="font-family:verdana"><?php echo nbpak2.' '.photos." ".pxpak2." ".DVZ; ?></label>
  </div>
  <div>
    <input type="radio" id="louie" name="os0" value="5" />
    <label for="louie" style="font-family:verdana"><?php echo nbpak3.' '.photos." ".pxpak3." ".DVZ; ?></label>
  </div>
</fieldset>
      </td>
    </tr>
  </table>
  <input type="hidden" name="currency_code" value="EUR" align="center" />
  <input type="image" src="https://www.paypalobjects.com/fr_FR/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" title="PayPal, votre réflexe sécurité pour payer en ligne." alt="Acheter" align="center" />
</form>

 

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.