Beispiel #1
0
        $p->add_field('item_name_1', $_POST["product_name"]);
        $p->add_field('item_number_1', $_POST["sku"]);
        $p->add_field('quantity_1', $_POST["quantity"]);
        $p->add_field('amount_1', $_POST["product_amount"]);
        $p->add_field('first_name', $_POST["payer_fname"]);
        $p->add_field('last_name', $_POST["payer_lname"]);
        $p->add_field('address1', $add);
        $p->add_field('city', $_POST["payer_city"]);
        $p->add_field('state', $_POST["payer_state"]);
        $p->add_field('country', $_POST["payer_country"]);
        $p->add_field('zip', $_POST["payer_zip"]);
        $p->add_field('email', $_POST["payer_email"]);
        //$p->add_field('sku', $_POST["sku"]);
        $p->submit_paypal_post();
        // POST it to paypal
        $p->dump_fields();
        // Show the posted values for a reference, comment this line before app goes live
        break;
    case "success":
        // success case to show the user payment got success
        echo '<title>Payment Done Successfully</title>';
        echo '<style>.as_wrapper{
	font-family:Arial;
	color:#333;
	font-size:14px;
	padding:20px;
	border:2px dashed #17A3F7;
	width:600px;
	margin:0 auto;
}</style>
';