I dealt with impostor syndrome, so I've published my first package.

hypnodev

Cristian Cosenza

Posted on August 12, 2020

I dealt with impostor syndrome, so I've published my first package.

Yes, after 5 years of coding, working in many project as a backend dev, devops and few more time as a frontend. I finally face the impostor syndrome that affect me and I published my first public package: hypnodev/larapal.

In this five years I made hundred of repository in my github and gitlab account, built some libraries, snippet and project, pushed code but after some days I was going back to delete repo because thought that all of this was not up to par with all the rest of the online projects.

But today, was the great day for me, I've pick one of my libraries, I gave a fix to it, commented out all the needed, then I make a new public repository on GitHub, I want to packagist and linked repo.

The magic was done.

In less than 5 minutes everything was online, published, accessible from all over the world. My library was accessible world-wide, this gave me a little bit of anxiety. But after some minutes that I realized that, it was ok.

For some time I was already working on this problem, I started contributing to a small Laravel project, I started working totally remotely on different projects as a freelance, collaborating with different international teams and with totally different skills from mine.

So this is my suggest for all people are thinking that their work isn't ready for make it public or that the problem they had was just something that happened to them.
Indeed, if you think your work is not ready for the public, it is paradoxically better, since publishing it will help you ask for help, so the first issues will arrive and you can finish your work.

Tackle the impostor syndrome with a roadmap. Step by step.

In the end, yep, I've published my package for Laravel that help you to easy integrate PayPal subscription and checkout with just two methods chargeWithPaypal and subscribeWithPaypal.

Take a look and all kind of issues are welcome, of course!

GitHub logo hypnodev / larapal

An easy way to integrate Paypal into Laravel

Larapal

Latest Version on Packagist Total Downloads

A modern, easy and fluent way to allow your clients to pay with PayPal.

Installation

Via Composer

$ composer require hypnodev/larapal

Publish the configuration with command:

$ php artisan vendor:publish --provider="hypnodev\Larapal\LarapalServiceProvider" 

Add these keys in your .env:

PAYPAL_MODE=sandbox
PAYPAL_SANDBOX_ID=
PAYPAL_SANDBOX_SECRET=
PAYPAL_PRODUCTION_ID=
PAYPAL_PRODUCTION_SECRET=

If you don't have yet credentials for PayPal API, please refer to Get Started - PayPal Developer

Usage

Add BillableWithPaypal trait to your User model

<?php
namespace App;

use hypnodev\Larapal\Traits\BillableWithPaypal;
// ...

class User extends Authenticatable
{
    use Notifiable, BillableWithPaypal;
    
    // ...
}

This will add chargeWithPaypal, subscribeWithPaypal, getPaypalCurrency, getShippingFields to your user.

Then you can charge your user with method:

<?php
auth()->user()->chargeWithPaypal('Charge description', [ // Array of items
    ['name' => 'pkg base', 'description' => 'base package', 'price' => 10.00, 'tax'
💖 💪 🙅 🚩
hypnodev
Cristian Cosenza

Posted on August 12, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related