HEX
Server: Apache
System: Linux wyse1.wyseservers.com 4.18.0-553.124.4.el8_10.x86_64 #1 SMP Fri May 15 04:14:14 EDT 2026 x86_64
User: kochikidswysewor (1061)
PHP: 8.3.33
Disabled: NONE
Upload Files
File: /home/kochikidswysewor/www/wp-content/themes/children-charity-child/pay_now.php
<?php
/*
* import checksum generation utility
* You can get this utility from https://developer.paytm.com/docs/checksum/
*/
// require_once("PaytmChecksum.php");

// $paytmParams = array();

// $paytmParams["subwalletGuid"]      = "28054249-XXXX-XXXX-af8f-fa163e429e83";
// $paytmParams["orderId"]            = "ORDERID_98765";
// $paytmParams["beneficiaryAccount"] = "918008484891";
// $paytmParams["beneficiaryIFSC"]    = "PYTM0123456";
// $paytmParams["amount"]             = "1.00";
// $paytmParams["purpose"]            = "SALARY_DISBURSEMENT";
// $paytmParams["date"]               = "2020-06-01";

// $post_data = json_encode($paytmParams, JSON_UNESCAPED_SLASHES);

// /*
// * Generate checksum by parameters we have in body
// * Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
// */
// $checksum = PaytmChecksum::generateSignature($post_data, "YOUR_MERCHANT_KEY");

// $x_mid      = "YOUR_MID_HERE";
// $x_checksum = $checksum;

// /* for Staging */
// $url = "https://staging-dashboard.paytm.com/bpay/api/v1/disburse/order/bank";

// /* for Production */
// // $url = "https://dashboard.paytm.com/bpay/api/v1/disburse/order/bank";

// $ch = curl_init($url);
// curl_setopt($ch, CURLOPT_POST, true);
// curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
// curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "x-mid: " . $x_mid, "x-checksum: " . $x_checksum)); 
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
// $response = curl_exec($ch);
// print_r($response);

 include '../../../wp-load.php';
$case_id=$_SESSION['child_id'];
$agency = get_field('agency_name', $case_id);
$agencyName = $agency['ID'];
$cause_id=$_POST['cause_id'];
$case_title=$_POST['case_title'];
// $bnk_name=$_POST['bnk_name'];
// $bnk_acc=$_POST['bnk_acc'];
// $ifsc=$_POST['ifsc'];
$amount=$_POST['amount'];
$date=date("Y-m-d H:i:s");;
// $purpose=$_POST['purpose'];
$customer_name=$_POST['customer_name'];
$email=$_POST['email'];
$user = wp_get_current_user(); 
$user_name = $user->ID;
$post_id = wp_insert_post(array (
   'post_type' => 'donations',
   'post_title' => $case_title,
   'post_status'   => 'publish'
));

if($email ==''){
   $email = $user->user_email;
}

if( ! ( wp_is_post_revision( $post_id ) || wp_is_post_autosave( $post_id ) ) ) {
	update_field( 'field_6409578bb7e6d', $agencyName, $post_id );
    update_field( 'field_640958f8b7e72', $cause_id, $post_id );
    update_field( 'field_64095835b7e6e', $case_id, $post_id );
    // update_field( 'field_640959b31ecf8', $bnk_name, $post_id );
    // update_field( 'field_640959c31ecf9', $bnk_acc, $post_id );
    // update_field( 'field_63ca57c302e25', $ifsc, $post_id );
    update_field( 'field_64095843b7e6f', $amount, $post_id );
    update_field( 'field_64099b1b8b405', $date, $post_id );
    update_field( 'field_6409587cb7e71', $customer_name, $post_id );
    update_field( 'field_6409a41e7c586', $user_name, $post_id );
    update_field( 'field_640f19af400e0', 'pending', $post_id );
    update_field( 'field_640feb92ad069', $email, $post_id );
    $sub_fields = array(
            'approve_agent_feedback' => 'no'

        );
    update_field('field_640ad6dba2b95', $sub_fields,  $post_id);
    
}
echo $post_id;

if(!empty($post_id)) {
   $_SESSION["donation_id"] = $post_id ;
}

?>