npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ebs-cordova-plugin

v1.1.0

Published

A Cordova plugin for the EBS Express Checkout android SDK

Downloads

10

Readme

PhoneGap app integration

EBS has a native android client which can be used by PhoneGap applications.

Installation

This requires phonegap/cordova CLI 5.0+ (current stable v1.5.3).

phonegap plugin add ebs-cordova-plugin

or

cordova plugin add ebs-cordova-plugin

Define Parameters

The following parameters are define to your js file.

Algorithm

Algorithm should be following format.

MD5 or SHA512 or SHA1

Mode

Mode should be following format.

Test or Live

Parameters

var merchantId="<your_merchant_id>";
var secretKey="<your_secret_key>";
var algorithm="<your_algorithm>";
var mode="<your_mode_of_transaction>";
var txnAmt="1.00";
var refernceNo="<your_reference_no>";
var failureId="1";
var currency="INR";
var txnDescrip="Test Transaction";
var billingEmail="[email protected]";
var billingName="Test_Name";
var billingAddress="North Mada Street";
var billingCity="Chennai";
var billingPostalCode="600019";
var billingState="Tamilnadu";
var billingCountry="IND";
var billingPhone="01234567890";

var shippingEmail="[email protected]";
var shippingName="Test_Name";
var shippingAddress="North Mada Street";
var shippingCity="Chennai";
var shippingPostalCode="600019";
var shippingState="Tamilnadu";
var shippingCountry="IND";
var shippingPhone="01234567890";

var hidePaymentOpt="false";
var hideCreditCard="false";
var hideCashCard="false";
var hideDebitCard="false";
var hideNetBanking="false";
var hideStoredCard="false";
var customParam = {'account_details': 'saving','merchant_type': 'gold',};

##Define Success and Failure Response Callback:

When the user has completed the payment (could be success or failure), the user will get response.

var onPaymentSuccess = function (response) {
    
           var json = JSON.parse(response);
	 
		   var PaymentId = json["PaymentId"];
           var AccountId = json["AccountId"];
           var MerchantRefNo = json["MerchantRefNo"];
           var Amount = json["Amount"];
           var DateCreated = json["DateCreated"];
           var Description = json["Description"];
           var Mode = json["Mode"];
           var IsFlagged = json["IsFlagged"];
           var BillingName = json["BillingName"];
           var BillingAddress = json["BillingAddress"];
           var BillingCity = json["BillingCity"];
           var BillingState = json["BillingState"];
           var BillingPostalCode = json["BillingPostalCode"];
           var BillingCountry = json["BillingCountry"];
           var BillingPhone = json["BillingPhone"];
           var BillingEmail = json["BillingEmail"];
           var DeliveryName = json["DeliveryName"];
           var DeliveryAddress = json["DeliveryAddress"];
           var DeliveryCity = json["DeliveryCity"];
           var DeliveryState = json["DeliveryState"];
           var DeliveryPostalCode = json["DeliveryPostalCode"];
           var DeliveryCountry = json["DeliveryCountry"];
           var DeliveryPhone = json["DeliveryPhone"];
           var PaymentStatus = json["PaymentStatus"];
           var PaymentMode = json["PaymentMode"];
           var SecureHash = json["SecureHash"];
	 
    if( PaymentStatus == "Authorized") {
        gotoThankYouPage()
    }
    else {
        gotoFailurePage()
    }
};

Define back button callback

If the user presses back button, then the transaction is aborted midway by the user. Our plugin will let you know when this happens through a callback. You may define the function as:

var onTransactionAborted = function (aborted) {
    gotoFailurePage()
};

Once all these variables are declared correctly, you are ready to put it together and setup the payment flow:

ExpressCheckout.startCheckoutActivity({
    "onPaymentSuccess": onPaymentSuccess,
    "onTransactionAborted": onTransactionAborted,
    "parameters": {
        "merchantId":merchantId,
        "secretKey":secretKey,
        "algorithm":algorithm,
        "mode":mode,
        "txnAmt":txnAmt,
        "refernceNo":refernceNo,
        "failureId":failureId,
        "currency":currency,
        "txnDescrip":txnDescrip,
        "billingEmail":billingEmail,
        "billingName":billingName,
        "billingAddress":billingAddress,
        "billingCity":billingCity,
        "billingPostalCode":billingPostalCode,
        "billingState":billingState,
        "billingCountry":billingCountry,
        "billingPhone":billingPhone,
        "shippingEmail":shippingEmail,
        "shippingName":shippingName,
        "shippingAddress":shippingAddress,
        "shippingCity":shippingCity,
        "shippingPostalCode":shippingPostalCode,
        "shippingState":shippingState,
        "shippingCountry":shippingCountry,
        "shippingPhone":shippingPhone,
        "hidePaymentOpt":hidePaymentOpt,
        "hideCreditCard":hideCreditCard,
        "hideCashCard":hideCashCard,
        "hideDebitCard":hideDebitCard,
        "hideNetBanking":hideNetBanking,
        "hideStoredCard":hideStoredCard,
        "customParam":customParam,
    }
});

Help & Support

If you notice any errors or issues with the integration, please reach out to us at [email protected]. You may also search our Knowledge base to see if the issue has already been addressed by our team.