Need card payments code

hi, I’m trying to add credit card payments to my website.Is there example code available to use?
I have code supplied by paypal but cannot get it to work. I’ve tried several other’s but NOT.
Any help? My code follows:

------------------------------------------------------------<!-- ---------------------------------------------------------------->
<form id="fcf-form-id" class="fcf-form-class" method="post" action="contact-form-process.php">
<!-- -------------------------------------------------------------- -->
<b><input type="text" STYLE="color: #000000; font-weight: bold; background-color: cyan;" size=45 
name=intent value="I wish to order a guitarzRus singleneck guitar" onFocus="this.value=''">
<br>
<!-- --------------------------------------------------------------------------- -->
<input type="text" size=35 name="unit-price" value="model - Unit Price" STYLE="color: #000000; font-weight: bold; background-color: #ccffff;">
<!-- ---------------------------------------------------------------------------------------- -->
    <select name="unitprice">    
<OPTION value="">Select</OPTION>
<OPTION value="224.95" style="background-color: Pink;"> Violina_conversion - 224.95</OPTION>
<OPTION value="235.95" style="background-color: violet;">Pipsqueek_conversion - 235.95</OPTION>
<OPTION value="247.95" style="background-color: Pink;">Supra_conversion - 247.95</OPTION>
<OPTION value="259.95" style="background-color: white;">Futura_conversion - 259.95</OPTION>
<OPTION value="328.95" style="background-color: cyan;">New Violina - 328.95</OPTION>
<OPTION value="359.95" style="background-color: violet;">New Pipsqueek - 359.95</OPTION>
<OPTION value="377.95" style="background-color: cyan;">New Supra - 377.95</OPTION>
<OPTION value="399.95" style="background-color: violet;">New Futura - 399.95</OPTION>
</select><br>
<!-- --------------------------------------------------------------------------------------------  --> 
<b><input type="text" size=55 name="name" value=" &#x2714; Full name " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<b><input type="text" size=35 name="email" value=" &#x2714; Email Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<br>
<b><input type="text" size=95 name="address" value=" &#x2714; Address " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<br>
<b><input type="text" size=60 name="city" value=" &#x2714; City " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<b><input type="text" size=10 name="state" value=" &#x2714; State " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<b><input type="text" size=15 name="zip" value=" &#x2714; Zip code " STYLE="color: #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></b>&nbsp;&nbsp;
<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&currency=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&currency=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&currency=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&currency=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&currency=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&currency=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&currency=USD"></script>

    

<script>
        
// Render the PayPal button into #paypal-button-container
        
paypal.Buttons().render('#paypal-button-container');
    
</script>
<BR>
<div class="fcf-form-group">
            <button type="submit" id="fcf-button" class="fcf-btn fcf-btn-primary fcf-btn-lg fcf-btn-block">Send Message</button>
        </div>     
<!-- ------------------------------------------------------------------------------------------  --> 
<a href="index.html"><img src="house.jpg" height=75 width=75 alt="image of home"></a><br>
<A href="webmain.html">webmaster</A>&nbsp;&nbsp;<a href="privacy.html">[privacy]</a><br>
<input type="text" readonly size="22" maxlength="30" readonly value="copyright &copy 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>
==================================================
<?php
if (isset($_POST['Email'])) {

    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "ckguitarz@gmail.com";
    $email_subject = "guitarzRus order form";

   

    // create email headers
    $headers = 'From: ' . $email . "\r\n" .
        'Reply-To: ' . $email . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers);
?>

    <!-- include your success message below -->

    Thank you for your order. We will be in touch with you very soon.

<?php
}
?>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Can you elaborate on what does not work?

I ill out form. click either radio button, click continue and nothing happens except the “thank you” is sent. I get no Paypal action and the form is not sent.