@wasabigeek wrote:
What's the best way to make use of queryParams in a Controller's init() function? When I try something like this:
export default Ember.Controller.extend({ queryParams: ['paymentId', 'PayerID'], paymentId: null, PayerID: null, init: function() { var paymentId = this.get('paymentId'); var payerId = this.get('PayerID'); } });
When query parameters are specified in the URL, paymentId and payerId still return null in init(), I assume because it's run before the queryParams are checked.
Why do I want to do this? To execute a PayPal payment after being redirected:
https://developer.paypal.com/docs/integration/web/accept-paypal-payment/#execute-the-payment
Posts: 2
Participants: 2