1
votes

I am working on a ASP.NET + Paypal Express project, Website only have 1 $10 product but customer can buy it in quantities (i.e 1 or 4 or 20 etc )

Its like a paypal cart but only with 1 product with quantities.

I have searched a lot but unable to find some suitable one.

Also I want to redirect my customer to a form after paying money on paypal website.

Can you just tell me the simplest method ?

Also I have few more question :- using minicart Paypal is suitable for this? Do I need to configure Paypal Express account & what to configure ?

Thanks a lot :)

=================================================================

Update : Use Paypal mini cart if you need simple integration

Add cart script.js before the body tag ( https://minicart.paypal-labs.com/ ) After that All you need to add this code in your html

      <div class="demo container" align="center" >
        <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
            <fieldset>
                <input type="hidden" name="cmd" value="_cart">
                <input type="hidden" name="add" value="1">
                <input type="hidden" name="business" value="@gmail.com">
                <input type="hidden" name="item_name" value="Buy Our Services">
                <input type="hidden" name="amount" value="6.00">
                <%--<input type="hidden" name="discount_amount" value="1.00">--%>
                <input type="hidden" name="currency_code" value="USD">
                <input type="hidden" name="return" value="https://minicart.paypal-labs.com/?success">
                <input type="hidden" name="cancel_return" value="https://minicart.paypal-labs.com/?cancel">
                <strong>Service</strong>
                <ul>
                    <li>Price: $6.00</li>

                </ul>
                <input type="submit" name="submit" value="Add to cart" class="button">
            </fieldset>
        </form>


        <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" class="last"> 
            <fieldset>
                <input type="hidden" name="business" value="@gmail.com"> 
                <input type="hidden" name="cmd" value="_cart"> 
                <input type="hidden" name="display" value="1"> 
                <input type="submit" name="submit" value="View your cart" class="button">
            </fieldset>
        </form>
    </div>

Change parameter accordingly & remove link to paypal instead of sandbox You Paypal cart is ready to go. If you want a more flexible solution then you should check this URL http://www.codeproject.com/KB/aspnet/paypal_c_aspnet.aspx

Thanks

1
I have used mini cart Paypal.Let see..how it goes Also Robert can you tell me what customization I need in need in Paypal Account....Thanks In advancepanky sharma
Hi, none whatsoever; Express Checkout is available (nearly) globally and doesn't require any changes to your account. All you need is the API credentials, after which you can start making the initial API calls.Robert
thanks so much Robert :)panky sharma
@Robert Also I need your help on another Papal related issue.I have a Transition Success page that need to store customer data.So how can I authenticate this page on page load. I mean it open only when it redirect from Paypal domain or something like that . Thanks for your helppanky sharma

1 Answers

0
votes

Panky are you sure is it the right way ?

Customer come on site

Choose product/s and quantity/ies

Before do that you should store in session/database/cookies info that you need and pass to paypal only the stuff that you need with an id or other stuff which could be used to recognized customer too.

then move to pay to paypal.

Customer pay on paypal and paypal send back info about transaction

With these details you may re-create all the info that you need ans can use to complete first step back office tasks or even you may only show some message to cusotmer.

then you will wait ipn's(Instant Payment Notification) callback in order to make all tasks needed in backoffice automation.

This is the right way to do it.

Also you may able to make a good exception handling in order to prevent issue within it.