CyberSource / cybersource-rest-client-node

NodeJS client library for the CyberSource REST API
Other
43 stars 46 forks source link

How do you use this client with apple pay #23

Open velevtzvetlin opened 5 years ago

velevtzvetlin commented 5 years ago

Having trouble hitting sandbox with payload coming back from apple pay { "processingInformation": { "paymentSolution": "001" }, "paymentInformation": { "fluidData": { "key": "eDDCAGL+IF4WMzsap7Phtvm1DImIO3jIgfXouz2KqUwe4IaAhn18u69A6rgSFMg2vmuNRW8PjFAiiWVPZogGHKg9V+Ln7qaYeaLc+f5esM10U8m6UcpsM+zJyW5iyj4dsFAbpEUxeDew+s/DNY6GfHxbgL2yLjkWvAvKhSh0e2TK1cRYesu2i0fneGxtMeksv7Q7KULhHWHNc79oV8KY80iEk+yF2Uw5QbD24pb+okbQGWzHiQ52V/D2IiCDkSeCDIlsX46luThpUBYjkELQB/3OzevZ81GtgJ845Ez10vQregRodMvj9noMpi60KrOSLPY8wGTkSIlqo9cH33NyOQ6SXrE893qPXqEnP9AtmquyDi994nNFyQxbrp+nUa9XWgpd2tcS0H9xOJfxRUgVBRiG2XwgVFL/aI3vyYnHLQ==" } } }

snavinch commented 5 years ago

Can you give us the following details-

velevtzvetlin commented 5 years ago

Modified Process Payment with custom parameters in cybersource-rest-client-samples repo

... const RunEnvironment = 'cybersource.environment.SANDBOX'; ... ` var configObject = new configuration(); var instance = new cybersourceRestApi.PaymentsApi(configObject);

    var clientReferenceInformation = new cybersourceRestApi.Ptsv2paymentsClientReferenceInformation();
    clientReferenceInformation.code = 'test_payment';
    var paymentInformation = new cybersourceRestApi.Ptsv2paymentsPaymentInformation();
    var fluidData = new cybersourceRestApi.Ptsv2paymentsPaymentInformationFluidData();
    fluidData.key = "eDDCAGL+IF4WMzsap7Phtvm1DImIO3jIgfXouz2KqUwe4IaAhn18u69A6rgSFMg2vmuNRW8PjFAiiWVPZogGHKg9V+Ln7qaYeaLc+f5esM10U8m6UcpsM+zJyW5iyj4dsFAbpEUxeDew+s/DNY6GfHxbgL2yLjkWvAvKhSh0e2TK1cRYesu2i0fneGxtMeksv7Q7KULhHWHNc79oV8KY80iEk+yF2Uw5QbD24pb+okbQGWzHiQ52V/D2IiCDkSeCDIlsX46luThpUBYjkELQB/3OzevZ81GtgJ845Ez10vQregRodMvj9noMpi60KrOSLPY8wGTkSIlqo9cH33NyOQ6SXrE893qPXqEnP9AtmquyDi994nNFyQxbrp+nUa9XWgpd2tcS0H9xOJfxRUgVBRiG2XwgVFL/aI3vyYnHLQ==";
    fluidData.descriptor = 'RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U';
    fluidData.encoding = 'Base64';
    paymentInformation.fluidData = fluidData;
    var processingInformation = new cybersourceRestApi.Ptsv2paymentsProcessingInformation();
    processingInformation.paymentSolution = '001';

    var request = new cybersourceRestApi.CreatePaymentRequest();
    request.processingInformation = processingInformation;
    request.paymentInformation = paymentInformation;`

Response: \"status\":\"INVALID_REQUEST\",\"reason\":\"MISSING_FIELD\",\"message\":\"Declined - The request is missing one or more fields\",\"details\":[{\"field\":\"orderInformation.billTo.locality\",\"reason\":\"MISSING_FIELD\"},{\"field\":\"paymentInformation.tokenizedCard.number\",\"reason\":\"MISSING_FIELD\"},{\"field\":\"orderInformation.billTo.lastName\",\"reason\":\"MISSING_FIELD\"},{\"field\":\"orderInformation.billTo.email\",\"reason\":\"MISSING_FIELD\"},{\"field\":\"orderInformation.billTo.address1\",\"reason\":\"MISSING_FIELD\"},{\"field\":\"orderInformation.billTo.country\",\"reason\":\"MISSING_FIELD\"}]

velevtzvetlin commented 5 years ago

Same issue when hitting apitest.cybersource.com/pts/v2/payments/ via postman with { "processingInformation": { "paymentSolution": "001" }, "paymentInformation": { "fluidData": { "key": "eDDCAGL+IF4WMzsap7Phtvm1DImIO3jIgfXouz2KqUwe4IaAhn18u69A6rgSFMg2vmuNRW8PjFAiiWVPZogGHKg9V+Ln7qaYeaLc+f5esM10U8m6UcpsM+zJyW5iyj4dsFAbpEUxeDew+s/DNY6GfHxbgL2yLjkWvAvKhSh0e2TK1cRYesu2i0fneGxtMeksv7Q7KULhHWHNc79oV8KY80iEk+yF2Uw5QbD24pb+okbQGWzHiQ52V/D2IiCDkSeCDIlsX46luThpUBYjkELQB/3OzevZ81GtgJ845Ez10vQregRodMvj9noMpi60KrOSLPY8wGTkSIlqo9cH33NyOQ6SXrE893qPXqEnP9AtmquyDi994nNFyQxbrp+nUa9XWgpd2tcS0H9xOJfxRUgVBRiG2XwgVFL/aI3vyYnHLQ==", "descriptor": "RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U", "encoding": "Base64" } } }

Paulentin commented 1 year ago

Is this being resolved? is there documentation of the exact example of how the request should be sent?

faced documentation these sources

but none of them work

receiving invalid request

Looking for documentation of the request with Cybersource decryption