Friday, 1 April 2016

Ajax Interview Questions and Answers for Fresher

Ajax Interview Questions and Answers for Fresher

Question: What are the advantages of AJAX?
  1. Quick Response.
  2. Quick Response without loading page.
  3. Save the Bandwidth
  4. Client Server Interaction what user letting know (User will not get disturb)



Question: What are the dis Advantages of AJAX?
  1. Dependency on JavaScript.
  2. An simple js error, Ajax will not called.
  3. Security issues Might comes, if not implemented securely.
  4. Difficult in Debugging for beginner
  5. Sometimes browser compatibility issues comes.



Question: What are top website, who uses Ajax?
  1. Youtube
  2. Google
  3. Bing
  4. Gmail
  5. Twitter
  6. Linkdin



Question: What are security issues in AJAX?
  1. Ajax is visible in browser console
  2. Request, Response, header and cookie are visiable in browser console.
  3. Every time called ajax is purely visiable in Ajax
  4. An Ajax request can be called by hackers OR unauthorized, It can damage the website if there are not properly security checks
  5. Attackers can try the ajax call with different request parameter.



Question: What are the technologies used by AJAX?
  1. Javascript
  2. XMLHttpRequest
  3. XML/JSON/HTML
  4. DOM
  5. You can also use third party libaraies like jQuery, mootools etc



Question: What are common AJAX Framework?
  1. jQuery
  2. MooTools
  3. Prototype
  4. YUI
  5. Dojo Toolkit
  6. Google Web Toolkit (GWT)



Question:What are Ajax applications?
The web applicable which use the more ajax calls are ajax application.


Question: What are different stage of XMLHttpRequest?
  1. 0: request not initialized
  2. 1: server connection established
  3. 2: request received
  4. 3: processing request
  5. 4: request finished and response is ready



Question: In Ajax call, which method is more secure GET/Post?
POST is more secure as compare to Get Method.


Question: Can anyone send ajax request with POST Method ?
Yes, can send using CURL.


Question: What is the difference between JavaScript and AJAX? JavaScript an object-oriented computer programming language used in web browsers.
Ajax is set of web development techniques using JavaScript to send/receive the data from server without loading page.


Question: What is Asynchronous in Ajax?
We can set the Asynchronous value as true OR false.
Async=true

Ajax request execute independently, Its response can come earlier than other request which is execute later .
Async=false
Ajax request does not execute independently, Its response can comes when earlier request finished.


Question: How to submit entire form data with Ajax?
//serialize ajax Data
var formData = $('form#formId').serialize();
$.ajax({ 
        url: '/my/site',
         data: formData,
         type: 'post',
         success: function(result) {
                      console.log(result);
          }
});



Question:Give a simple example of JSONP with Ajax?
$.getJSON("http://twitter.com/status/user_timeline/padraicb.json?count=10&callback=?", function(result){
   //Now result have response of ajax call
   console.log(result);
});



Thursday, 31 March 2016

Instant Payment Notification paypal

Instant Payment Notification paypal

Question: What is IPN?
IPN is a message service by paypal that notifies you regarding PayPal transactions.


Question: What is full form of IPN?
Full form of IPN is Instant Payment Notification.


Question: For what type of transactions, paypal send notification?
  1. Instant payments (including Express Checkout payments, direct credit card payments, and calls made to the Adaptive Payments API)
  2. eCheck payments (status pending, completed, and denied)
  3. Pending payments
  4. Authorizations
  5. Recurring payments and subscription payment actions
  6. Chargebacks, disputes, reversals, and refunds associated with different transactions



Question: From where I can send IPN online?
https://developer.paypal.com/developer/ipnSimulator/
(for this, First you MUST set IPN URL in your account)


Question: Give me URL of IPN Simulator?
https://developer.paypal.com/developer/ipnSimulator/
(for this, First you MUST set IPN URL in your account and that must be https URL)


Question: Can I test IPN Simulator in local system?
No, You can't.


Question: Where I can set IPN URL?
Login to Merchant Account => Merchant Services => Instant payment notifications (click on link)
Direct Link for Sandbox: https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
Direct Link for Paypal: https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify


Question: In PayNow Form, Can i set IPN URL? If yes, how?
Yes, you can set.
<input name="notify_url" type="hidden" value="http://example.com/ipn-url.php" />       



Question: What is Full form of PDT?
Full form of PDT is PayPal Payment Data Transfers.


Question: What is PDT? and What is use of PDT?
PDT is for notification similar to IPN.


Question: How PDT is different from IPN?
With PDT you get the notification instantly and can do any additional processing required and show the user a confirmation page.
Whereas IPN you are guaranteed to be notified that the payment was received even computer get crash after payments.


Question: From where i can view the IPN History?
https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history