Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How can we enable Easypaisa API integration on a Shopify platform?

How can we enable Easypaisa API integration on a Shopify platform?

Awaisazhar
Visitor
1 0 0

Hi Team,

 

As part of our mini apps program at easypaisa (Telenor Microfinance Bank), we have extended our Open APIs and JS methods (Javascripts) for our partners to integrate and become part of our easypaisa platform. 

We are facing issue with some of our partners that have hosted their websites on shopify. We need your support to guide us how we can enable our APIs integration on shopify platform. 

 

I am pasting below 1 of our APIs and JS method for your review.

 

POST /v1/users/inquireUserInfo

The inquireUserInfo API is used for the merchant to get the user related information after obtaining user authorization.

Sample

Query user information via an authCode. The authCode is generated via OAuth after authorization is successful.

 

  1. Merchant calls this interface with authCode (Step 1)
  2. easypaisa server returns user information the to merchant based on the authCode (Step 2).

Request sample

 

 

{
      "authCode": "281010033AB2F588D14B43238637264FCA5AAF35xxxx",
}

 

Copy

Response sample

 

 

{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"success"
  },
  "userInfo": {
    "openId": "1000001119398804xxxx",
    "unionId": "123440001119398804xxxx",
    "userMsisdn": "931116874199xxx",
    "userName": "jack",
    "avatar": "http://example.com/avatar.htm?avatarId=FBF16F91-28FB-47EC-B9BE-27B285C23CD3xxxx",
    "userAddress": "XX city X street",
    "userCnic": "145125123452142234",
    "extendInfo": "{}"
  }
}

 

 

mp.getAuthCode

Call the API to obtain the user consent. The wallet app will prompt a consent pop-up to ask user to grant rights to user scopes such as nickname, gender. birthdays and etc. The consent of user is represented by an authorization code (authCode) returned by the API. The authorization code can be later used to inquire user information.

 

Sample Code

To invoke mp.getUserAuthCode method in HTML

var scopes=[USER_MSISDN,"USER_MSISDN"]
<a onClick="mp.getUserAuthCode(scopes)">Click</a>
Copy

To receive the callback in javascript

function getUserAuthCodeResult(jsonResult){
var result=JSON.parse(jsonResult);
alert('status:'+result.status);
alert('authCode:'+result.authCode);
alert('granted scopes:'+result.grantedScopes);
}
Reply 1 (1)

SparkupDigital
Shopify Partner
2 0 0

Hello @Shopify,

 

We want to integrate the same Easypaisa Mini App with our Shopify store so please respond to that. We are clueless in this. Thanks