I'm trying to integrate Cyber Source Payment gateway in php using REST API. And I found following reference link in github
After required changes finally I can able to login (Authenticate) to Cyber source but, Im getting below error. (I can check the logs from Cyber Source)
req_reference_number: 474 => ERROR 101 - Request parameters are invalid or missing
signed: true
Array
(
[auth_trans_ref_no] => 474
[decision] => ERROR
[message] => Request parameters are invalid or missing
[reason_code] => 101
[req_access_key] => 5e00e27842d73381b0**************
[req_amount] => 569
[req_bill_to_address_city] => Mountain View
[req_bill_to_address_country] => US
[req_bill_to_address_line1] => 1 My Apartment
[req_bill_to_address_line2] => 2 nd street
[req_bill_to_address_postal_code] => 94043
[req_bill_to_address_state] => CA
[req_bill_to_email] => someemail@somedomain.com
[req_bill_to_forename] => Elavarasan
[req_bill_to_phone] => 6508764564
[req_bill_to_surname] => Natarajan
[req_currency] => USD
[req_customer_ip_address] => 127.0.0.1
[req_device_fingerprint_id] => v1rh0p44gpnhag1a7mfp9tst25
[req_item_0_code] => KFLTFDIV
[req_item_0_name] => KFLTFDIV
[req_item_0_quantity] => 1
[req_item_0_sku] => sku001
[req_item_0_unit_price] => 20.00
[req_item_1_code] => KFLTFD70
[req_item_1_name] => KFLTFD70
[req_item_1_quantity] => 1
[req_item_1_sku] => sku002
[req_item_1_unit_price] => 10.00
[req_line_item_count] => 2
[req_locale] => en-us
[req_merchant_defined_data1] => MDD1
[req_merchant_defined_data2] => MDD2
[req_merchant_defined_data3] => MDD3
[req_merchant_defined_data4] => MDD4
[req_merchant_descriptor] => Krungsri
[req_override_custom_cancel_page] => http://localhost/cyphp/sa-wm/response.php
[req_override_custom_receipt_page] => http://localhost/cyphp/sa-wm/response.php
[req_profile_id] => *******************************
[req_reference_number] => 474
[req_transaction_type] => sale
[req_transaction_uuid] => 5aa6329409169
[required_fields] => payment_method
[signature] => IJ0iEsOJLZe2W4dNrogdzp8op8Evon2wU1KvA3W6SzM=
[signed_date_time] => 2018-03-12T07:57:00Z
[signed_field_names] => decision,req_access_key,req_profile_id,req_transaction_uuid,req_transaction_type,req_reference_number,req_amount,req_currency,req_line_item_count,req_locale,req_override_custom_receipt_page,req_override_custom_cancel_page,auth_trans_ref_no,req_item_0_code,req_item_0_name,req_item_0_quantity,req_item_0_sku,req_item_0_unit_price,req_item_1_code,req_item_1_name,req_item_1_quantity,req_item_1_sku,req_item_1_unit_price,req_bill_to_forename,req_bill_to_surname,req_bill_to_email,req_bill_to_phone,req_bill_to_address_line1,req_bill_to_address_line2,req_bill_to_address_city,req_bill_to_address_state,req_bill_to_address_country,req_bill_to_address_postal_code,req_customer_ip_address,req_device_fingerprint_id,req_merchant_defined_data1,req_merchant_defined_data2,req_merchant_defined_data3,req_merchant_defined_data4,req_merchant_descriptor,required_fields,reason_code,message,signed_field_names,signed_date_time
[utf8] => ✓
)
If I rename or remove any parameter, then authentication is failed. So I hope that, I'm passing some wrong value. But I couldn't find out which one is..
I tried to change almost every field values which I'm passing, but every time getting same error
ERROR 101 - Request parameters are invalid or missing
Finally I found sample code (php) from Cyber Source, we just have to configure as per the credential. Here is the link
You have to define you Secret key in security.php
file
define ('SECRET_KEY', '7f15d699ff14461b9a84*****');
And,
access_key
and profile_id
in signeddatafields.php
file
<input type="hidden" name="access_key" value="5e00e27842d73******">
<input type="hidden" name="profile_id" value="43C533AC-****-****-****-*********">
That's it.