eileenmcnaughton / nz.co.fuzion.omnipaymultiprocessor

Omnipay Multi Processor Payment Processor For CiviCRM
Other
13 stars 44 forks source link

Can't get this to work! Fatal error calling undefined methods #130

Closed TomCrawshaw closed 5 years ago

TomCrawshaw commented 5 years ago

Hi,

I may be doing something stoopid, or have left something undone, but I can't get OmniPay to work at all (trying with PayPal). Running Drupal 7.67, CiviCRM 5.15.0. Have installed OmniPay using Composer (so vendor/omnipay/... is in the webroot) and this extension, and configured a new PP with PayPal credentials, but get this log error when trying to make a test payment (and the on-screen error "Site is not correctly configured to process payments"):

Error: Call to undefined method CRM_Core_Payment_OmnipayMultiProcessor::getAmount() in CRM_Core_Payment_OmnipayMultiProcessor->getCreditCardOptions() (line 564 of /var/www/vhosts/weyarun.org.uk/httpdocs/drupal_demo/sites/default/files/civicrm/ext/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php).

Please can anyone point out what I'm doing wrong, because I don't believe this can be a bug...

eileenmcnaughton commented 5 years ago

@TomCrawshaw are you on drupal 8? I have only ever installed this extension by putting the extension in the extensions directory. It does make sense that the vendor dir from this could be removed if you are otherwise installing those packages

TomCrawshaw commented 5 years ago

Hi Eileen

many thanks for the quick response. No, I’m on Drupal 7.67, CiviCRM 5.15.0. The extension is installed as usual, in the ext directory. I hadn’t spotted that the Omnipay library was included in the extension, but having removed the composer installed version of this (and its dependencies) the result in Civi is still the same. The fact that the extension is not finding methods (e.g. getAmount) suggests something is not being loaded doesn’t it? (I should mention that I am a volunteer amateur “programmer”).

Best wishes to you in lovely Wellington,

Tom Crawshaw Wey & Arun Canal Trust weyarun.org.uk http://weyarun.org.uk/ Guildford, UK

On 12 Aug 2019, at 22:46, Eileen McNaughton notifications@github.com wrote:

@TomCrawshaw https://github.com/TomCrawshaw are you on drupal 8? I have only ever installed this extension by putting the extension in the extensions directory. It does make sense that the vendor dir from this could be removed if you are otherwise installing those packages

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/130?email_source=notifications&email_token=ADRMUTMYKUA5IKQSLJBYNSDQEHK3TA5CNFSM4ILBV4C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4D5QYA#issuecomment-520607840, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRMUTNR4TJJUJV3XV7IKQ3QEHK3TANCNFSM4ILBV4CQ.

eileenmcnaughton commented 5 years ago

getAmount is actually in a core file - https://github.com/civicrm/civicrm-core/blob/f29d38d9a7c94559f8de59281cc9abd6513af159/CRM/Core/Payment.php#L1075 perhaps that file is overriden for some reason? Maybe by another extension?

TomCrawshaw commented 5 years ago

Eileen

many thanks for that pointer - I certainly should have spotted this, as I modified the core program myself some time ago (I know, I know…). Several core revisions later, I will now have to go through this kludge again and find out why I had to modify it originally - I think it was to do with not requiring a State/province in the UK for credit cards.

Best wishes

Tom

On 13 Aug 2019, at 11:25, Eileen McNaughton notifications@github.com wrote:

getAmount is actually in a core file - https://github.com/civicrm/civicrm-core/blob/f29d38d9a7c94559f8de59281cc9abd6513af159/CRM/Core/Payment.php#L1075 https://github.com/civicrm/civicrm-core/blob/f29d38d9a7c94559f8de59281cc9abd6513af159/CRM/Core/Payment.php#L1075 perhaps that file is overriden for some reason? Maybe by another extension?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/130?email_source=notifications&email_token=ADRMUTMQFIGMHP6GYA54YYTQEKDYJA5CNFSM4ILBV4C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FHNKY#issuecomment-520779435, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRMUTKSXVTWHOMXXNUKFKDQEKDYJANCNFSM4ILBV4CQ.

eileenmcnaughton commented 5 years ago

@TomCrawshaw I think it might be possible to change that through buildForm hook & not override core