Skip to content

An uncaught Exception was encountered #14

@Innox

Description

@Innox

`
class Welcome extends CI_Controller
{

public function __construct()
{
	parent::__construct();
}

public function index()
{
	Beyonic::setApiKey("3f5497e9b45bfc7376*********************");

	$collection_request = Beyonic_Collection_Request::create(array(
		"phonenumber" => "+256782266034",
		"amount" => "100.2",
		"currency" => "BXC",
		"metadata" => array("my_id"=>"123ASDAsd123"),
		"send_instructions" => True
	));

	echo json_encode($collection_request);
}

}
`

I'm trying out integrating Beyonic API in CodeIgniter but I have failed to go beyond this error.

Type: Beyonic_Exception

Message: HTTP/2 401

Filename: C:\xampp\htdocs\pay\vendor\beyonic\beyonic-php\lib\Beyonic\Beyonic.php

Line Number: 133

Backtrace:

File: C:\xampp\htdocs\pay\vendor\beyonic\beyonic-php\lib\Beyonic\Endpoint_Wrapper.php
Line: 58
Function: sendRequest

File: C:\xampp\htdocs\pay\application\controllers\Welcome.php
Line: 19
Function: create

File: C:\xampp\htdocs\pay\index.php
Line: 315
Function: require_once

Any help will be highly appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions