omnipay icon indicating copy to clipboard operation
omnipay copied to clipboard

Error after updating(`composer update`) Omnipay

Open karlpatrickespiritu opened this issue 9 years ago • 2 comments
trafficstars

I'm using ExpressoStore in EE which uses Omnipay as a payment library. And tried to update the omnipay by running composer update.

Fatal error: Call to undefined method Omnipay\Common\Item::getCode() in [My server path]system\expressionengine\third_party\store\vendor\omnipay\paypal\src\Message\AbstractRequest.php on line 308

I used paypal with this transaction. Or maybe this should be an omnipay/paypal issue? hmmn :disappointed:

karlpatrickespiritu avatar Jul 25 '16 02:07 karlpatrickespiritu

It should use this Item: https://github.com/thephpleague/omnipay-paypal/blob/master/src/PayPalItem.php Not sure why it has the wrong item, could be a problem with ExpressoStore.

barryvdh avatar Jul 25 '16 09:07 barryvdh

Just had this issue creating a new driver - the Item needed to be customised to add some new properties required by the gateway. It helps if the plugin either uses default values for the missing properties in the standard Item, or throws an exception so you know it does not support the default OmniPay Item. Just making the assumption that the extended Item will be used is probably not so helpful, especially as the interface effectively says that it does support it.

judgej avatar Jul 25 '16 09:07 judgej