【发布时间】:2015-10-16 23:57:12
【问题描述】:
我使用 wordpress 插件 - IPN PayPal,我想在我的主站点列表中显示付款。我不会用这个paypal hooks。
<?php
add_action('paypal_ipn_for_wordpress_ipn_response_handler', 'process_recurring_handler', 10, 1);
function process_recurring_handler( $posted )
{
// Parse data from IPN $posted[] array
$first_name = isset($posted['first_name']) ? $posted['first_name'] : '';
$last_name = isset($posted['last_name']) ? $posted['last_name'] : '';
$mc_gross = isset($posted['mc_gross']) ? $posted['mc_gross'] : '';
$recurring_payment_id = isset($posted['recurring_payment_id']) ? $posted['recurring_payment_id'] : '';
$payer_email = isset($posted['payer_email']) ? $posted['payer_email'] : '';
$txn_id = isset($posted['txn_id']) ? $posted['txn_id'] : '';
/**
* At this point you can use the data to generate email notifications,
* update your local database, hit 3rd party web services, or anything
* else you might want to automate based on this type of IPN.
*/
}
?>
这个我添加到function.php但是这个调用如何在页面上的表格中显示适当的数据? 我试过了
<?php do_action('paypal_ipn_for_wordpress_ipn_response_handler')?>
但它不起作用。 我完全是世俗的,帮助
【问题讨论】:
标签: php wordpress paypal paypal-ipn