PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 24, 2022

[FIXED] ProcessOut integration without composer

 January 24, 2022     composer-php, php     No comments   

Issue

I'm trying to integrate processout but they only seem to support composer integration.

https://github.com/ProcessOut/processout-php

How would I integrate this just by uploading the /src/ folder into my project?

<?php
// Load dependencies
require 'vendor/autoload.php';

// Instantiate ProcessOut
$processout = new \ProcessOut\ProcessOut();
$processout->setProjectId('<project-id>');
$processout->setProjectSecret('<project-key>');

// Set this project as the default one for the current request
\ProcessOut\ProcessOut::setDefault($processout);
?>

Solution

You are ignoring that Composer is not an autoloader generator, but first and foremost a dependency manager. If you look at the composer.json file of the ProcessOut package you see:

"require": {
    "php": ">=5.4",
    "ext-curl": "*",
    "ext-mbstring": "*",
    "anlutro/curl": "1.4"
  },

The last line is a package it depends on itself, and that you'll be missing out when not using Composer. You could theoretically load and include all dependencies recursively yourself, but in the end - just get composer and let it do its work.



Answered By - Niels Keurentjes
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing