Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not supported Method "addSupportedBrand" in AbstractRequest #27

Closed
Axent96 opened this issue Jun 13, 2017 · 11 comments
Closed

Not supported Method "addSupportedBrand" in AbstractRequest #27

Axent96 opened this issue Jun 13, 2017 · 11 comments

Comments

@Axent96
Copy link
Contributor

Axent96 commented Jun 13, 2017

I have a Fatal Error: "Call to undefined method Omnipay\Common\CreditCard::addSupportedBrand()"
(AbstractRequest, Line 721)
CreditCard of Omnipay don't have the "addSupportedBrand" Method.
It was tested with last version of Omnipay

@judgej
Copy link
Member

judgej commented Jun 13, 2017

Strange, I see it here: https://github.com/thephpleague/omnipay-common/blob/master/src/Common/CreditCard.php

Can you find out exactly which version of omnipay you are using? It may be you are not using the latest due to some other composer dependency. This command will give you the details:

$ composer info
...
omnipay/common               2.5.2   Common components for Omnipay payment processing library
...

Or php composer.phar info - whatever you use on your setup to run composer.

If that's the case, I need to raise the required version of this package (^2.2 or ^2.3), or preferably build in some fallback workaround. Even better, if we can fix your dependencies, I won't have to add any code ;-)

Let me know what you find and we can take it from there.

@Axent96
Copy link
Contributor Author

Axent96 commented Jun 13, 2017

I use omnipay/omnipay with all official payment processings.
It have a stable version 2.3.2. (https://github.com/thephpleague/omnipay)
my info show me version 2.3.4

omnipay/common v2.3.4

I use another payment processings too and cannot update omnipay/common to version 2.5.x :(

@Axent96
Copy link
Contributor Author

Axent96 commented Jun 13, 2017

Do you can add the condition for example?

if(method_exists($card,'addSupportedBrand')) ...

With this condition can work each version :)

@judgej
Copy link
Member

judgej commented Jun 13, 2017

There can be all sorts of reasons why it has stopped on this version, including PHP versions. But that is the nature of composer. Yes, I can add a quick fix like that. There may be one or two brands that won't be supported, but at least it will work.

I'm just waiting for feedback on another issue (which I stupidly did not fix in a branch) so I can tag that, then I can work on this.

@Axent96
Copy link
Contributor Author

Axent96 commented Jun 13, 2017

great, thank you very much! :)

@judgej
Copy link
Member

judgej commented Jun 13, 2017

Or I can checkout 2.2.0 and branch from there. git is a never-ending learning experience :-)

@judgej
Copy link
Member

judgej commented Jun 13, 2017

Would you be able to try this branch:

https://github.com/academe/OmniPay-Payone/tree/issue27

If that works, I'll tag it for release and merge it into master.

judgej added a commit that referenced this issue Jun 13, 2017
@Axent96
Copy link
Contributor Author

Axent96 commented Jun 13, 2017

Ok, thanks.
I work at moment with another methods of payone. I will test this and write in 1-3 days full feedback for base version of omnipay/omnipay. maybe find I anything more :)

@judgej
Copy link
Member

judgej commented Jun 13, 2017

Release 2.2.1

@judgej judgej closed this as completed Jun 13, 2017
@Axent96
Copy link
Contributor Author

Axent96 commented Jun 14, 2017

Hi, I tested now and found more :)
for example "ShopTransactionStatusServerRequest" have Omnipay\Common\Message\NotificationInterface. This not exists in version 2.3.x
I check now another "official" payment processings and try update common to last version (2.5.x)

You wrote in your compose.json:
"require": { "omnipay/common": "~2.0" },
You can change this value to "~2.5" (your stable version)

@judgej
Copy link
Member

judgej commented Jun 14, 2017

The notificationInterface was introduced in releast 2.4.0 so I have set that as a minimum requirement.

You are still going to have to find out what is holding back your omnipay-common version before you can install this package. There are composer commands that give you clues about what dependencies each package enforces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants