<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yusuf</title>
    <description>The latest articles on DEV Community by Yusuf (@yusufxcode).</description>
    <link>https://dev.to/yusufxcode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F889427%2Fe3347517-761b-4d90-97e1-19920a0faae5.jpg</url>
      <title>DEV Community: Yusuf</title>
      <link>https://dev.to/yusufxcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yusufxcode"/>
    <language>en</language>
    <item>
      <title>How to Integrate Paystack Payment into your Project with HTML and JavaScript</title>
      <dc:creator>Yusuf</dc:creator>
      <pubDate>Thu, 24 Aug 2023 08:12:52 +0000</pubDate>
      <link>https://dev.to/yusufxcode/how-to-integrate-paystack-payment-into-your-project-with-html-and-javascript-poh</link>
      <guid>https://dev.to/yusufxcode/how-to-integrate-paystack-payment-into-your-project-with-html-and-javascript-poh</guid>
      <description>&lt;p&gt;Paystack is a modern payment gateway solution for Africa, The Paystack API allows you access to a lot of payment features on the platform via your Paystack dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Paystack Account&lt;/li&gt;
&lt;li&gt;Personal Paystack public key&lt;/li&gt;
&lt;li&gt;A basic know-how of HTML and JavaScript&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Sign up with Paystack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go through the sign up process and log in into your account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the setting tap.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w6hVPZ7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd20s2si6z5wqpd23dzs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w6hVPZ7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd20s2si6z5wqpd23dzs.png" alt="Paystack Dashboard" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the "API Keys &amp;amp; Webhooks" tab to reveal your API keys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bGxOwbyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rc52tffujk4y89pcziqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bGxOwbyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rc52tffujk4y89pcziqb.png" alt="Paystack dashboard - API keys" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We'll be using the Test Public Key, so copy it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create HTML file
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create the pay button&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;div class="check-out"&amp;gt;&lt;br&gt;
            &amp;lt;button&amp;gt;Pay&amp;lt;/button&amp;gt;&lt;br&gt;
        &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add the inline script&lt;/strong&gt; &lt;br&gt;
we have to create a link to the Paystack’s javascript library with the below code added to your HTML body.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;script src="https://js.paystack.co/v1/inline.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;
 &amp;lt;script src="checkOut.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Create JavaScript file
&lt;/h2&gt;

&lt;p&gt;We'll finalize our payment setup with the paystack's payment modal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const checkOut = document.querySelector('.check-out button');

checkOut.addEventListener('click', function payWithPaystack() {

    var handler = PaystackPop.setup({
        key: 'Paste_your_API_KEY_here',
        email: 'customer@email.com',
        amount: `1000000`, //amount here is 10,000 double zeros has to be added
        metadata: {
            custom_fields: [
                {
                    display_name: "mobile Number",
                    variable_name: "Mobile Number",
                    value: "+2348012345678"
                }
            ]
        },

        callback: function (response) {
            alert('transaction is ' + response.reference);
        },

        onclose: function(){
            alert('transaction cancelled');
        }

    });

    handler.openIframe();//to call the paystack payment interface
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Use the public key not the secret key. &lt;br&gt;
modify the code to fit into your project needs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's a preview if everything goes well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rzbJay8U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8sf5zjzqpb35qvyyr0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rzbJay8U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8sf5zjzqpb35qvyyr0p.png" alt="Payment modal" width="509" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>paystack</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>projects</category>
    </item>
    <item>
      <title>Initiate a phone call and SMS with HTML</title>
      <dc:creator>Yusuf</dc:creator>
      <pubDate>Tue, 12 Jul 2022 17:34:34 +0000</pubDate>
      <link>https://dev.to/yusufxcode/initiate-a-phone-call-and-sms-with-html-1d08</link>
      <guid>https://dev.to/yusufxcode/initiate-a-phone-call-and-sms-with-html-1d08</guid>
      <description>&lt;p&gt;A simple one line code to initiate a phone call goes thus:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href = "tel:1-234-567-8901"&amp;gt; 1-234-567-8901&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to initiate sms:&lt;br&gt;
&lt;code&gt;&amp;lt;a href = "sms:1-234-567-8901"&amp;gt; SMS Message&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creative Problem Solving Techniques</title>
      <dc:creator>Yusuf</dc:creator>
      <pubDate>Sun, 10 Jul 2022 22:36:13 +0000</pubDate>
      <link>https://dev.to/yusufxcode/creative-problem-solving-techniques-4m0</link>
      <guid>https://dev.to/yusufxcode/creative-problem-solving-techniques-4m0</guid>
      <description>&lt;p&gt;The world is never short of programmers or coders it's only short of creative problem solvers. having great problem solving techniques keeps you at edge and way ahead of others. &lt;/p&gt;

&lt;h2&gt;
  
  
  They are traditionally four(4) steps to problem solving.
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;1. Define the problem.&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;2. Generate new ideas.&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;3. Evaluate and select solutions.&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;4. Implement.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;those are the foundational problems solving techniques you'll have to stick to when you're faced with your next problem. Without further a do, let's dive further.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Define the problem:&lt;/strong&gt; First, you must define the problem, what is it cause? what are the signs there's a problem at all?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate new ideas:&lt;/strong&gt; Next, you identify various options for solutions. What are some good ideas to solve this?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluate and select solutions:&lt;/strong&gt; Then, evaluate your options and choose from among them. What is the best option to solve the problem? What's the easier? How should you prioritize?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implement:&lt;/strong&gt; Finally implement the chosen solution. Does it solve the problem? Is there another option you need to try?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creative Problem Solving Process
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;♦Separate ideation from evaluation:&lt;/em&gt;&lt;/strong&gt; &lt;br&gt;
When brainstorming creative ideas for your next project, have a separate for writing it all down. focus on generating lots of ideas. Don't prioritize them or evaluate them until everything is captured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;♦Judging will shut it down:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Nothing stops the flow of creative ideas faster than judging them on the spot. Wait until the brainstorming is over before you evaluate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;♦Restate problems as questions:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Restating problems as questions will give you more clarity about the problem. it's easier to a group into thinking of creative ideas when challenges are stated as open-ended questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;♦Use "Yes and" to expand ideas:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
It's way too easy to shutdown and negate ideas by using the word "but" (i.e. "But i think this is better..."). Avoid this at all cost, instead expand on what was previously introduced by saying "Yes, and?..." to keep ideas flowing and evolving.&lt;/p&gt;

&lt;p&gt;ps: Before you solve a problem, seek to understand it fully.&lt;br&gt;
I hope someone find this useful.&lt;br&gt;
follow for more tips. &lt;/p&gt;

</description>
      <category>functional</category>
      <category>leadership</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Finally joined this amazing dev community. dev.to</title>
      <dc:creator>Yusuf</dc:creator>
      <pubDate>Sat, 09 Jul 2022 11:07:00 +0000</pubDate>
      <link>https://dev.to/yusufxcode/finally-joined-this-amazing-dev-community-devto-183e</link>
      <guid>https://dev.to/yusufxcode/finally-joined-this-amazing-dev-community-devto-183e</guid>
      <description>&lt;p&gt;Started my coding journey January 2022, I've heard the numerous advantages of joining a dev community but I've always felt I'm not ready yet, little did I know that they is no perfect time to be ready.&lt;br&gt;
So I've decided to just do it.&lt;br&gt;
Looking forward to meeting new people and making new friends here to help each other grow in our respective endeavors. cheers&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
