Paypal integration with asp.net,C#.net E-commerces Website
I have created a seller and buyer account in paypal sand box. Now I want to integrate paypal feature to my website (Asp.net,C#.net). From the page CheckOut.aspx, I capture Billing Info and ship info then I redirect to PayPalProcessing.aspx page.
How can I see my transaction on seller account in paypal sand box site?
开发者_StackOverflow中文版How to do a order-->add to cart--->do a transaction with paypal sand box?
Use PayPal API
How Website Payment Standart works?
Example BuyNow
button;
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="seller@apress.com"/>
<input type="hidden" name="item_name" value="Red Jacket"/>
<input type="hidden" name="item_number" value="7601"/>
<input type="hidden" name="amount" value="125.00"/>
<input type="hidden" name="no_shipping" value="2"/>
<input type="hidden" name="no_note" value="1"/>
<input type="hidden" name="currency_code" value="USD"/>
38 CHAPTER 3 n BASIC WEBSITE PAYMENTS
Figure 3-1. The checkout flow for Website Payments Standard
<input type="hidden" name="bn" value="PP-BuyNowBF"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif"å
border="0" name="submit"å
alt="Make payments with PayPal - it's fast, free and secure!"/>
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif"
width="1" height="1"/>
</form>
business
: The email address of the PayPal account selling the item
item_name
: The name of the item for sale
item_number
: An identifier you can use to track an internal inventory number
amount
: The price of the item
currency_code
: The currency of the value specified in amount
image
: The URL of the button’s image
Your options depend on the PayPal solution you are using. There is technical documentation available for the various API's here:
- Documentation
- SDK's
- Code Samples
These should hopefully get you started.
The general stratagy for PayPal however is as follows:
- Capture details of your transaction on your site. IE: Items for sale, number of units, costs, user details (not strictly required up front) etc.
- Make API call to PayPal, passing these details and some additional information. This can be done in several way, for example by a HTTP POST.
- Assuming a valid formatted request, PayPal replies with details of the PayPal transaction (a token you can use later) and a unique URL for the users to visit.
- You redirect your users to the URL provided by PayPal. This page will let them log in to PayPal and approve the transaction. Payment can be made immediately, or deferred until the next step.
- They are redirected back to a landing page on your website (which you can specify in step 2). Either they have already paid, in which case you make a further call to PayPal API to validate that the transaction completed sucessfully and then continue the processing of thier order, OR you offer them a "Confirm Payment" button and then perform the rest of this step after they click that.
- You call the PayPal API with the transaction token to receive extra information you may not have captured, such as the postage address and customer contact details.
The PayPal API provides various functions for initiating, completing, cancelling and querying details of a transaction with a customer.
精彩评论