cancel
Showing results for 
Search instead for 
Did you mean: 

How to get missing fields from cybersource reply using SOAP toolkit?

I'm working with Cybersource SOAP toolkit API. I'm getting response as "Required fields missing" for my transaction request . How can I get the names of missing fields from Cybersource reply? I know there is a array of strings named 'missingFiled'. But missingFields[0] gives me value 'c:item[0]'

JohnSonandrla
Member
1 REPLY 1

I believe you need to enable name-value-pairs in order to provide fields using _ for nesting (e.g: recurringSubscriptionInfo_subscriptionID), when I changed your code to use XML payloads it worked:

 

// ...
$ccAuthService = new stdClass();
$ccAuthService->run = 'true';
$request->ccAuthService = $ccAuthService;

$ccCaptureService = new stdClass();
$ccCaptureService->run = 'true';
$request->ccCaptureService = $ccCaptureService;

$request->merchantID = '<my merchant id>';
$request->merchantReferenceCode = uniqid();

$recurringSubscriptionInfo = new stdClass();
$recurringSubscriptionInfo->subscriptionID = '<my subscription token>';
$request->recurringSubscriptionInfo = $recurringSubscriptionInfo;

$purchaseTotals = new stdClass();
$purchaseTotals->currency = 'USD';
$purchaseTotals->grandTotalAmount = '100';
$request->purchaseTotals = $purchaseTotals;
// ...

https://discuss.overhang.io/t/have-you-configured-cybersource-in-liliac/2170  /omeglz

 

JamesHimmerla
Member