Monday, May 31, 2021

Re: PayPal Integration

Thank you Sharif, I have integrated successfully with paypal after going through the paypal developer docs, and tested it with sandbox.paypal and it is working great.

However I would like your help, to now be able to submit  the form automatically after making the payment with paypal. I have tried adding type="submit"  to the paypal button but that doesn't work.  How can I do that?

Kind Regards


Eric Bawakuno | Computer Engineer | +27795639700| +27 815152254 | ericbaw@gmail.com  | Address: 29 Rochester Road, Observatory | Cape Town, South Africa | 7925
f


On Wed, May 19, 2021 at 7:26 PM Eric 247ERICPOINTCOM <ericbaw@gmail.com> wrote:
Thank you Sharif. Let me do that, I will come back to the conversation after

Kind Regards


Eric Bawakuno | Computer Engineer | +27795639700| +27 815152254 | ericbaw@gmail.com  | Address: 29 Rochester Road, Observatory | Cape Town, South Africa | 7925
f


On Wed, May 19, 2021 at 4:23 PM Sharif Mehedi <sharifmehedi24@gmail.com> wrote:
First you need to have OAuth 2 on your server. look for PYPI packages that has OAuth for paypal.
On Wednesday, May 19, 2021, 5:30:43 PM GMT+6, Eric 247ERICPOINTCOM <ericbaw@gmail.com> wrote:


Hi

I would like to integrate PayPal with my project in Django I have gone through a couple of tutorials but I still dont understand how to do it. I am new to Django but I have got a project am working on which charges per post on the website.

When a post is created it will be charged I want to add PayPal to the post button, so that when one pays the post is created automatically there after.

How can I do this.

Here is my template for create_post:

{% extends "feed/layout.html" %} {% load static %} {% load crispy_forms_tags %}
{% block searchform %}
<form
class="form-inline my-2 my-lg-0 ml-5"
action="{% url 'search_posts' %}"
method="get"
>
<input name="p" type="text" placeholder="Search posts.." />
<button class="btn btn-success my-2 my-sm-0 ml-4" type="submit">
Search
</button>
</form>
{% endblock searchform %} {% block content %}
<br /><br />
<div class="container">
<div class="row">
<div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
<div class="card card-signin my-5">
<div class="card-body">
<h5 class="card-title text-center"><b>Post</b></h5>
<form class="form-signin" method="POST" enctype="multipart/form-data">
{% csrf_token %}
<fieldset class="form-group">
<br />
{{ form|crispy }}
</fieldset>
<div class="form-group">
<button
class="btn btn-lg btn-primary btn-block text-uppercase"
type="submit"
>
Post</button
><br />
</div>
</form>
</div>
</div>
</div>
</div>
</div>

{% endblock content %} {% block jsfiles %}{% endblock jsfiles %}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/46c1c5ea-d198-440f-8538-6d4955b237a8n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13750508.255604.1621434160035%40mail.yahoo.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFgqToXO%2BoG5aKxOfD05XxixDyrPC9guQ%2B7gPHrakDSRPuzLaA%40mail.gmail.com.

No comments:

Post a Comment