Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript link website to payment gateway

I have a website to link it with payment gateway I would Like to know how to code using php code to create my own pay button without using javascript SDK code provided by paypal.
Code:
<div class="container p-0">
        <div class="card px-4">
            <p class="h8 py-3">Payment Details</p>
            <div class="row gx-3">
                <div class="col-12">
                    <div class="d-flex flex-column">
                        <p class="text mb-1">Person Name</p>
                        <input class="form-control mb-3" type="text" placeholder="Name" value="Barry Allen">
                    </div>
                </div>
                <div class="col-12">
                    <div class="d-flex flex-column">
                        <p class="text mb-1">Card Number</p>
                        <input class="form-control mb-3" type="text" placeholder="1234 5678 435678">
                    </div>
                </div>
                <div class="col-6">
                    <div class="d-flex flex-column">
                        <p class="text mb-1">Expiry</p>
                        <input class="form-control mb-3" type="text" placeholder="MM/YYYY">
                    </div>
                </div>
                <div class="col-6">
                    <div class="d-flex flex-column">
                        <p class="text mb-1">CVV/CVC</p>
                        <input class="form-control mb-3 pt-2 " type="password" placeholder="***">
                    </div>
                </div>
                <div class="col-12">
                    <div class="btn btn-primary mb-3">
                        <span class="ps-3">Pay $243</span>
                        <span class="fas fa-arrow-right"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
 
Last edited:
PHP exists on the server and executes there. HTML and the CSS that wasn't posted, exist on the user's computer. The only way they communicate is via JS.
PHP may produce the HTML for the entire website including a pay button, but the only way PHP can send the information obtain from the code you provided is by using JS.
The moral of this story is, we may hate the javascript SDK code provided by paypal, but it's the easiest way to do things.
 
paypal used to and likely still does provide a GET API, where you can get them to click a paypal link with your referral code and it will process your payment then redirect them back to your page, no coding necessary other than HTML <a> tag link. if you want to design your own payment page and not redirect to paypal website, you can use API/sdk for javascript or PHP, probably python these days as well
 
paypal used to and likely still does provide a GET API, where you can get them to click a paypal link with your referral code and it will process your payment then redirect them back to your page, no coding necessary other than HTML <a> tag link. if you want to design your own payment page and not redirect to paypal website, you can use API/sdk for javascript or PHP, probably python these days as well
if I use API/SDK is its Possible to transfer payment from website to bank account ? no need to transfer it to paypal then from paypal to bank account.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom