本文整理汇总了PHP中Paypal::set_receiver_email方法的典型用法代码示例。如果您正苦于以下问题:PHP Paypal::set_receiver_email方法的具体用法?PHP Paypal::set_receiver_email怎么用?PHP Paypal::set_receiver_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paypal
的用法示例。
在下文中一共展示了Paypal::set_receiver_email方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Paypal
// assign posted variables to local variables
$item_name = $_POST['item_name'];
$item_number = $_POST['item_number'];
$payment_status = $_POST['payment_status'];
$r = $_POST['mc_gross'];
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
//INSERT ACTIONS HERE
if ($payment_status == "Completed") {
$pay = new Paypal();
$pay->set_item_name($item_name);
$pay->set_payment_amount($payment_amount);
$pay->set_txn_id($txn_id);
$pay->set_receiver_email($receiver_email);
$pay->set_payer_email($payer_email);
$this->payrepository->insert($pay);
}
if (DEBUG == true) {
error_log(date('[Y-m-d H:i e] ') . "Verified IPN: {$req} " . PHP_EOL, 3, LOG_FILE);
}
} else {
if (strcmp($res, "INVALID") == 0) {
// log for manual investigation
// Add business logic here which deals with invalid IPN messages
if (DEBUG == true) {
error_log(date('[Y-m-d H:i e] ') . "Invalid IPN: {$req}" . PHP_EOL, 3, LOG_FILE);
}
}
}