Thankee Ken and Klaus! I didn't use POST. I could not get it to work that way. But I created the URL and then handled it like any other website URL.

I've got it working!

on paypalDirect
  global tUrl,referral,desiredColor

  put "https://www.paypal.com/cgi-bin/webscr"; into tUrl

  put "cmd,business,item_name,item_number,amount,no_shipping" into tParams
  put ",no_note,return,cancel_return,currency_code" after tParams
  put ",on0,os0,on1,os1" after tParams

  put "_xclick,[EMAIL PROTECTED],Product Name,xx0" into tValues
  put ",19.95,1,1,http://www.yourDomain.com/thankyou.html"; after tValues
  put ",http://www.yourDomain.com/cancel.html,USD"; after tValues
  put ",Color,xx1,Referred By,xx2" after tValues

  put "" into tParamString

  repeat with x = 1 to the number of items of tParams
    if x = 1 then
put "?" & item x of tParams & "=" & urlencode(item x of tValues) after tParamString
    else
put "&" & item x of tParams & "=" & urlencode(item x of tValues) after tParamString
    end if
  end repeat

  put tParamString after tUrl

  replace "xx0" with desiredColor in tUrl
replace "xx1" with desiredColor in tUrl # put it in two places in case one failed
  # I had trouble before getting paypal to accept multiple extra infos
  # So I put it as Paypal's item_number, then again as an extra info
  # yes this is redundant
  replace "xx2" with urlencode(referral) in tUrl

  goUrl # tUrl is the URL to send to paypal
# goUrl sends it just like any other web URL, the method depending on the operating system

end paypalDirect

--
Mac and Windows shareware games
http://www.gypsyware.com
_______________________________________________
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to