Skip to content

Instantly share code, notes, and snippets.

curl https://pwcstaging.herokuapp.com/orders/transactions?merchant_code=64545636353 \
-H "Authorization: Bearer [access_token_here]"
or
curl https://pwcstaging.herokuapp.com/orders/transactions?reference_no=64545636353
-H "Authorization: Bearer [access_token_here]"
@darilldrems
darilldrems / hosted-payment-page
Created July 21, 2016 15:41
PayWithCapture hosted payment page curl example.
curl https://pwcstaging.herokuapp.com/oauth/token \
-d merchant_id=audyyhf47646 \
-d amount=4000 \
-d description=payment for laptop \
-d redirect_url=http://forloop.com.ng
-d transaction_id=773649uryy
-d [email protected]
-d customer_phone=09098090908
curl https://pwcstaging.herokuapp.com/oauth/token \
-d client_id=audyyhf47646 \
-d client_secret=46464urhfgfyr66474 \
-d grant_type=client_credentials
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) {
@darilldrems
darilldrems / pwc-example-php-authentication.php
Last active July 21, 2016 13:09
An example code for oAuth 2.0 Authentication with PayWithCapture API in PHP.
<?php
use PayWithCapture\Services;
$clientId = "84747hfyfyf"; //Your client id is in PwC devcenter account page
$clientSecret = "7446ydt77464"; //Your client secret is in PwC devcenter account page
$env = "staging";
$auth = new Authentication($clientId, $clientSecret, $env);
$auth->loadAccessToken();
//once loaded, you can get your access token with
@darilldrems
darilldrems / create ssh config.sh
Created March 23, 2016 13:28 — forked from yomexzo/create ssh config.sh
Troublshooting tools
#! /usr/bin/env python
import re
from os import path, listdir
from os.path import isfile, join
config_path = path.abspath(path.expanduser('~') + '/.ssh/config')
template = 'Host {}\n\tStrictHostKeyChecking no\n\tHostName {}\n\tUser {}\n\n'
begin = '#WRW HOST VARS - START'
end = '#WRW HOST VARS - END'