This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//to generate qr code for a product | |
POST curl https://pwcstaging.herokuapp.com/product/getQrCode | |
-H "Authorization: Bearer [access_token_here]" | |
-d merchant_id=jeeh | |
-d name=hgfh | |
-d description=selling that thing | |
-d amount_locked=true //can be true or false | |
-d amount=10000 | |
-d image=fhfggfjfghghgg //A base64 encode image string | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PayWithCaptureClient = require('PayWithCapture'); | |
var clientId = "", //Your client id is in devcenter account page | |
clientSecret = "", //Your clientSecret is in devcenter account page | |
env = "staging"; //can be staging or production | |
var client = new PayWithCaptureClient(clientId, clientSecret, env); | |
var qrClient = client.getQrCode(); | |
data = { | |
"merchant_id": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PayWithCapture\Services\Authentication; | |
use PayWithCapture\Services\QRCode; | |
$auth = new Authentication($this->clientId, $this->clientSecret); | |
$auth->loadAccessToken(); | |
$token = $auth->getAccessToken(); | |
$qrClient = new QRCode($token); | |
$data = array( | |
"merchant_id" => "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PayWithCapture\PayWithCaptureClient; | |
//You can find your clientId, $clientSecret in your PayWithCapture DevCenter settings page | |
$clientId = "745474656hdhdgftfyfjfkg"; | |
$clientSecret = "jyrtr64546470od"; | |
$env = "staging"; // $env should be "staging" when in dev mode and in production change to "production" | |
$client = new PayWithCaptureClient($clientId, $clientSecret, $env); | |
$otpClient = $client->getOtpClient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST curl https://pwcstaging.herokuapp.com/otp/authenticate | |
-H "Authorization: Bearer [access_token_here]" | |
-d otp=446 | |
-d phonenumber=+2349098090424 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PayWithCapture = require('PayWithCapture'); | |
var clientId = "eyet636484u4h", //Your clientId is in your PayWithCapture DevCenter account page | |
clientSecret = "736484yekhgutit857485", //Your clientSecret is in your PayWithCapture DevCenter account page | |
env = "staging"; // env can either be staging or production | |
var pwcClient = new PayWithCapture(clientId, clientSecret, env); | |
var otpClient = pwcClient.getOtp(); | |
//this method will send otp to phone number | |
otpClient.sendSmsOtp(phone) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PayWithCapture\PayWithCaptureClient; | |
//You can find your clientId, $clientSecret in your PayWithCapture DevCenter settings page | |
$clientId = "745474656hdhdgftfyfjfkg"; | |
$clientSecret = "jyrtr64546470od"; | |
$env = "staging"; // $env should be "staging" when in dev mode and in production change to "production" | |
$client = new PayWithCaptureClient($clientId, $clientSecret, $env); | |
$otpClient = $client->getOtpClient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET curl https://pwcstaging.herokuapp.com/otp/sms/[phonenumber_here] | |
-H "Authorization: Bearer [access_token_here]" | |
or | |
GET curl https://pwcstaging.herokuapp.com/otp/voice/[phonenumber_here] | |
-H "Authorization: Bearer [access_token_here]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PayWithCapture = require('PayWithCapture'); | |
var clientId = "eyet636484u4h", //Your clientId is in your PayWithCapture DevCenter account page | |
clientSecret = "736484yekhgutit857485", //Your clientSecret is in your PayWithCapture DevCenter account page | |
env = "staging"; // env can either be staging or production | |
var pwcClient = new PayWithCapture(clientId, clientSecret, env); | |
var posClient = pwcClient.getPosPrinting(); | |
var merchantCode = "474649"; //You merchant code is in your account page on PayWithCapture DevCenter | |
//this method will return transactions done by a merchant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PayWithCapture\PayWithCaptureClient; | |
$clientId = ""; //Your client id is in your devcenter account page | |
$clientSecret = ""; //Your client secret is in your devcenter account page | |
$env = "staging"; //this can either be staging or production | |
$client = new PayWithCaptureClient($clientId, $clientSecret, $env); | |
$posClient = $client->getPOSPrintingClient(); |
NewerOlder