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 enter image description here

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)

  1. create it - map classic setexpresscheckout

  2. redirect paypal obtain user approval. redirect url part of response (no longer token)

  3. if user "approves", paypal redirects in classic

  4. 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)

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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -