Paypal is an international payment gateway provider where you can send and receive your money with multiple currencies. commission rates will be different based on their countries

Prerequisites

Paypal Integration requires an account with PayPal. you can create new PayPal account for free

Initialising PayPal

document.addEventListener("deviceready", onDeviceReady);
function onDeviceReady() {
 var clientIDs = {
 "PayPalEnvironmentProduction": "YOUR_PRODUCTION_KEY", // not needed while testing
 "PayPalEnvironmentSandbox": "YOUR_SANDBOX_KEY"
 };

function onPayPalMobileInit() {
  PayPalMobile.prepareToRender(
   "PayPalEnvironmentSandbox", // or "PayPalEnvironmentProduction" 
   new PayPalConfiguration({
     merchantName: "Shop Name",
     acceptCreditCards: true,
     merchantPrivacyPolicyURL: "https://shopname.com/policy",
     merchantUserAgreementURL: "https://shopname.com/agreement"
   }),
 function() {
   console.log("OK, ready to accept payments!")
 });
}
 PayPalMobile.init(clientIDs, onPayPalMobileInit);
}

Receiving Payment

function payNow() {
  var paymentDetails = new PayPalPaymentDetails("15.00","3.00","2.00");
  //new PayPalPayment Details("subtotal","shipping","tax");
  //PayPalPalment("total","currency in ISO 4217 format","Description","Sale",object);
  var payment = new PayPalPayment("20.00","USD","PhoneGapPro T-Shirt","Sale",paymentDetails);

  PayPalMobile.renderSinglePaymentUI(payment,
   function(payment) {
     alert("payment success: " + JSON.stringify(payment));
   },
   function(error) {
     alert(error);
   });
}

PayPalMobile.renderSinglePaymentUI() will invoke payment UI for receiving money.

Sundaravel M

About the author: Hey! It's me sundar. (Yea, I'm the founder of codesundar.com). I'm a passionate computer programmer who loves modern web and mobile development. feel free to reach me : Facebook - Twitter - Google+