buckaroo-it/BuckarooSDK_PHP

Uncaught Error: Class "Buckaroo" not found

Closed this issue · 9 comments

Is there a bug? If I create a comoser.json file and then build the library using composer the main class object isn't found.

public_html/composer.json

{
    "require": {
        "buckaroo/sdk": "^1.0"
    }
}

composer install

public_html/index.php

<?php
require __DIR__ . '/vendor/autoload.php';

# Get your website & secret key in your plaza.
$buckaroo = new \Buckaroo('xxx', 'yyy');
avido commented

Is there a bug? If I create a comoser.json file and then build the library using composer the main class object isn't found.

public_html/composer.json

{
    "require": {
        "buckaroo/sdk": "^1.0"
    }
}

composer install

public_html/index.php

<?php
require __DIR__ . '/vendor/autoload.php';

# Get your website & secret key in your plaza.
$buckaroo = new \Buckaroo('xxx', 'yyy');

Buckaroo is the namespace..
Try

$client = new Buckaroo\BuckarooClient('xxx', 'yyy');

Thanks I think this worked. Your documentation is wrong:

https://docs.buckaroo.io/docs/php-sdk

require __DIR__ . '/vendor/autoload.php';

# Get your website & secret key in your plaza.
$buckaroo = new \Buckaroo('WEBSITE_KEY', 'SECRET_KEY');

That did work but the payment object doesn't exist as per the documentation.

require './vendor/autoload.php';
$buckaroo = new Buckaroo\BuckarooClient('xxx', 'yyy');
$payment = $buckaroo->payment('creditcard') ->pay(['name' => 'visa','amountDebit' => 10,'invoice' => 'xxx']);

Call to undefined method BuckarooBuckarooClient::payment()

avido commented

That did work but the payment object doesn't exist as per the documentation.

require './vendor/autoload.php';
$buckaroo = new Buckaroo\BuckarooClient('xxx', 'yyy');
$payment = $buckaroo->payment('creditcard') ->pay(['name' => 'visa','amountDebit' => 10,'invoice' => 'xxx']);

Call to undefined method BuckarooBuckarooClient::payment()

The documentation is outdated, i advise you to have a look at the tests and examples folders in this repo.

@Buckaroo-Rens Probably a good thing to revise the documentation.

Thanks. I'll take a look. Critical to get documentation up to date. Thanks guys!! :)

Dear @abrookbanks

We have updated the documentation on our website. Thanks for mentioning it.

We can create something like that, but it will only work for some of our payments. Payments such as Klarna, Afterpay, Billink, etc. will not work on a hosted payment page. These payments require more data from the merchant in order to work correctly.

Dear @abrookbanks

Thank you so much for your feedback. We are always open to improving our code. I will do my best to answer all your questions.

  • Gender is a required field for Klarna but not for KlarnaKP
  • You can use EUR for UK customers. Simply define currency in your payload. (Remember to check if the EUR is enabled for Klarna in your plaza account.)
  • Same as gender, it's not required in KlarnaKP, but it's required for Klarna.

The required fields are validated once the call is made, so the API handles it. There isn't a validation for your payload in the SDK. Klarna and KlarnaKP are two different payment methods with dedicated endpoints.

So sorry to hear that you had a horrible experience with our SDK. I'm willing to have a call with you if you are open to it.

Shu

Thanks Shu. I get the necessity of multiple integrations and 3rd party requirements.

@abrookbanks Is there any way we can help you right now with the issues you've been experiencing? The SDK is still a relatively new product, which fortunately many people already enjoy using.

We would also like to help you to have the same experience.

As indicated, we are open to a (video) call to help you with certain matters and will of course try to process the feedback you have previously given as best as possible.