paypal express checkout on REST api (C# lib) -
i dont idea. if classic api have doexpresscheckout methods... rest api have it? on image have way how should work classic way 
so case express checkout steps are: 1) customer put items in cart , click on paypal checkout button run
var payment = new paypal.api.payment(); var createdpayment = payment.create(apicontext); so make payment , redirect customer paypal site
2) customer go thu paypal process , return site. pay pal transaction should shipment address , email (without submit payment!) , based on shipment address calculate shipment cost
3) after customer select shipment method need update transaction (add shipment cost) , sumbit it.
so questions here
1) how payment (transaction) info c# lib based on paymentid (like pay-21a17783au475540mkygam5q) because paypal.api.payment() have methods creare, execute , update?
2) how update current transaction (add new data shipment cost) , submit it?
ps. in documents lot of mess , lot of people dont understand how should use api properly.
duke
based on post, you'd create order - suggest use library in link (it includes samples, should going quickly, maintained, , maintainers great/responsive)
create it - map classic
setexpresscheckoutredirect paypal obtain user approval. redirect url part of response (no longer token)
if user "approves", paypal redirects in classic
- you'll see handled in sample in
elseblock - just in classic
payeridin querystring
- you'll see handled in sample in
execute payment
- the response contain data need see in lines below execute statement, maps
getexpresscheckoutdetails - you see options on next (auth, capture, etc.) in commented lines. these map "finalizing" payment
- you can "adjust" shipping/tax in above after obtaining details , have same rules classic iinm far maximum additional amount can add - 115% not exceed $75)
- the response contain data need see in lines below execute statement, maps
if have sandbox account, have debug page here shows data io maybe helpful.
note i'm partially capturing ("is_final_capture": false) if check sandbox (buyer) account, total charged wouldn't full amount
hth..
Comments
Post a Comment