hey leute,
grundsätzlich geht es mir um dieses Codeschnipsel:
Hey leute, dieses script wird aufgerufen, wenn man den paypal-button betätigt hat.
Nun geht es mir darum, dass "quantity" immer 1 sein muss.Bei jeder Transaktion!
z.b. :
Nun will ich mich aber auf das "custom" beziehen.
Da wollte ich fragen, was ich für "custom" im paypal-Button setzen muss.
Wäre echt nett, wenn mir da jemand helfen könnte.
danke und lg!
grundsätzlich geht es mir um dieses Codeschnipsel:
PHP:
$product_id_string = $_POST['custom'];
$product_id_string = rtrim($product_id_string, ","); // letztes komma weg
// Explode string, mach ein array draus
$id_values = array();
$id_str_array = explode(",", $product_id_string);
$fullAmount = 0;
foreach ($id_str_array as $key => $value) {
$id_quantity_pair = explode("-", $value);
$product_id = $id_quantity_pair[0]; // product ID
$product_quantity = $id_quantity_pair[1]; // product quantity
Nun geht es mir darum, dass "quantity" immer 1 sein muss.Bei jeder Transaktion!
z.b. :
PHP:
if (1 != intval($product_quantity)) {
// Somebody is manipulating the item´s quantity
$message = "Somebody is manipulating the item´s quantity";
mail("[email protected]", "Quantity Hack", $message, "From: [email protected]" );
exit()
}
Da wollte ich fragen, was ich für "custom" im paypal-Button setzen muss.
Wäre echt nett, wenn mir da jemand helfen könnte.
danke und lg!