Error from the basic sample code on Visa Offers enroll customer sample code & documentation

devel_oapis1
Newbie

Error from the basic sample code on Visa Offers enroll customer sample code & documentation

Hi, am trying to run the simple demo code below and getting errors as follows:

https://developer.visa.com/products/vop/reference#vop__customer__v1__enroll_customer

// Body

{
  "authenticationDetails": {
    "communityCode": "SANDBOX",
    "userKey": "6505551121"
  },
  "cardDetails": {
    "cardInfoRequest": {
      "billingZipCode": "94404",
      "cardNumber": "4321114156363001",
      "expirationMonth": "12",
      "expirationYear": "2017"
    }
  },
  "cardHolderDetails": {
    "externalUserId": "6505551121",
    "firstName": "ritesh",
    "lastName": "LastName"
  },
  "communityTermsVersion": "1",
  "userPreferences": {
    "languageId": "en-US",
    "timeZoneId": "PST"
  }
}

 

 

using soap ui, with a visa offers sample app created and those credentials successfully executing the Getting started guide soap UI helloworld code to get the time stamp.  Having successfully authenticated against the vdp with those credentials from my sample visa offers app, i then try to create a soap ui rest call in the same way as the helloworld successfull call was setup and get the following response error:

 

{"referenceId":"26ee6c8d-3ad8-4d5f-a31c-3af1bba209a8","errors":[{"errorCode":"1010","errorMessage":"Unauthorized Exception"}],"enrollmentRecord":{"cardDetails":{"cardInfoResponse":{"cardId":"bdbdf5f6-7851-481e-890e-7773601fb52a","cardLast4":"3001","cardStatus":"New","productId":"","productIdDescription":"","productTypeCategory":"","serviceKey":""}},"cardHolderDetails":{"enrolledDate":"2016-08-31","externalUserId":"6505551122","firstName":"ritesh","isDeleted":"false","isEmailPreferred":"false","isSmsPreferred":"false","lastName":"LastName","membershipNumber":"","promoCode":"","referrerId":""},"communityCode":"SANDBOX","communityTermsVersion":"1","userKey":"6505551122","userPreferences":{"languageId":"en-US","timeZoneId":"PST"}},"success":false}

 

 

HTTP/1.1 400 Bad Request
X-SERVED-BY: l73c035m
X-SERVED-BY: l73c001m
X-CORRELATION-ID: 1482300519_030_82_l73c035m_ARM
X-APP-STATUS: 400
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0 ,Thu, 01 Jan 1970 00:00:00 GMT
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=2592000;includeSubdomains
Content-Security-Policy-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-Content-Security-Policy-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-WebKit-CSP-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
Content-Type: text/plain;charset=ISO-8859-1
Content-Language: en-US
Content-Length: 753
X-Cnection: close
Date: Wed, 21 Dec 2016 06:08:39 GMT
Connection: close

{"referenceId":"26ee6c8d-3ad8-4d5f-a31c-3af1bba209a8","errors":[{"errorCode":"1010","errorMessage":"Unauthorized Exception"}],"enrollmentRecord":{"cardDetails":{"cardInfoResponse":{"cardId":"bdbdf5f6-7851-481e-890e-7773601fb52a","cardLast4":"3001","cardStatus":"New","productId":"","productIdDescription":"","productTypeCategory":"","serviceKey":""}},"cardHolderDetails":{"enrolledDate":"2016-08-31","externalUserId":"6505551122","firstName":"ritesh","isDeleted":"false","isEmailPreferred":"false","isSmsPreferred":"false","lastName":"LastName","membershipNumber":"","promoCode":"","referrerId":""},"communityCode":"SANDBOX","communityTermsVersion":"1","userKey":"6505551122","userPreferences":{"languageId":"en-US","timeZoneId":"PST"}},"success":false}

 

2 REPLIES 2
ricardo_visa
Community Scholar

Re: Error from the basic sample code on Visa Offers enroll customer sample code & documentation

Hi devel, 

 

Looking into this for you. Will get back to you shortly. 

 

Thank you for the message. 

 

-Ricardo




Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
ricardo_visa
Community Scholar

Re: Error from the basic sample code on Visa Offers enroll customer sample code & documentation

Hi devel, 

 

For VOP runtime call you need to do Onboard Merchant call first and then do the Enroll customer call.

 

If you create a VOP app and do the Enroll Customer call first, you get the mentioned error message.

 

Hope this helps. 

 

-Ricardo




Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.