Skip to content

Instantly share code, notes, and snippets.

@AndryWJ
Created February 7, 2020 10:07
Show Gist options
  • Save AndryWJ/bf9a98d80318d4a947563c9abd08f0af to your computer and use it in GitHub Desktop.
Save AndryWJ/bf9a98d80318d4a947563c9abd08f0af to your computer and use it in GitHub Desktop.
<?php
/**
* The Template for displaying all single posts
*
* Template Name: Sber
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
get_header();
?>
<section id="content_body">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-9 col-sm-push-3">
<div class="moduletable">
<span class="breadcrumbspathway">
<?php bcn_display(); ?><hr>
</span>
</div>
<div class="blog">
<div>
<table class="contentpaneopen">
<tr>
<td valign="top" colspan="2">
<div align="justify">
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php //comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div>
</td>
</tr>
</table>
<span class="article_separator">&nbsp;</span>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-sm-pull-9">
<?php //get_sidebar();
echo fs_load_template_part('sidebar'); ?>
</div>
</div>
</div>
<form action="/rest.php" method="post" class="" id="paysend" novalidate="novalidate" style="display:none">
<input type="hidden" name="description" value="">
<input type="hidden" name="amount" value="">
</form>
</section>
<script src="https://3dsec.sberbank.ru/demopayment/docsite/assets/js/ipay.js"></script>
<script>
var ipay = new IPAY({api_token: 'at0ls6ou3os4i7a6v2jp14rap0'});
(function(){
const fields = {
'f1':'Фамилия пациента',
'f2':'Имя пациента',
'f3':'Отчество пациента',
'f1':'Фамилия пациента',
'b-date': 'Дата рождения пациента',
'telephone':'Телефон пациента',
'email':'E-mail плательщика',
'p-fio':'ФИО плательщика'
};
jQuery(document).ready( function() {
function showSuccessfulPurchase(num_order){
jQuery('#successpay').show();
}
function showFailurefulPurchase(num_order){
jQuery('#errorpay').show();
}
jQuery('a[href="#contact_form_pop_footer"]').closest('div').hide();
document.addEventListener( 'wpcf7mailsent', function( event ) {
console.log('1');
if(event.detail.contactFormId=="10775"){ //
console.log('2');
var tstr = 'Авансовый платёж за предоставление медицинских услуг в ООО Клиника Позвоночника на Авиаконструкторов. Пациент ';
tstr += jQuery('input[name="f1"]').val() + ' ' + jQuery('input[name="f2"]').val() + ' ' + jQuery('input[name="f3"]').val() + ' ' + jQuery('input[name="b-date"]').val() + ' г.р. Телефон: ' + jQuery('input[name="telephone"]').val() + '. ' ;
tstr += 'Плательщик: ' + jQuery('input[name="p-fio"]').val() + '. '; //' e-mail: ' + jQuery('input[name="email"]').val() + '. ';
amount = jQuery('input[name="summa"]').val();
console.log(tstr);
jQuery('#paysend input[name="amount"]').val(amount);
jQuery('#paysend input[name="description"]').val(tstr);
jQuery('#paysend').submit();
}
}, false );
});
})();
</script>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment