When adding ai-payments, errors occur

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

When adding ai-payments, errors occur

Post by jossnaz » 28 Jul 2016, 00:06

I run aimeos laravel 2016.07.2 and ai-payments 2016.07.2

So I installed the ai-payments https://github.com/aimeoscom/ai-payments

Now it says:

" The value for the field "Provider" must be the last part of the class name of the payment service provider. "

well, the providers are not there. I tried adding authorize.net AIM by using:

AIMGateway as Provider. Then first it complains that there is no provider in
`ff-laravel/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Payment`

called AimGateway

then it throws me this error (i tried again in this case with sim gateway)

Code: Select all

Executing statement "
INSERT INTO "mshop_service" (
"siteid", "pos", "typeid", "code", "label", "provider",
"config", "status", "mtime", "editor", "ctime"
) VALUES (
1, 0, '1', 'authorize-net-sim', 'SIMGateway', 'SIMGateway', '[]', 1, '2016-07-28 00:05:47', 'test@gmail.com', '2016-07-28 00:05:47'
)
" failed: An exception occurred while executing '
INSERT INTO "mshop_service" (
"siteid", "pos", "typeid", "code", "label", "provider",
"config", "status", "mtime", "editor", "ctime"
) VALUES (
1, 0, '1', 'authorize-net-sim', 'SIMGateway', 'SIMGateway', '[]', 1, '2016-07-28 00:05:47', 'lukas.meier@gmail.com', '2016-07-28 00:05:47'
)
':

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1-authorize-net-sim' for key 'unq_msser_siteid_typeid_code'
 
 
 
OK	
 
 
 

what am I missing?
Last edited by jossnaz on 08 Aug 2016, 12:40, edited 1 time in total.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: When adding ai-payments, errors occur

Post by aimeos » 28 Jul 2016, 00:18

For Authorize.net AIM, the provider is "AuthorizeAIM" (see https://aimeos.org/docs/User_Manual/Adm ... ze.net_AIM, the bold stuff is important)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 28 Jul 2016, 00:21

this is my composer json:

Code: Select all

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "prefer-stable": true,
    "minimum-stability": "dev",
    "require": {
      "aimeos/aimeos-laravel": "~2016.07.2",
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "barryvdh/laravel-ide-helper": "^2.2",
        "aimeos/ai-payments": "~2016.07.2"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "Ffix\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan vendor:publish --tag=public --force",
            "php artisan vendor:publish",
            "php artisan migrate",
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 28 Jul 2016, 00:27

I figured it out (i think)

i was looking in the wrong directory, i was looking in:

ff-laravel/vendor/omnipay/authorizenet

because in https://aimeos.org/docs/User_Manual/Adm ... i-payments you advocate adding the line "omnipay/authorizenet": "~2.0" which is plain wrong outdated i think?!

now turns out all the service providers are actually to be found in:

ff-laravel/ext/ai-payments/lib/custom/src/MShop/Service/Provider/Payment

cheers

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 28 Jul 2016, 20:48

hehe your message almost sounded a bit sarcastic. The thing is, I can see now it was mentioned there. So either I am retarded, or the docs are not really good. I think the links or connections are, for a newcomer, just not done clear enough.

Now i want aimeos to gain more momentum, because I think it is a really nice project and I want it to be more successful. I would be willing to add to the docs as I face probably the same problems other devs will face the first time they put their hands on this. That is, if you actually want that.

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 28 Jul 2016, 20:55

just an example, on github of ai-payments under "Configuration" https://github.com/aimeoscom/ai-payments

"The value for the field "Provider" must be the last part of the class name of the payment service provider. Each of the following sections will tell you how it must be named. "

what a bummer, the following sections are "License" and "Links" there are no following sections.

if you read a bit further:

"In the right side of the panel you can add the configuration settings that are specifically required for each payment provider. The list of available settings for each payment provider can be found in the service documentation."

the service documentation is the link you gave me. Now this text clearly states " you can add the configuration settings " and i associate this with the right column where it say "Configuration" and not with the field named where I have to put "The value for the field "Provider" must be the last part of the class name of the payment service provider."

So i start looking for " the last part of the class name of the payment service provider.". Now in the other doc it says:

"AuthorizeAIM payment service provider" is that " the last part of the class name of the payment service provider."? well? probably not, maybe it is.

you see? it makes little sense when coming from the github installation and thats where i was coming from.

and everyone will run into this.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: When adding ai-payments, errors occur

Post by aimeos » 01 Aug 2016, 14:48

I don't know what sarcasm is :-)

Do you want access to be able to modify the documentation? I think you now know best what should be written better. We are properly blind for these kind of stuff in the meantime ;-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 08 Aug 2016, 12:44

hehe i bet you are german. Half of my family is


anyway: yes it would be a pleasure.

jossnaz
Posts: 46
Joined: 22 Jul 2016, 01:19

Re: When adding ai-payments, errors occur

Post by jossnaz » 19 Aug 2016, 01:05

i asked for access, did I miss something and you gave it to me? i have no private message, no email received


there is another mistake in your, outdated, documentation.

i could fix those things while i see them, or i just fix them myself in my code and move on, and just have the very next person run into it


the docs say you should use:

Code: Select all

  'client' => array(
    'html' => array(
      'common' => array(
        'content' => array(
          'baseurl' => 'http://ffix.local/',
//          'baseurl' => '/',
        ),
        'template' => array(
          'baseurl' => public_path('packages/aimeos/shop/elegance'),
        ),
      ),
    ),
  ),
this is wrong

the path is

Code: Select all

packages/aimeos/shop/themes/elegance

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: When adding ai-payments, errors occur

Post by aimeos » 19 Aug 2016, 16:22

Sorry, maybe we've missed that. You should now have received an e-mail for your new account
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply