I,m trying to use this form in an order form along with paypal. pertinent code follows.
<form action="" method="post" id="myform" target="_top">
<input type="hidden" id="skip_WhereToSend" name="skip_WhereToSend"
value="ckguitarz@gmail.com" />
<input type="hidden" id="skip_Subject" name="skip_Subject"
value="order form" />
<input type="hidden" id="skip_WhereToReturn" name="skip_WhereToReturn"
value="https://guitarzRus.com/ord-thanks.html" />
-------------------------------------------------------------------------------------
<!-- -------------------------------------------------------------------------------------------- -->
<b><input type="text" size=55 name="name" value=" ✔ Full name " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=35 name="email" value=" ✔ Email Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br>
<b><input type="text" size=95 name="address" value=" ✔ Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br>
<b><input type="text" size=60 name="city" value=" ✔ City " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=10 name="state" value=" ✔ State " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=15 name="zip" value=" ✔ Zip code " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br><br>
<!-- ------------------------------------------------------------------- -->
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_SB_CLIENT_ID">
// Replace YOUR_SB_CLIENT_ID with your sandbox client ID
</script>
<div id="paypal-button-container"></div>
<!-- Add the checkout buttons, set up the order and approve the order --> <script>
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
}).render('#paypal-button-container'); // Display payment options on your web page
</script>
<!-- ------------------------------------------------------------------- -->
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK --
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons().render('#paypal-button-container');
</script>
<BR>
<!-- Render the radio fields and button containers -->
<label>
<input type="radio" name="payment-option" value="paypal" checked>
<img src="/demo/checkout/static/img/paypal-mark.jpg" alt="Pay with Paypal">
</label>
<label>
<input type="radio" name="payment-option"
<img src="/demo/checkout/static/img/card-mark.png" alt="Accepting Visa,
Mastercard, Discover and American Express">
</label>
<div id="paypal-button-container"></div>
<div id="card-button-container" class="hidden">
<button>Continue</button>
</div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Listen for changes to the radio fields
document.querySelectorAll('input[name=payment-option]').forEach(function(el)
{
el.addEventListener('change', function(event)
{
// If PayPal is selected, show the PayPal button
if (event.target.value === 'paypal')
{
document.querySelector('#card-button-container').style.display = 'none';
document.querySelector('#paypal-button-container').style.display = 'inline-block';
}
// If Card is selected, show the standard continue button
if (event.target.value ===
{
document.querySelector('#card-button-container').style.display = 'inline-block';
document.querySelector('#paypal-button-container').style.display = 'none';
}
});
});
// Hide Non-PayPal button by default
document.querySelector('#card-button-container').style.display = 'none';
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- ------------------------------------------------------------------- -->
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK --
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons().render('#paypal-button-container');
</script>
<BR>
<!-- ------------------------------------------------------------------------------------------ -->
<a href="index.html"><img src="house.jpg" height=75 width=75 alt="image of home"></a><br>
<A href="webmain.html">webmaster</A><a href="privacy.html">[privacy]</a><br>
<input type="text" readonly size="22" maxlength="30" readonly value="copyright © 2000-2020" STYLE="color: #000000; font-weight: bold; background-color: #ccffff;" onFocus="this.value=''"><BR>
</b></center>
<script type=”text/javascript”>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
try {
var pageTracker = _gat._getTracker(“UA-10101010-19?);
pageTracker._trackPageview();
} catch(err) {}</script>
</font></form></body></html>
<form action="" method="post" id="myform" target="_top">
<input type="hidden" id="skip_WhereToSend" name="skip_WhereToSend"
value="ckguitarz@gmail.com" />
<input type="hidden" id="skip_Subject" name="skip_Subject"
value="order form" />
<input type="hidden" id="skip_WhereToReturn" name="skip_WhereToReturn"
value="https://guitarzRus.com/ord-thanks.html" />
-------------------------------------------------------------------------------------
<!-- -------------------------------------------------------------------------------------------- -->
<b><input type="text" size=55 name="name" value=" ✔ Full name " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=35 name="email" value=" ✔ Email Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br>
<b><input type="text" size=95 name="address" value=" ✔ Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br>
<b><input type="text" size=60 name="city" value=" ✔ City " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=10 name="state" value=" ✔ State " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<b><input type="text" size=15 name="zip" value=" ✔ Zip code " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>
<br><br>
<!-- ------------------------------------------------------------------- -->
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_SB_CLIENT_ID">
// Replace YOUR_SB_CLIENT_ID with your sandbox client ID
</script>
<div id="paypal-button-container"></div>
<!-- Add the checkout buttons, set up the order and approve the order --> <script>
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
}).render('#paypal-button-container'); // Display payment options on your web page
</script>
<!-- ------------------------------------------------------------------- -->
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK --
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons().render('#paypal-button-container');
</script>
<BR>
<!-- Render the radio fields and button containers -->
<label>
<input type="radio" name="payment-option" value="paypal" checked>
<img src="/demo/checkout/static/img/paypal-mark.jpg" alt="Pay with Paypal">
</label>
<label>
<input type="radio" name="payment-option"
<img src="/demo/checkout/static/img/card-mark.png" alt="Accepting Visa,
Mastercard, Discover and American Express">
</label>
<div id="paypal-button-container"></div>
<div id="card-button-container" class="hidden">
<button>Continue</button>
</div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Listen for changes to the radio fields
document.querySelectorAll('input[name=payment-option]').forEach(function(el)
{
el.addEventListener('change', function(event)
{
// If PayPal is selected, show the PayPal button
if (event.target.value === 'paypal')
{
document.querySelector('#card-button-container').style.display = 'none';
document.querySelector('#paypal-button-container').style.display = 'inline-block';
}
// If Card is selected, show the standard continue button
if (event.target.value ===
{
document.querySelector('#card-button-container').style.display = 'inline-block';
document.querySelector('#paypal-button-container').style.display = 'none';
}
});
});
// Hide Non-PayPal button by default
document.querySelector('#card-button-container').style.display = 'none';
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- ------------------------------------------------------------------- -->
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
layout: 'horizontal'
}
}).render('#paypal-button-container');
</script>
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>
<!-- Include the PayPal JavaScript SDK --
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons().render('#paypal-button-container');
</script>
<BR>
<!-- ------------------------------------------------------------------------------------------ -->
<a href="index.html"><img src="house.jpg" height=75 width=75 alt="image of home"></a><br>
<A href="webmain.html">webmaster</A><a href="privacy.html">[privacy]</a><br>
<input type="text" readonly size="22" maxlength="30" readonly value="copyright © 2000-2020" STYLE="color: #000000; font-weight: bold; background-color: #ccffff;" onFocus="this.value=''"><BR>
</b></center>
<script type=”text/javascript”>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
try {
var pageTracker = _gat._getTracker(“UA-10101010-19?);
pageTracker._trackPageview();
} catch(err) {}</script>
</font></form></body></html>