php - how to pass my custom variables to my payment procedure when customer is click on the payment button? -
i creating table of services or products each product have id next it. want grab product id url of buy button when customer click on button, , when customer have done shopping , custom id should return site within success url.
i want activate each product when customer had done payment using specific button next product.
and product activated when id come success url.
because here multiple items thats why trying use unique id.
if there 1 product, shouldn't use method.

i using payza , want use same method that.
any idea how can this?
many in advance.
try go paypals developer page. have examples. if remember correct can provide id in special variable when link paypal. post request along transaction ids, when post should remember request paypal again verify legit
to id url: if have in database why not echo directly url?
edit: send information needed paypal make form this. should sent post can't use simple link:
$paypalbutton = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">'; $paypalbutton .= '<input type="hidden" name="cmd" value="_xclick">'; $paypalbutton .= '<input type="hidden" name="business" value="'.bs_business.'">'; $paypalbutton .= '<input type="hidden" name="item_name" value="'.bs_shopname.'">'; $paypalbutton .= '<input type="hidden" name="currency_code" value="'.bs_paypalcur.'">'; $paypalbutton .= '<input type="hidden" name="amount" value="'.$total.'">'; $paypalbutton .= '<input type="hidden" name="shipping" value="'.$shipping.'">'; $paypalbutton .= '<input type="hidden" name="no_shipping" value="0">'; $paypalbutton .= '<input type="hidden" name="custom" value="'.$cartid.'">'; $paypalbutton .= '<input type="hidden" name="first_name" value="'.$customer['bs_firstname'].'">'; $paypalbutton .= '<input type="hidden" name="last_name" value="'.$customer['bs_lastname'].'">'; $paypalbutton .= '<input type="hidden" name="address1" value="'.$customer['bs_address1'].'">'; $paypalbutton .= '<input type="hidden" name="address2" value="'.$customer['bs_address2'].'">'; $paypalbutton .= '<input type="hidden" name="city" value="'.$customer['bs_city'].'">'; $paypalbutton .= '<input type="hidden" name="zip" value="'.$customer['bs_zip'].'">'; $paypalbutton .= '<input type="hidden" name="state" value="'.$customer['bs_state'].'">'; $paypalbutton .= '<input type="hidden" name="email" value="'.$customer['bs_email'].'">'; $paypalbutton .= '<input type="hidden" name="night_phone_a" value="'.substr($phone,0,2).'">'; $paypalbutton .= '<input type="hidden" name="night_phone_b" value="'.substr($phone,2).'">'; $paypalbutton .= '<input type="hidden" name="return" value="'.bs_return.'">'; $paypalbutton .= '<input type="hidden" name="country" value="'.$postage['bs_country_isocode2'].'">'; $paypalbutton .= '<input type="hidden" name="image_url" value="'.bs_image.'">'; $paypalbutton .= '<input type="submit" name="submit" alt="make payments paypal - it\'s fast, free , secure!" value="go payment >"></form>'; as can see i'm passing shopping card id in key 'custom'. key value back. 'return' link paypal redirects user after purchase. not values back. can show message 'thank shopping @ shop'
after payment paypal sends values link specify. shouldn't use method (the ? , key/value pairs after link) paypal sending neccesary data post request link think call member.php
nb: important. these data can't trust. because can send these data return link. after receiving return data sent paypal verify legitimate request. 'ok' , give customer goods. hope helps.
Comments
Post a Comment