Comments (9)
Was your server side createPurchaseURL method invoked when buy is clicked? I see same method, -snip- is being called for token generation and purchasing. If the server side method is invoked when buy is clicked, did you try console logging the response in onPaymentStatus($event)?
from ngx-braintree.
They are different endpoints.
Here is the server side createPurchase endpoint I was testing with. The client never called this though.
app.post('/credits/braintree/createpurchase/150', this.validate.user, (req, res) => {
let nonceFromClient = req.body.payment_method_nonce;
let credits = 150;
this.createBraintreeSale("1.00", nonceFromClient, (err, result) => {
if (result) {
res.json({})
} else {
res.status(500).json({});
}
})
})
onPaymentStatus() never gets called. This is what I have in my shop.component.ts
onPaymentStatus(response) {
console.log(response);
}
from ngx-braintree.
Could angular be blocking dropin.min.js from being downloaded? Do I have to configure something to allow that?
from ngx-braintree.
I don’t think angular is blocking because if that’s the case the drop in UI should not be rendered at all but you have it rendered. I’ll look into this and will try to reproduce in what cases the createpurchaseURL is not called AND doesn’t give any error. Please provide more information, if any. Like your component.ts code if possible.
from ngx-braintree.
Hi Luke,
As you said that the buy button was displayed, did you get the dropin UI rendered as well? The buy button gets displayed as soon as the clientToken is received from your server and the dropin ui gets rendered within moments after the buy button gets displayed, although sometimes this will take few seconds (depending upon how quickly braintree server responds). If you have the buy button displayed but dropin ui is not rendered, then one of the reason could be a network issue.
Or is it that you have the dropin UI rendered but nothing happens when you enter the card details and click buy?
Can you pls confirm which one of the above is the behavior?
from ngx-braintree.
The drop in UI is never displayed. Only the buy button.
from ngx-braintree.
OK. It appears that there is a network/incorrect braintree configuration issue although not sure at this moment if this is an ngx-braintree error or an error in your network. However, a new version of ngx-braintree is published just now (2.2.1) which now throws any error encountered while creating the dropin UI which helps in identifying the root cause. Please update ngx-braintree to the latest version which will now throw the error in console. As I'm unable to reproduce this issue at my end, it will be helpful if you let me know your findings after you have updated the version and tested it.
from ngx-braintree.
Turned out to be a bug with Angular not parsing a text response from Node.js correctly. Submitted a fix over at #29
from ngx-braintree.
@lukechatton thanks for the fix. Also updated the readme and npm package reflecting this change.
from ngx-braintree.
Related Issues (20)
- Angular 7 support HOT 4
- How to remove the place holder (......) present in cardName braintree dropin ui.
- VaultManager support - to delete a saved payment method HOT 3
- I am getting CORs error HOT 1
- Customer does not have any credit cards
- Also, how do you get the nonce and chargeAmount when you implement your own method? Your example shows an HTTP get, when the code shows a post to the url. HOT 1
- How to correctly handle (paymentStatus)="onPaymentStatus($event)" for Ionic 3 HOT 1
- [allowChoose] = "true" not working
- How to edit/delete saved card. HOT 2
- PayPay Checkout Issue HOT 1
- Support for Angular 8 applications HOT 9
- I have used checkbox below the ngx-braintree , its accept terms and conditions check box, i have to know all card details are Filled or not,
- SCA Requirements of 3D Secure 2.0
- "No payment method is available" HOT 3
- Add support for local payment methods
- Sending additional information with checkout HOT 1
- angular 9 support
- Http Client Injection Not Working
- How to implement payPal Credit option
- how to install for angular version 15 onwards because it only appears for angular version 8 and below?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-braintree.