circleinteractive / uk.co.circleinteractive.payment.sagepay

Sagepay Extension for CiviCRM
4 stars 12 forks source link

"Missing name field(s)." error when submitting contribution on behalf of organisation #23

Open PJKerrigan opened 6 years ago

PJKerrigan commented 6 years ago

I am running Drupal 7.52 with CiviCRM 4.7.30 and version 4.0.0 of the sagepay extension.

The contribution page I am using allows submission on behalf of an organisation. This causes this error:

"Missing name field(s).

I have added a few lines to hack around this with the following:

if ($contact['contact_type'] != 'Individual') { $cid = CRM_Core_Session::singleton()->getLoggedInContactID(); $contact = civicrm_api3("Contact", "getsingle", [ 'version' => '3', 'contact_id' => $cid ]); }

Another error occurred after this:

3013 : The Description is missing

I have hard-coded the item description for this particular site, but could you suggest how to fix it?

The contribution page now takes me to SagePay to enter my card details, but as I don't currently have any test details I can't actually test it right now. I'll post an update when I get the chance to!

Thanks.

stuart897 commented 6 years ago

Sage Pay provide test credit card numbers on their site: https://www.sagepay.co.uk/support/12/36/test-card-details-for-your-test-transactions

PJKerrigan commented 6 years ago

A colleague linked me to those and they weren't working. I just lowered the price on my end and sent a very small payment. It worked. 👍