How To Setup Paypal on a Django Project (Simple Setup)

Поділитися
Вставка
  • Опубліковано 17 жов 2024
  • Learn how to setup Paypal on a Django project 🙂.
    --
    Want me to help teach you code? You can reach out to me via Codementor.io and I'd love to help you 🙂.
    Here's my codementor profile: www.codementor...
    ---
    My Links:
    My Website: www.zackplauch...
    Codementor: www.codementor...
    Wyzant: www.wyzant.com...
    GitHub: github.com/Zac...
    Stack Overflow: stackoverflow....

КОМЕНТАРІ • 37

  • @johncrunk8038
    @johncrunk8038 2 місяці тому +1

    it works! Thanks for doing the dirty work.

    • @zackplauche
      @zackplauche  2 місяці тому

      Glad it worked for you 🙂 It definitely felt like dirtywork 😂😂😂

  • @mikebowser48
    @mikebowser48 Місяць тому +1

    Thank you!

  • @mikebowser48
    @mikebowser48 Місяць тому +1

    Thanks! One problem I am having is what URL do you use if I"m public facing already to receive the Paypal IPN's on my sandbox business account. I don't know what URL to receive them at.

    • @zackplauche
      @zackplauche  Місяць тому

      That's a good question, this video is a bit old and I haven't worked with it in a while :/

  • @Nikhilkumar-tv3ei
    @Nikhilkumar-tv3ei 10 місяців тому +1

    loved it.. keep growing man

  • @machib77
    @machib77 Рік тому +3

    thank you so much for this excellent tutorial. I hope you can consider doing one for membership subscriptions

    • @zackplauche
      @zackplauche  11 місяців тому +1

      Ooo, interesting idea! How do you mean exactly?

  • @prismon1266
    @prismon1266 2 роки тому +1

    Thank you for this tutorial. I have a question, in the signals, when creating an order model, how to i save new data to my custom order model

  • @hjluna7760
    @hjluna7760 2 роки тому +1

    thank you so much for this video....but I am having an issue in this part , I tried to follow you step by step but then this error while clicking the paypal button : "has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." and it doesn't bring me to paypal page.... I don't know how can I solve it, I try adding CORS_ORIGIN_ALLOW_ALL = True in my project settings.py and tried to add CORS extension in my chrome but doesn't work ...

    • @zackplauche
      @zackplauche  2 роки тому +1

      Hey hj! Hmm, I haven't had this error before. I will try to reproduce it on my own and see if I can get the same error and get back to you.

    • @hjluna7760
      @hjluna7760 2 роки тому

      @@zackplauche thank you so much

  • @muganzikisembo238
    @muganzikisembo238 2 роки тому +1

    Boss thanks for the video but I have problem of reverse it seems to have failed to work

    • @zackplauche
      @zackplauche  11 місяців тому

      So this video is a bit outdated now, I haven't worked with Paypal's api in a long time, and quite frankly it was a nightmare 😬 trying to figure out better ways of working with it.

  • @cynet9042
    @cynet9042 2 роки тому

    do i need ngrok in production? or do i just set PAYPAL_TEST = False and it's ready to be deployed? thanks!

    • @Eptapus
      @Eptapus Рік тому +1

      Probably you figured it out already but the short answer is probably no.. Your computer at home is behind your home router and that router by default does not allow anyone from the outside world to connect to your computer for security reasons. I said "by default" since that is the common case for most users. In cases likes yours now where you want to allow traffic from the outside world to your computer at home you should change some of the network configuration of the home router. This could be complicated if you are not familiar with some networking concepts such as opening ports or port-forwarding, ips etc.. What Ngrok does is to forward traffic to your local computer through some kind of vpn technology(this is how I understand it at least). By running the command shown on the video, your computer is connected to an Ngrok server and takes over the random domain name. Then any traffic or request towards that random domain is forwarded to your computer.
      When the time comes for you to put your django in production, probably you will use a dedicated server at some data center or the cloud. That server will be accessible to the internet so you will not need to have any "workarounds" with Ngrok. You will need though to have set your own domain name eg mydjangoappblabla.com
      On the Ngrok website is mentioned that the service can be used in production as well but I do not remember the example cases.

    • @zackplauche
      @zackplauche  11 місяців тому

      @Eptapus dude thanks for the detailed reply haha.

    • @zackplauche
      @zackplauche  11 місяців тому

      @Eptapus you should join my Discord!

  • @giku2681
    @giku2681 2 роки тому

    Is it still working? Because in my project i don`t get any IPN`s to admin panel from my site but only from PayPal IPN Simulator.

    • @zackplauche
      @zackplauche  2 роки тому

      Hmm, I might have to take this vid down. People keep having problems with it. Sorry about that 😬 They may have changed it since I made this one.

    • @giku2681
      @giku2681 2 роки тому

      @@zackplauche You have any ideas how to resolve this problem?

  • @xxriverbeetxx1.065
    @xxriverbeetxx1.065 2 роки тому +1

    great tutorial

  • @jen24499
    @jen24499 Рік тому +1

    December 2022 still works fine! The only problem was with trusted origins after ngrok connection, but it was easy to fix! And Flag is also a red cross for every IPN, but payment status is complete🤔

    • @zeroday6379
      @zeroday6379 Рік тому

      how did you fix that pal?

    • @jen24499
      @jen24499 Рік тому

      @@zeroday6379 add CSRF_TRUSTED_ORIGINS=['*'] in settigs

    • @tomhunja8731
      @tomhunja8731 7 місяців тому

      I believe the flag should be False since the transaction is not Flagged for further review...

  • @kiptoo01
    @kiptoo01 2 роки тому

    Good staff, I have a simple quiz though! How can I integrate the amount to an amount set by clients..say prices increase with quantity demanded? Thanks Zack

    • @zackplauche
      @zackplauche  2 роки тому

      Hey Tony! For this, it would depend on what you're selling specifically 🙂 If you're setting up a Product, you can just add a price and pass that into Paypal's checkout parameters dynamically and making sure you have the ability to edit the price in the User Admin. If it's something more like a service, it's roughly the same thing. In the usecase I had to learn Paypal for, I ended up using the django-dynamic-preferences package: django-dynamic-preferences.readthedocs.io/en/latest/ that lets you create customized settings.

  • @lordflaqo1
    @lordflaqo1 4 місяці тому

    can you update this video plz. i ran onto an issue

    • @zackplauche
      @zackplauche  4 місяці тому

      Paypal was super hard to setup. Unlikely to use their API again. Much easier to use stripe.

  • @miguelsoares3680
    @miguelsoares3680 2 роки тому +1

    so it doesn't redirect its always processing

    • @zackplauche
      @zackplauche  11 місяців тому

      Yeah, it's been a while since I worked with Paypal so it might not be the best tutorial anymore :/

  • @MannuelPortraitsdev
    @MannuelPortraitsdev Рік тому +1

    +1 sub

  • @Eptapus
    @Eptapus Рік тому +1

    I am using Ngork but the IPNs do not work.. If someone finds a solution please reply to my comment. @Zack Plauché please do NOT take this video down.

    • @Eptapus
      @Eptapus Рік тому

      In my case the IPN was NOT getting created because I was using basic auth to access my django app through Ngrok. I removed the basic auth and the IPN was create just fine! So this video is still relevant!

    • @zackplauche
      @zackplauche  11 місяців тому

      Hey Eptapus! So I actually haven't used Paypal in a long time now :/ it's been a huge pain to work with (and I actually got banned from them accidentally lol)