在您的支付寶的形式,簡單地使用類似以下您的自定義字段..
例子:
<input type="hidden" name="custom" value="<?php echo $custom1.','.$custom2.','.$custom3; ?>">
或;
<input type="hidden" name="custom" value="custom1,custom2,custom3">
總之,自定義名稱被PayPal接受,您可以使用逗號分隔變量。
PayPal會將自定義字段傳回給您,在IPN中。
編輯:
這裏是你可能自定義做一個例子:
$custom = $_POST['custom'];
$pattern = ",";
$pieces = explode($pattern,$custom, 3);
// 3 is how many custom fields there are
$custom1 = $pieces[0];
$custom2 = $pieces[1];
if (isset($pieces[2])) {
//an example checking to see if there is a third custom variable
$custom3 = $pieces[2];
}
雖然這個過程是可以理解的,你的問題是模糊的。你指的是什麼「變數」?我的意思是,我們是否在爲您的網站/用戶討論自定義變量?在這種情況下,PayPal提供了一個「自定義」選項。如果你能詳細說明並提供你當前的代碼,那將會有所幫助。 –
@JeffreyKastner是的,自定義變量。字符串和布爾值的混合。 – Ethan