<commit_before>



 <?php 
 require_once 'lib/Stripe.php';

 Stripe::setApiKey("<KEY>");

 $token="<KEY>";
 if(isset($_POST)) {
	
	
 try {
 	
 	$payment = Stripe_Charge::create(array(
 	
 			'amount'        => $_POST['amount'],
 			'currency'      => $_POST['currency'],
 			'card'          => array(
 					'number'    => $_POST['card'],
 					'exp_month' => $_POST['emonth'],
 					'exp_year'  => $_POST['eyear'],
 					'cvc'       => $_POST['eCvv']
 			),
 			'description'   => $_POST['description']
 	
 	)
 	);
 	print_r($payment);
 	
 } catch (Stripe_Error $e) {
 	
 	print_r($e);
 }

}
 ?> 



<commit_msg>Charge.php replaced<commit_after>


 <?php 
//   require_once(dirname(__FILE__) . '/config.php');

require_once 'lib/Stripe.php';
include "config.php";

  $token  = $_POST['stripeToken'];

 try {
 	$customer = Stripe_Customer::create(array(
 			'email' => '<EMAIL>',
 			'card'  => $token
 	));
 	
 	$charge = Stripe_Charge::create(array(
 			'customer' => $customer->id,
 			'amount'   => 5000,
 			'currency' => 'usd'
 	));
 	
 	
 	
 	echo '<h1>Successfully charged $50.00!</h1>';
 } catch (Exception $e) {
 	
    echo 'ErrorMsg: ' .$e->getMessage();
 }

  
?>


 <?php 
// require_once 'lib/Stripe.php';

// Stripe::setApiKey("<KEY>");

// $token="tok_103<PASSWORD> <KEY>";
// if(isset($_POST)) {
	
	
//  try {
 	
//  	$payment = Stripe_Charge::create(array(
 	
//  			'amount'        => $_POST['amount'],
//  			'currency'      => $_POST['currency'],
//  			'card'          => array(
//  					'number'    => $_POST['card'],
//  					'exp_month' => $_POST['emonth'],
//  					'exp_year'  => $_POST['eyear'],
//  					'cvc'       => $_POST['eCvv']
//  			),
//  			'description'   => $_POST['description']
 	
//  	)
//  	);
//  	print_r($payment);
 	
//  } catch (Stripe_Error $e) {
 	
//  	print_r($e);
//  }

// }
// ?>




{'fraction_non_alphanumeric': 0.233278955954323, 'fraction_numerical': 0.0070690592713431215, 'mean_word_length': 2.2974910394265233, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1583967', 'n_tokens_mistral': 848, 'n_tokens_neox': 736, 'n_words': 98}