本文整理匯總了PHP中Paypal::set_pay_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP Paypal::set_pay_id方法的具體用法?PHP Paypal::set_pay_id怎麽用?PHP Paypal::set_pay_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Paypal
的用法示例。
在下文中一共展示了Paypal::set_pay_id方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_by_id
public function get_by_id($item_number)
{
$pay = null;
//ARRAY OBJECT PASS GARNA
$pay_list = array();
//DATABASE CONNECTION
$this->db->connect();
//SELECT BY ID
$sql = "SELECT * FROM donations WHERE item_number=?";
//PREPARE
$stmt = $this->db->initialize($sql);
//BIND
$stmt->bind_param("i", $item_number);
//EXECUTE
$stmt->execute();
//BIND RESULT
$stmt->bind_result($pay_id, $item_name, $payment_amount, $txn_id, $payer_email, $item_number);
while ($stmt->fetch()) {
//instantiate object
$paypal = new Paypal();
$paypal->set_pay_id($pay_id);
$paypal->set_item_name($item_name);
$paypal->set_payment_amount($payment_amount);
$paypal->set_txn_id($txn_id);
$paypal->set_payer_email($payer_email);
$paypal->set_item_number($item_number);
array_push($pay_list, $paypal);
}
//CLOSE CONNECTION
$this->db->close();
return $pay_list;
}