wip paypal credentials output in menu, but they dont update yet

This commit is contained in:
asus
2024-03-25 16:21:33 +01:00
parent 4036f4300d
commit c9f0522ecc
3 changed files with 34 additions and 5 deletions

View File

@@ -1,8 +1,28 @@
<style>
form {
margin: 15px;
}
form > div {
margin: 20px 0px;
}
.define_paypal_credentials_cipf input {
width: 100%;
}
</style>
<!-- https://developer.wordpress.org/reference/hooks/admin_post_action/ -->
<form method="POST" action="<?php echo admin_url( 'admin-post.php' ); ?>">
<input type="hidden" name="action" value="<?php echo $admin_post_paypal; ?>">
<?php wp_nonce_field($nonce_paypal['_action'], $nonce_paypal['_name']); ?>
<div class="input_wrapper">
<div class="define_paypal_credentials_cipf define_paypal_client_id_cipf">
<label for="paypal_client_id_cipf">client id : </label>
<input type="text" id="paypal_client_id_cipf" name="client_id" value="<?php echo $paypal_credentials['client_id']; ?>" />
</div>
<div class="define_paypal_credentials_cipf define_paypal_secret_id_cipf">
<label for="paypal_client_secret_cipf">client secret : </label>
<input type="text" id="paypal_client_secret_cipf" name="client_secret" value="<?php echo $paypal_credentials['client_secret']; ?>" />
</div>
<div class="choose_sandbox_live_cipf">
<input type="radio" id="sandbox" name="<?php echo $sandbox_live['_name']; ?>" value="<?php echo $sandbox_live['sandbox']; ?>" checked />
<label for="sandbox">sandbox</label>
<input type="radio" id="live" name="<?php echo $sandbox_live['_name']; ?>" value="<?php echo $sandbox_live['live']; ?>" />