分享个7b2商城回调代码

528

最近穷啊,找不到东西卖,分享个7b2回调代码,给有需要的朋友!

[ttpay id="csOHS5fcb623237f7c" price="990" currency="cash" vip2price="0" vip3price="0" tt]

//商城购买确认
add_action('wp_ajax_zrz_shop_order_check','zrz_shop_order_check');
function zrz_shop_order_check()
{
	$user_id = get_current_user_id();
	$zrz_orders = get_user_meta($user_id, 'zrz_orders', true);
	if (!$zrz_orders || !is_array($zrz_orders)) {
		print json_encode(array('status' => 401, 'msg' => __('支付失败', 'ziranzhi2')));
		die;
	}
	$ids = $zrz_orders['ids'];
	$payed = $zrz_orders['payed'];
	print json_encode(array('status' => 200, 'msg' => $ids, 'payed' => $payed));
	die;
}

[/ttpay]

发表评论 (0)

后再参与讨论