Paypal integration

Jan 4, 2012 at 9:36 AM

I have downloaded the mvc music store application. My only problem is on the integration with Paypal shopping cart. Can I have a sample on how to integrate the application with paypal?

Jan 5, 2012 at 1:32 PM

In anyone interested in integrating MVC music store with PAYPAL or any other credit systems

Jan 14, 2012 at 8:06 AM

I am interested. I have yet to start on this part yet though. I have noticed many helpful topics in StackOverflow;

You might check this out;

But there's a catch as it cannot be implemented beyond PayPal Sandbox. If you want to apply it in the real PayPal website you'd be required to purchase a licence; -Documentation

Jan 24, 2012 at 3:48 AM


Jan 24, 2012 at 7:54 AM
There's also a Paypal Helper available. It's titled Paypal Helper for WebMatrix, but as it's just a Razor helper it would work in MVC as well.

On Monday, January 23, 2012, kaneXtreme wrote:

From: kaneXtreme

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at

Feb 2, 2012 at 1:34 AM
Edited Feb 3, 2012 at 6:08 AM

Thanks @JonGalloway!

I'm wondering what would be the right work-flow to implement PayPal?

Right now in my project, when a user clicks Checkout he is proceeded to PayPal and then returned to AddressAndPayment upon sucessful payment.

Mar 6, 2012 at 12:48 PM


Seems you have made some progress in your application on integration with Paypal. Can you please share the source code or attach it to my mail as I have a great need in implementing this application.

Mar 8, 2012 at 4:57 AM

Sure. I have this in shoppingcart.cs

<form id="frm" action="@ViewBag.actionURL" method="post">
@{Html.RenderAction("PostToPaypal", "ShoppingCart");}

    var seq = 0;
       <input type="hidden" name="upload" value="1"/>
    foreach (var item in Model.CartItems)
        seq = seq + 1;
        var tmp_str = MvcHtmlString.Create("item_name_" + seq.ToString());   
       <input type="hidden" name="@tmp_str" value="@item.Product.Title"/>
        tmp_str = MvcHtmlString.Create("quantity_" + seq.ToString()); 
       <input type="hidden" name="@tmp_str" value="@item.Count" />
        tmp_str = MvcHtmlString.Create("amount_" + seq.ToString());    
       <input type="hidden" name="@tmp_str" value="@item.Product.Price"/>   

    <br />
        <input type="image" name="btnsubmit" src="" alt="PayPal - The safer, easier way to pay online" /> | <a href="javascript:history.go(-1)">Back</a>

You can try the rest of the methods from this site

Feel free to ask any questions if you get stuck.



Mar 9, 2012 at 9:47 AM


Thanks for that. In case I get stuck I will let you know.