payflowpro - PayPal Payflow: How to verify in one request, and then authorize in another without saving CC info? -
i'm building book store , building checkout using paypal payflow . checkout flow:
shipping info --> billing info |verify cc using paypal| --> order summary --> submit |authorize cc using paypal|
shipping info: fill out shipping address, nothing special here
billing info: fill out billing address + credit card info. don't save credit card info since it's against standards, instead send cc number, expiration date, , cvv directly paypal verify. paypal approves.
order summary: order sees summary of order before submits order. presses submit , request paypal sent authorize funds.
however, cc info vanishes after #2, how persist data #3 can send paypal again?
can use origid point pnref ? documentation says have full request whole params list (including cc info, cvv, exp date, etc).
trxtype=a&tender=c&pwd=x1y2z3&partner=paypal&vendor=supermerchant&user=s upermerchant&acct=5555555555554444&expdate=0308&amt=123.00&comment1=seco nd purchase&comment2=low risk customer&invnum=123456789&street=5199 maple&zip=94588
or misunderstanding authorization means? isn't authorization reserving funds in user's cc? shouldn't done until user presses submit order right?
i figured out.
the documentation here: https://www.paypalobjects.com/webstatic/en_us/developer/docs/pdf/pp_payflowpro_guide.pdf
on page 40 mentions briefly, doesn't go detail checkout flow though seems pretty common.
my assumption right, in address verification request first cc info, , use pnref returned. save pnref id in session , reuse submit request looks this:
def authorize_transaction(pnref) make_request(authorization_data(pnref)) end def authorization_data(pnref) { "trxtype" => "a", "tender" => "c", "user" => paypal_api["user"], "pwd" => paypal_api["pwd"], "vendor" => paypal_api["user"], "partner" => "paypal", "amt" => purchase.total_price, "origid" => pnref, "verbosity" => "high" } end
and receive desired response:
{"result"=>"0", "pnref"=>"a10a6a9c08e1", "respmsg"=>"approved", "authcode"=>"752pni", "avsaddr"=>"y", "avszip"=>"y", "hostcode"=>"a", "procavs"=>"y", "visacardlevel"=>"12", "transtime"=>"2014-01-31 11:53:56", "firstname"=>"net", "lastname"=>"theory", "amt"=>"15.64", "acct"=>"1111", "expdate"=>"0115", "cardtype"=>"0", "iavs"=>"n"}
Comments
Post a Comment