Programming › Re: [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 11:01pm On Feb 02, 2018 |
fideleict: How about you try to follow the steps you outlined to integrate Paystack and see if you'll get anything done.
Whoever follows those steps will end up more confused, and with more questions than they had at the beginning of the 'tutorial' if are confused, ask ur questions. Any programmer should understand this tut |
Programming › Re: [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 10:59pm On Feb 02, 2018 |
if you have questions, you are welcome
The next tutorial would be laravel |
Programming › Re: [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 10:55pm On Feb 02, 2018 |
fideleict: You tried, but you just jumped into the middle of everything, skipping very important information like creating an account and getting an actual secret key before integration. You also skipped important details, like company registration information required to go live when using paystack.
For developers looking to integrate Paystack with their web applications, you can get full information on what to have ready, pricing, as well as libraries to aid you during the integration process. To go live with Paystack after demo testing, you'll need to have your business registration documents handy as it will be required of you.
Here's the link to the official docs: https://developers.paystack.co/docs/, good luck while at it. If you hit any dead ends while integrating Paystack, you can send me a DM, or for even faster response, you can join the Paystack official slack channel (payslack.slack.com) to get support directly from the guys at Paystack. i did not post this for you but for novice new to paystack integration with PHP |
Programming › Re: [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 10:53pm On Feb 02, 2018 |
bigtt76: Nice one but you forgot to paste the pay.php rather you pasted index.php twice corrected |
Programming › Php Function To Generate A Random Expression by chiwex(op): 10:11pm On Feb 02, 2018 |
If you are looking for a code function to generate a random expression, like password with alphanumeric or any other generate a random expression, use this function: <?php function GeraHash($qtd){ //Under the string $Caracteres you write all the characters you want to be used to randomly generate the code. $Caracteres = 'ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789'; $QuantidadeCaracteres = strlen($Caracteres); $QuantidadeCaracteres--;
$Hash=NULL; for($x=1;$x<=$qtd;$x++){ $Posicao = rand(0,$QuantidadeCaracteres); $Hash .= substr($Caracteres,$Posicao,1); }
return $Hash; }
//Here you specify how many characters the returning string must have echo GeraHash(30); ?>
source: http://php.net |
Programming › Re: [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 10:04pm On Feb 02, 2018 |
if you like this tutorial like it |
Programming › [Tutorial Post] How To Integrate Paystack Payment System With PHP by chiwex(op): 10:03pm On Feb 02, 2018 |
Integrating Paystack to your website is very easy, you can do it in just 2 steps. Step 1: Initialize the payment Step 2: Verify the payment was successful Step 1: Initialize the paymentFirst you’d have to decide if you want to use the inline method or standard method. With Inline integration, you keep the payment experience on your website. While with the Standard integration, your users will be redirected to Paystack’s website to pay and redirected back to your website after payment. NB: The amount passed is in Kobo (A positive integer in the smallest currency unit), so you’d have to multiply the Naira amount by 100 to get the Kobo value. Eg NGN 100 should be passed as 10000 In this tutorial, you will learn how to use the Standard method NB: Before you can receive payment with paystack, you need to have an account with paystack account. For this tutorial, i have created three files index.php, pay.php and verify.php index.php: contains lists of our product index.php: contains lists of our product <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml"> <head>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css">
<body>
<div class="container"> <div class="row"> <div class="col-md-12"> <div class="col-sm-6 col-md-4"> <div class="thumbnail" > <h4 class="text-center"><span class="label label-info">Samsung</span></h4> <img src="http://placehold.it/650x450&text=Galaxy S5" class="img-responsive"> <div class="caption"> <div class="row"> <div class="col-md-6 col-xs-6"> <h3>Galaxy S5</h3> </div> <div class="col-md-6 col-xs-6 price"> <h3> <label>₦649.99</label></h3> </div> </div> <p>32GB, 2GB Ram, 1080HD, 5.1 inches, Android</p> <div class="row"> <div class="col-md-6"> <a class="btn btn-primary btn-product"><span class="glyphicon glyphicon-thumbs-up"></span> Like</a> </div> <div class="col-md-6"> <form action="pay.php" method="post"> <input type="hidden" name="amount" value="64999"> <input type="submit" class="btn btn-primary" value="BUY NOW" > </form> </div>
<p> </p> </div> </div> </div> </div> <div class="col-sm-6 col-md-4"> <div class="thumbnail" > <h4 class="text-center"><span class="label label-info">Apple</span></h4> <img src="http://placehold.it/650x450&text=iPhone 6" class="img-responsive"> <div class="caption"> <div class="row"> <div class="col-md-6 col-xs-6"> <h3>iPhone 6</h3> </div> <div class="col-md-6 col-xs-6 price"> <h3> <label>₦749.99</label></h3> </div> </div> <p>32GB, 64Bit, 1080HD, 4.7 inches, iOS 8</p> <div class="row"> <div class="col-md-6"> <a class="btn btn-primary btn-product"><span class="glyphicon glyphicon-thumbs-up"></span> Like</a> </div> <div class="col-md-6"> <form action="pay.php" method="post"> <input type="hidden" name="amount" value="74999"> <input type="submit" class="btn btn-primary" value="BUY NOW" > </form> </div> </div>
<p> </p> </div> </div> </div> <div class="col-sm-6 col-md-4"> <div class="thumbnail" > <h4 class="text-center"><span class="label label-info">Nokia</span></h4> <img src="http://placehold.it/650x450&text=Lumia 1520" class="img-responsive"> <div class="caption"> <div class="row"> <div class="col-md-6 col-xs-6"> <h3>Lumia 1520</h3> </div> <div class="col-md-6 col-xs-6 price"> <h3> <label>₦749.00</label></h3> </div> </div> <p>32GB, 4GB Ram, 1080HD, 6.3 inches, WP 8</p> <div class="row"> <div class="col-md-6"> <a class="btn btn-primary btn-product"><span class="glyphicon glyphicon-thumbs-up"></span> Like</a> </div> <div class="col-md-6"> <form action="pay.php" method="post"> <input type="hidden" name="amount" value="74900"> <input type="submit" class="btn btn-primary" value="BUY NOW" > </form> </div> </div>
<p> </p> </div> </div> </div>
</div>
</div> </div> </body>
pay.php: when the BUY NOW button is submitted from the index.php, you are redirected to the authorization URL. This URL is valid for one time use, so ensure that you generate a new URL per transaction. When the payment is successful, we will call your callback URL (as setup in your dashboard) and return the reference sent in the first step as a query parameter. function genReference($qtd){ //Under the string $Caracteres you write all the characters you want to be used to randomly generate the code. $Caracteres = 'ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789'; $QuantidadeCaracteres = strlen($Caracteres); $QuantidadeCaracteres--;
$Hash=NULL;
for($x=1;$x<=$qtd;$x++){ $Posicao = rand(0,$QuantidadeCaracteres); $Hash .= substr($Caracteres,$Posicao,1); }
return $Hash; }
$result = array();
//Set other parameters as keys in the $postdata array $postdata = array( 'email' => 'donchiwexco@gmail.com', 'amount' => $_POST['amount'], "reference" => genReference(10) );
$url = "https://api.paystack.co/transaction/initialize";
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postdata)); //Post Fields curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = [ 'Authorization: Bearer sk_test_*********************************', 'Content-Type: application/json',
]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$request = curl_exec($ch);
curl_close($ch);
if ($request) {
$result = json_decode($request, true);
header('Location: ' . $result['data']['authorization_url']);
}
verify.php : Before giving value to your customer, you should verify the status of the transaction by passing the reference to the API. $result = array(); //The parameter after verify/ is the transaction reference to be verified $url = 'https://api.paystack.co/transaction/verify/'. $_GET['reference'];
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer sk_test_*****************************'] ); $request = curl_exec($ch); curl_close($ch);
if ($request) { $result = json_decode($request, true); }
if (array_key_exists('data', $result) && array_key_exists('status', $result['data']) && ($result['data']['status'] === 'success')) { echo "Transaction was successful"; //Perform necessary action }else{ echo "Transaction was unsuccessful"; }
Source: https://chiwex.com/integrate-paystack-payment-system/Reference: https://developers.paystack.co/page/integrating-paystack-php |
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 8:13pm On Feb 02, 2018 |
Ejiod: Can pay stack be integrated into nodeJs? yes. of course, i can help with PHP integration for paystack |
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 3:57pm On Feb 02, 2018 |
If you need a complete Ecommerce website with Paystack integrated payment system contact me: 09034964142 |
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 3:54pm On Feb 02, 2018 |
|
|
|
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 6:57am On Feb 01, 2018 |
fideleict: Really? Wow!! Just imagine you developed a solution to a legitimate bitcoin investment business for example, using a nulled script, and multiple scammer bitcoin investment websites already exists that use the same script with basic aesthetic differences. The legitimate business will immediately be marked as a scam business because of experiences investors have had with similar systems. What about lawsuits? Many other things that can't be outlined here. You know Nada about the intricacies of programming. Its your kind that give programmers a bad name. And stop calling yourself a Laravel programmer. That's an insult to laravel developers.
I can also bet a million dollars you can't integrate paystack without using the PHP package from Packagist. You'll probably go crazy if you tried. I have developed Ecommerce websites & church website website with Laravel from scratch. I have developed 5 different bitcoin websites as of last year. For you,Thomas, let me post complete code for Paystack integration for php any website |
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 11:50pm On Jan 31, 2018 |
A client is not interested how you develop or what you use to his his website he want his job delivered as agreed .
Sometimes I reuse my existing codes to meet my clients needs. with the advantage of code reuse makes life easier for me. |
Programming › Re: Do Need Paystack Payment Integration by chiwex(op): 11:43pm On Jan 31, 2018 |
bot101: With your nulled scripts ba? I am a laravel programmer I have been developing with it.
I said I can integrate your existing website with Paystack payment system |
|
Programming › Do Need Paystack Payment Integration by chiwex(op): 5:24pm On Jan 31, 2018 |
I have solution for custom php mysql projects laravel and CodeIgniter project.
I recently integrated it for cinema prudentmail.com |
Programming › Re: Mlm Website Needed, Get In Now If You Can Give Me One by chiwex(m): 5:12pm On Jan 31, 2018 |
|
Programming › LARAVEL And CODEINGNITER Web Development And SCRIPTS For Sale by chiwex(op): 7:01pm On Jan 30, 2018 |
i integrate paystack, paypal, perfect money, etc for an existing website developed with LARAVEL and CODEIGNITER or with native PHP
i have done for some in this forum
i have and have developed different kinds of scripts for school, shopping cart, booking, classified ads, church website
demos are setup by request
all of our scripts and services are affordable |
|
Programming › Re: Mlm Website Needed, Come In If You Can Develop One For Me by chiwex(m): 9:41am On Jan 25, 2018 |
bestcreation: In need of simple mlm website, if you have already built script you are welcome as well. please, I DONT NEED PONZI SCHEME SCRIPT OR WEBSITE WHAT I NEED IS MLM SCRIPT/WEBSITE/SOFTWARE
BUDGET IS 30K & ABOVE
if you can give me what I want, just quote me and i will get in touch with you immediately I will setup a demo for you |
Politics › Re: 95 Ex-Boko Haram Fighters Set For Release - Chief Of Defense Staff Says by chiwex(m): 6:45pm On Jan 18, 2018 |
shameful |
|
Phones › Re: Tecno Mobile Launches Full Display Screen Smartphone, ‘CAMON CM’ by chiwex(m): 7:37am On Jan 13, 2018 |
This is not full screen |
Politics › Re: Appointment Of Dead People: See What A Facebook User Wrote by chiwex(m): 8:32pm On Jan 01, 2018 |
Evil dead 2018 |
Christianity Etc › Re: "Your Spiritual Welfare Is Our Concern" - Deeper Life Bible Church by chiwex(m): 6:53pm On Dec 24, 2017 |
Jesus did emphasis on this things. Remember he ate with sinners. We should start to amend ways to be acceptable to God |
Romance › Re: Have You Had Sex With A Girl Without Giving Her Money Or Buying Stuff For Her? by chiwex(m): 9:20pm On Nov 05, 2017 |
a learner question |
Politics › Re: Davido's Uncle At It Again. Watch Senator Adeleke Dancing With Ladies by chiwex(m): 10:46am On Oct 28, 2017 |
His Gift |
Programming › Re: Paystack Integration by chiwex(m): 9:48pm On Oct 23, 2017 |
IF YOU ARE AN EXPERIENCED PHP PROGRAMMER YOU CAN INTEGRATE IT OR CONTACT ME IF CAN NOT i have the complete code with database integration if you are developing with laravel my email: donchiwexco@gmail.com USE https://github.com/yabacon/paystack-class/blob/master/Paystack.phprequire_once 'Paystack.php'; // Configuration options $config['paystack_key_test_secret'] = 'sk_test_xxxx'; $config['paystack_key_live_secret'] = 'sk_live_xxxx'; $config['paystack_test_mode'] = TRUE; // set to false when you are ready to go live // Create the library object $paystack = new Paystack( $config ); //use this method to do the payment $response = $paystack->transaction->initialize([ 'reference'=>'unique_refencecode', 'amount'=>'120000', 'email'=>'dafe@aba.c' ]); //use this method to confirm the payment $response = $paystack->transaction->verify([ 'reference'=>'refencecode' ]); |
Politics › Re: I Am Igbo And I Support Operation Python Dance 100% by chiwex(m): 7:55am On Sep 14, 2017 |
My question is who brought the war |
Programming › Re: My Wordpress Hacked And Files Moved By My Host by chiwex(m): 9:21pm On Aug 23, 2017 |
i will do it for free, pay me when the job is done. 09034964142 |
Phones › Re: Comment The Most Funniest WIFI Name You've Ever Seen by chiwex(m): 7:09am On Jul 17, 2017 |
Trojan and virus |