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

Sagepay\Server #182

Closed
dathwa opened this issue Apr 15, 2022 · 1 comment
Closed

Sagepay\Server #182

dathwa opened this issue Apr 15, 2022 · 1 comment

Comments

@dathwa
Copy link

dathwa commented Apr 15, 2022

Hello.
Protocol 4 enabled for sagepay - "omnipay/sagepay": "^4.0",

Getting this error back after posting to Server...
3120 : The DeliveryFirstnames field is required.

But my card object is initialised like so below...
Anyone see what the problem might be?
I can't see any reference to 'DeliveryFirstnames 'in the omnipay code.

$card = new CreditCard([
    // 'firstName' => $customer->firstname,
    // 'lastName' => $customer->lastname,
    'billingFirstName' => $customer->firstname,
    'billingLastName' => $customer->lastname,
    'billingAddress1' => isset($billingData[0]) ? $billingData[0]: '',
    'billingAddress2' => isset($billingData[1]) ? $billingData[1]: '',
    'billingAddress3' => isset($billingData[2]) ? $billingData[2]: '',
    'billingCity' => $billing->city,
    'billingPostcode' => $billing->zip,
    'billingCountry' => $billing->country->code, // 'GB',
    // 'billingPhone' => '01234 567 890',
    'email' =>  $customer->user->email,
    // 'shippingFirstnames' => $customer->firstname,
    // 'shippingFirstNames' => $customer->firstname,
    // 'ShippingFirstnames' => $customer->firstname,
    // 'ShippingFirstNames' => $customer->firstname,
    // 'deliveryFirstnames' => $customer->firstname,
    'DeliveryFirstnames' => $customer->firstname,
    // 'deliveryfirstnames' => $customer->firstname,
    // 'deliveryFirstNames' => $customer->firstname,
    // 'DeliveryFirstNames' => $customer->firstname,

    // 'DeliveryAddress1' => $shippingData[0],
    // 'DeliveryAddress2' => $shippingData[1],
    // 'DeliveryAddress3' => $shippingData[2],
    // 'DeliveryCity' => $shipping->city,
    // 'DeliveryPostCode' => $shipping->zip,
    // 'DeliveryCountry' => $shipping->country->code,

    // 'shippingFirstnames' => $customer->firstname,
    'shippingAddress1' => isset($shippingData[0])? $shippingData[0]: '',
    'shippingAddress2' => isset($shippingData[1])? $shippingData[1]: '',
    'shippingAddress3' => isset($shippingData[2])? $shippingData[2]: '',
    'shippingCity' => $shipping->city,
    'shippingPostcode' => $shipping->zip,
    'shippingCountry' => $shipping->country->code,
    // 'shippingCountry' => 'GB', // this passes!!!!!!!!!!!!!!
    // 'deliveryAddress1' => $shippingData[0],
    // 'deliveryAddress2' => $shippingData[1],
    // 'deliveryAddress3' => $shippingData[2],
    // 'deliveryCity' => $shipping->city,
    // 'deliveryPostCode' => $shipping->zip,
    // // 'deliveryCountry' => $shipping->country->code,
    // 'deliveryCountry' => 'GB',
    // 'DeliveryCountry' => 'GB',
    // 'billingForShipping' => true,
    // 'billingForDelivery' => true,
    // 'shippingPhone' => '01234 567 890 SS',
    // 'number' => $sagepayCardNumber,
    // 'expiryMonth' => $sagepayExpirationMonth, // 2 digits
    // 'expiryYear' => $sagepayExpirationYear, // 4 digits
    // 'CVV' => $sagepayCVC, // 3 digits
    // 'iframe' => true,
    'clientIp' => request()->ip(), // this worked for protocol 3
]);
@dathwa
Copy link
Author

dathwa commented Apr 25, 2022

This was just a case of confusing error message.
"shippingFirstName" works.

@dathwa dathwa closed this as completed Apr 25, 2022
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

1 participant