Skip to content

Instantly share code, notes, and snippets.

View iykedapotential's full-sized avatar
🎯
Focusing

Ikedieze Onyeforo iykedapotential

🎯
Focusing
View GitHub Profile
var PayWithCapture = require('PayWithCapture');
var clientId = "636yertryrury", //your client id is in PwC devcenter
clientSecret = "76474hrhryre7437433yg3y3uy3yugregregr37464t4g45"; //your client secret in in Pwc devcenter account
var client = new PayWithCapture(clientId, clientSecret, "staging");
var Authentication = client.getAuthenticationClient();
new Authentication().authenticate()
.then(function(authResp) {
@iykedapotential
iykedapotential / transaction-query-curl
Last active August 26, 2016 22:56
Transaction Query
curl https://pwcstaging.herokuapp.com/orders/transactions \
-d transaction_id=773649uryy
@iykedapotential
iykedapotential / http-authentication-example
Last active March 24, 2017 15:24
http-authentication-example
POST /oauth/token HTTP/1.1
Host: pwcstaging.herokuapp.com
Content-Type: application/x-www-form-urlencoded
client_id:5795f6962dbfdc110035943c
client_secret:3V1g9mTMsID10dgjOIGr69q0QnHIi8fX80O42fTOsfpOR4gZGC4rRmWrvg8Rp6MdOTwEQLHqDUrlLUAr5zhglkjINru1vfvoISGf
grant_type:client_credentials
@iykedapotential
iykedapotential / gist:3272c729b2a25f7b6473d8336f3c0c1d
Created August 29, 2016 12:43
authentication-sample-request
Sample Request for Authentication
{
"client_id": "5795f6962dbfdc110035943c",
"client_secret":"3V1g9mTMsID10dgjOIGr69q0QnHIi8fX80O42fTOsfpOR4gZGC4rRmWrvg8Rp6MdOTwEQLHqDUrlLUAr5zhglkjINru1vfvoISGf",
"grant_type":"client_credentials"
}
@iykedapotential
iykedapotential / authentication-sample-response.json
Created August 29, 2016 12:45
authentication-sample-response
Sample Response for Authentication
{
"token_type": "bearer",
"access_token": "548441af077dc2b9056df551b593a60539a3ed19",
"expires_in": 3600,
"refresh_token": "a29779dfc5f45c209aff902a5da15222d69768d6"
}
Endpoint: /api/users
Method: POST
Content-Type: application/json
Sample Request:
{
"email": "xyz@yahoo.com",
"phonenumber": "23480300000001",
"firstname": "Emeka",
"lastname": "Segun",
"password": "qwertyui"
}
Sample Response:
{
"status": "success",
"data": {
"email": "xyz@yahoo.com",
"phonenumber": "23480300000001",
"username": "+23480300000001",
"firstname": "Emeka",
"lastname": "Segun",
"createdAt": "2017-02-02",
Endpoint: /api/accountopening/request
Method: POST
Content-Type: application/json
Sample Request for BVN Option:
{
"email": "xyz@yahoo.com",
"bvn": "12345678901",
"gender": "M",
"address1": "12 Sabo Street",
"address2": "Yaba",
"dateofbirth": "1990-02-13",
"state": "Lagos",
"religion": "CHRISTIANITY",