-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add paypal method #10
Comments
You can replace Proceed to checkout button with Paypal Button Sharing the code from Paypal Demo below:
|
Hi
Where in your project folder file can I find the proceed button page. And I just only need to copy this code into that page. Also what file do I edit to add different items into the page to change the veg. I have looked in all pages cannot seem to find the proceed button.
Thanks for helping I am so new to this coding. Need to add shopping cart to my project.
I downloaded your file react shopping to webstorm software
Kaz
On 28 Mar 2018, at 05:35, Sivadass Navaneethan <notifications@github.com<mailto:notifications@github.com>> wrote:
You can replace Proceed to checkout with Paypal Button<https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/>
Sharing the code from Paypal Demo below:
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<body>
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'sandbox', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
production: '<insert production client id>'
},
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
}
});
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
</body>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmHwlkMOt8J_mZFLbVOVkpvPDs_D5ks5tixMvgaJpZM4S97EQ>.
|
Hi
Sorry to ask you could you please send the shopping code with the PayPal in the script. i am so new to this I have no clue where to add this code.
Thank you
Kauser
I found the proceed to checkout in a script json. I figured out how to edit the products now.
On 28 Mar 2018, at 05:35, Sivadass Navaneethan <notifications@github.com<mailto:notifications@github.com>> wrote:
You can replace Proceed to checkout with Paypal Button<https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/>
Sharing the code from Paypal Demo below:
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<body>
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'sandbox', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
production: '<insert production client id>'
},
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
}
});
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
</body>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmHwlkMOt8J_mZFLbVOVkpvPDs_D5ks5tixMvgaJpZM4S97EQ>.
|
Sorry I was busy yesterday. I have created a new brach here for paypal-checkout. Just switch to paypal-checkout checkout branch by |
Hi I got the PayPal checkout button showing now. When I click the button it opens page called https://www.sandbox.paypal.com/checkoutnow?locale.x=en_GB&fundingSource=paypal&sessionID=d6dc40fea0_gaytumrqhi2ti&buttonSessionID=937009e4ee_gaytumrvhiydo&env=sandbox&logLevel=warn&uid=4ca7e77304&version=4&token=PAY-91C437926T271413ELK6ZD6Q&xcomponent=1#/checkout/login.
How can I assign the account to link to my email zkauser@hotmail.com<mailto:zkauser@hotmail.com> to get it working
Thank you for helping
On 29 Mar 2018, at 18:25, Sivadass Navaneethan <notifications@github.com<mailto:notifications@github.com>> wrote:
Sorry I was busy yesterday.
I have created a new brach here<https://github.com/sivadass/react-shopping-cart/tree/paypal-checkout> for paypal-checkout.
Just switch to paypal-checkout checkout branch by git checkout paypal-checkout in terminal.
And then update the branch by git pull origin paypal-checkout. You will have the paypal checkout button like the one below.
[screen shot 2018-03-29 at 10 53 23 pm]<https://user-images.githubusercontent.com/10391786/38103500-16e4895a-33a4-11e8-9db8-418ac490405a.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmEMDgeifLhuU_mAVFohXmwwD4dHfks5tjRkWgaJpZM4S97EQ>.
|
Head over to Paypal and create an App and it will give you the client ID for Sandbox and Production modes. Just enter the id's in
That's it! |
I put my credit id into sandbox
And theres no production should I leave it blank
On 30 Mar 2018, at 03:15, Sivadass Navaneethan <notifications@github.com<mailto:notifications@github.com>> wrote:
Head over to Paypal and create an App and it will give you the client ID for Sandbox and Production modes. Just enter the id's in Headers.js and change the env mode to 'Production' in like below:
<PaypalExpressBtn
className={this.state.cart.length > 0 ? "" : "disabled"}
client={client}
currency={"INR"}
total={this.props.total}
env="production"
/>
That's it!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmER6sJsdYNd0WvSSQGO0JWIO9g3Zks5tjZU9gaJpZM4S97EQ>.
|
Which file do I edit. Can’t find the one no env file
change the env mode to 'Production' in like below:
<PaypalExpressBtn
className={this.state.cart.length > 0 ? "" : "disabled"}
client={client}
currency={"INR"}
total={this.props.total}
env="production"
/>
|
In the Header.js file, search for
If you don't pass the That's why there is no |
Ok I edited the header .now when I try to checkout it gives error Some of your information isn't correct. Please try again. I am trying with my email account check if I can make an order. I am not sure what to do
[cid:CDC4B2C2-2EDE-4924-82BB-C83BACD34D3C@default]
|
Have you tried first in sandbox mode, with facilitator account provided by Paypal? |
Am I suppose to add url
I have firebase account url can I use this
https://auto-mechanics.firebaseio.com
On 30 Mar 2018, at 03:52, Sivadass Navaneethan <notifications@github.com> wrote:
Have you tried first in sandbox mode, with facilitator account provided by Paypal?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmIw7DsOJpDeyYMVteaK48qRi-21Nks5tjZ4IgaJpZM4S97EQ>.
|
Sorry am unable to get you. |
Can you please check this code of my project. pgbooks and pgcontact are pages with forms. When I submit the forms it goes to the start page where you can choose to signup or login. I want these forms to stay on the same page not divert to another page.
Can you please help. Tried everything can not stop the forms diverting to another page once submitted.
My Code using webstorm software for coding
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="user-scalable=no,initial-scale=1, maximum-scale=1,minimum-scale=1, width=device-width" />
<title>Auto Mechanic Application</title>
<link rel="stylesheet" href="css/jquery.mobile-1.3.2.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css" />
<link rel="stylesheet" href="css/style.css">
<script src="css/index.css"></script>
<script src="js/script.js"></script>
<script src="js/main.js"></script>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/1.0.0/firebaseui.css" />
<script src="js/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jquery.ultimate-burger-menu.js"></script>
<script src="js/jquery.mobile-1.3.2.min.js"></script>
<script src="js/main.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>Blank App</title>
</head>
<nav id="nav">
<ul>
<li><a href="#pgBook">Home</a></li>
<li><a href="#pgBooks">Book</a></li>
<li><a href="#pgContact">Contact</a></li>
</ul>
</nav>
<body>
<script type="text/javascript" src="cordova.js"></script>
</body>
<script>
$(document).ready(function(){
$('#nav').burgerMenu({
buttonBg: 'grey',
lineColor: 'white',
menuBackground: 'grey',
linkBackground: 'grey',
linkColor: 'white',
linkBorderBottom: 'none'
});
});
</script>
<div data-role="page" id="start">
<img src="http://i67.tinypic.com/ogw2rl.png" style="width:100%;">
<div class="container">
<center><h4 class="mc-text-center">Welcome</h4></center>
<br>
<br>
<p class="mc-top-margin-1-5"><b>Existing Users</b></p>
<a href="#pglogin" class="ui-btn ui-btn-b ui-corner-all">Sign In</a>
<p class="mc-top-margin-1-5"><b>Don't have an account?</b></p>
<a href="#pgsignup" class="ui-btn ui-btn-b ui-corner-all">Sign Up</a>
<p></p>
<footer id="pgMenuFtr8" data-role="footer" data-position="fixed"
data-tap-toggle="false">
<h5>Auto Mechanic 2018</h5>
</footer>
</div>
</div><!-- /content -->
<!----------------------------START Home PAGE ----------------------------------->
<div data-role="page" id="pgBook">
<div data-role="header">
<img src="http://i67.tinypic.com/ogw2rl.png" style="width:100%;">
<center>Auto Mechanic CAR SERVICES – CARS SERVICING IN LUTON</center>
<p></p>
<div class="w3-container w3-red">
<p>Thank you for choosing Auto Mehanic Car Services, Car Servicing Luton as your preferred car services provider</p>
<p>We know that when you need a reliable garage, you need someone who can get the job done quickly and efficiently.</p>
<p> When you hire our team, we will work with you to make sure that you get whatever you need quickly and efficiently and we will also make sure that our team are there to help and support you every step of the way as well.</p>
<p>So what can we do for you? We can help you to make sure that if you need a repair, you get it done as soon as possible. After all, our team consist of some of the finest mechanics in the industry and they have all of the latest training. They also have years of experience in the industry and they want nothing more than to give you the very best service when you come to our garage.</p>
</div>
<footer id="pgMenuFtr6" data-role="footer" data-position="fixed"
data-tap-toggle="false">
<h5>Auto Mechanic 2018</h5>
</footer>
</div>
</div>
<!----------------------------START Book PAGE ----------------------------------->
<div data-role="page" id="pgBooks" data-theme="b">
<img src="http://i67.tinypic.com/ogw2rl.png" style="width:100%;">
<div class="alert">Your message has been sent</div>
<form id="contactForms">
<br>
<h6>No credit card needed! You only pay Auto Mechanic Car Services once the work is done</h6>
<div class="w3-container w3-white">
<p>When would you like to make your booking?</p>
<p>Please supply your contact details</p>
<p>To enable the garage to contact you, or provide delivery/collection services etc.</p>
<p class="w3-container w3-light-grey">
<p>
<label>Select Appointment Booking Options</label>
<select name="option" id="option">
<option selected="selected">M.O.T</option>
<option>Repairs</option>
</select>
</p>
<p>
<label for="date">Select a Date: </label>
<input name="date" type="date" id="date" />
</p>
<p>
<label>Select a Time</label>
<select name="time" id="time">
<option selected="selected">8.30</option>
<option>9:00</option>
<option>9:30</option>
<option>10:00</option>
<option>10:30</option>
<option>11:00</option>
<option>11:30</option>
<option>12:00</option>
<option>12:30</option>
<option>1:00</option>
<option>1:30</option>
<option>2:00</option>
<option>2:30</option>
<option>3:00</option>
<option>3:30</option>
<option>4:00</option>
<option>4:30</option>
<option>5:00</option>
<option>5:30</option>
<option>5:00</option>
<option>6:00</option>
<option>6:30</option>
<option>7:00</option>
</select>
</p>
<p>
<label>Name</label>
<input type="text" name="names" id="names" required>
</p>
<p>
<label>Address</label>
<input type="text" name="address" id="address">
</p>
<p>
<label>Town</label>
<input type="text" name="town" id="town">
</p>
<p>
<label>Postcode</label>
<input type="text" name="postcode" id="postcode">
</p>
<p>
<label>Email Address</label>
<input type="text" name="emails" id="emails" required>
</p>
<p>
<label>Phone Number</label>
<input type="text" name="phones" id="phones">
</p>
<p>
<label>Car Registration Number</label>
<input type="text" name="reg" id="reg">
</p>
<p>
<p>Do you need any of the following?</p>
<label>Drop off</label>
<p>We'll take you home after you bring your car in to minimise disrupton - £12.00</p>
<select name="drop" id="drop">
<option selected="selected">No</option>
<option>Yes</option>
</select>
</p>
<p>
<label>Collection & return</label>
<p>Too busy to make it in? We'll collect it and return it when the work is done - £12.00</p>
<select name="collection" id="collection">
<option selected="selected">No</option>
<option>Yes</option>
</select>
</p>
<p>
<label>Loan Car</label>
<p>Can't be without a car? Don't worry, we'll lend you one while yours is repaired - £30.00</p>
<select name="loan" id="loan">
<option selected="selected">No</option>
<option>Yes</option>
</select>
</p>
<button id="myButtons" class="float-left submit-button" >Home</button>
<script type="text/javascript">
document.getElementById("myButtons").onclick = function () {
location.href = "#pgBooks";
};
</script>
</form>
</div>
</div>
</div>
</div>
</div>
<!------------------------------START Contact PAGE ------------------------->
<div id="pgContact" data-role="page" data-theme="b">
<h4 class="brand"><span>Auto Mechanic</span></h4>
<div class="wrapper">
<div class="company-info">
<h6>Contact Form</h6>
<ul>
<li><i class="fa fa-road"></i> 44 Something st</li>
<li><i class="fa fa-phone"></i> (555) 555-5555</li>
<li><i class="fa fa-envelope"></i> automechanic@gmail.com<mailto:automechanic@gmail.com></li>
</ul>
</div>
<div class="contact">
<div class="alert">Your message has been sent</div>
<form id="contact">
<br>
<p>
<label>Name</label>
<input type="text" name="name" id="name" required>
</p>
<p>
<label>Email Address</label>
<input type="email" name="email" id="email" required>
</p>
<p>
<label>Phone Number</label>
<input type="text" name="phone" id="phone">
</p>
<p>
<label>Subject</label>
<input type="text" name="subject" id="subject">
</p>
<p class="full">
<label>Message</label>
<textarea name="message" rows="5" id="message"></textarea>
</p>
<button id="myButton" class="float-left submit-button" >Home</button>
<script type="text/javascript">
document.getElementById("myButton").onclick = function () {
location.href = "#pgContact";
};
</script>
</form>
</div>
</div>
</div>
</div>il
<!--------------------- END ADD NEW NOTE PAGE ---------------------------------->
<!----------------------------START LOGIN PAGE ----------------------------------->
<div data-role="page" id="pglogin">
<div data-role="header">
<img src="http://i67.tinypic.com/ogw2rl.png" style="width:100%;">
<center><h4 class="mc-text-center">Login</h4></center>
<br>
<br>
<div class="container">
<label for="email">Email:</label>
<input class="required" type="text" name="username" id="username"
placeholder="username@server.com<mailto:username@server.com>">
<label for="password">Password:</label>
<input class="required" type="password" name="Password"
id="Password" placeholder="password">
<input type="button"
value="Login" id="submitButton" onClick="signIn()>signIn()">
</div>
<br>
<br>
<br>
<br>
<footer id="pgMenuFtr" data-role="footer" data-position="fixed"
data-tap-toggle="false">
<h5>Auto Mechanic 2018</h5>
</footer>
</div>
</div>
<!-------------------------------START REGISTER PAGE ------------------------->
<div id="pgsignup" data-role="page" data-theme="b" class="backpicture">
<div data-role="main" style="text-align:center;">
<img src="http://i67.tinypic.com/ogw2rl.png" style="width:100%;">
<center><h4 class="mc-text-center">Registration</h4></center>
<div class="container">
<br>
<br>
<label for="email">Email:</label>
<input type="text" type="text" name="username" id="usernameSignup"
placeholder="username@server.com<mailto:username@server.com>">
<label for="password">Password:</label>
<input type="password" name="PasswordSignup"
id="PasswordSignup" placeholder="password">
<!-- <button onclick=doLogin()>Login</button> -->
<button onclick=signUp()>signUp</button>
<span class="psw">Login <a href="#pglogin">Access Login</a></span>
<footer id="pgMenuFtr5" data-role="footer" data-position="fixed"
data-tap-toggle="false">
<h5>Auto Mechanic 2018</h5>
</footer>
</div>
</div>
</div>
<!-- ------------------------------ START PAGE ------------------------------------->
<!-- Bootstrappindapp to use firebase sdk-->
<script src="https://www.gstatic.com/firebasejs/4.12.0/firebase.js"></script>
<script src="js/main.js"></script>
<!-- fire base ui for login and signup -->
<script src="https://cdn.firebase.com/libs/firebaseui/1.0.0/firebaseui.js"></script>
<script src="js/firebaseui.js"></script>
</body>
</html>
|
Can you share me the code via jsFIddle, Code Pen or Sandbox.io, so that i can view the issue lively? |
Can you please check this code when I make a mistake in the input box trying to login, the login page doesn’t refresh. Can you please help fix this
https://jsfiddle.net/daisys77/1y3mee8a/1/
|
Hi @daisys77 what to do after refresh button is clicked? |
Hi the button works now my problem is now I can’t open the pages only contact page opens.
I removed my firebase account.
https://codepen.io/taz23212/pen/jzpGep
I manage to get the pages to work suddenly adding more pages stop working not opening any more
Can you please check I got everything to work, and now all pages stopped opening. I think it might redo with the footer div. I remove one and the login and signup worked and then the other links stopped working. Now I added more pages only contact page works now and rest don’t open. Can you please help. Thank you
Please help I spent weeks trying to get this far now it stops working
|
Codepen is incomplete @daisys77 , please update it, so that i can check... |
And am closing this issue, as it goes beyond the feature request. Am happy to help you via email, which is available in my profile. Send me the updated codepen link to my personal email. Don't mistake me, thanks! |
Hi I managed to fix it last night. Thank you for trying to help. Do you know how to send email notification from Firebase when you fill in contact form. HTML. And Do you know how to create shopping app instead of pay straight away. Reserve the item at the store to pick up adding payment is complicated
I wasn’t able to use your shopping couldn’t get PayPal to work it was to complicated. I really need simple easy to way to implement. Newbie at coding.
…Sent from my iPhone
On 5 Apr 2018, at 17:36, Sivadass Navaneethan <notifications@github.com<mailto:notifications@github.com>> wrote:
And am closing this issue, as it goes beyond the feature request. Am happy to help you via email, which is available in my profile. Send me the updated codepen link to my personal email.
Don't mistake me, thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV1fmKQ5TlrYe-2zBIx9CnGkL3gEkLb2ks5tlkf7gaJpZM4S97EQ>.
|
You can use sendgrid to send emails, but i haven't tried it. Am really not aware of it. Keep doing and break things, reach me if you feel i can help you. Am happy to help anytime! Thanks trying my this project :) Good luck :) |
Hi
I uploaded a code for login and signup
Can you please I need success alert message for once logged in. I have no clue to add this message
Signup - I need button to signout
Can you please help
https://codepen.io/taz23212/pen/PRXZJe
Thank you I have no clue to sort this
|
Can you help me I developed 2 phonegap apps . The paypal links work in the store on the android version app and the iPhone iOS version my store PayPal Links don’t work. Can you tell me how to fix this issue thank you.
|
Sorry daisys77, am not having any experience with Android and iOS
development. I am unable to help you.
…On Wed 18 Apr, 2018, 7:46 AM daisys77, ***@***.***> wrote:
Can you help me I developed 2 phonegap apps . The paypal links work in the
store on the android version app and the iPhone iOS version my store PayPal
Links don’t work. Can you tell me how to fix this issue thank you.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ6Q6pzw-oDNz_8BAKHl3VqKxje4yOBOks5tpqH3gaJpZM4S97EQ>
.
|
Amazing patience here @sivadass. I salute you! |
Thank you @mcometa :) |
hi how do you add working paypal transaction to your code
The text was updated successfully, but these errors were encountered: