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;

http://stackoverflow.com/questions/8452563/paypal-api-request-with-mvc3

http://stackoverflow.com/questions/4057762/paypal-api-and-paypals-sample-code

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;

http://documentation.spicelogic.com/DocResources/slAspNetPayPalControl/category-13/index.html -Documentation

http://documentation.spicelogic.com/docs/ASP-NET-PayPal-Control/Buy-Now-Button-81

http://documentation.spicelogic.com/docs/ASP-NET-PayPal-Control/How-to-test-in-PayPal-SandBox-77

Jan 24, 2012 at 3:48 AM

Try http://www.arunrana.net/2012/01/paypal-integration-in-mvc3-and-razor.html

Coordinator
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. http://paypalhelper.codeplex.com/

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 (mvcmusicstore@discussions.codeplex.com)

To start a new discussion for this project, email mvcmusicstore@discussions.codeplex.com

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

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

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

@kaneXtreme

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 pshitote@live.com 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="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online" /> | <a href="javascript:history.go(-1)">Back</a>
 </form>

You can try the rest of the methods from this site http://www.arunrana.net/2012/01/paypal-integration-in-mvc3-and-razor.html

Feel free to ask any questions if you get stuck.

 

Cheers!

Mar 9, 2012 at 9:47 AM

@KaneXtreme

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

Cheers