Hi all!
k, I have an issue with the final step of the payment, using Spreedly integration. I followed the article from here https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api#send-credit-card-information-using-a-third-party-service
And all of the steps are successful, but in step 4 I dont get session ID, at least not explicitly, I tried to use token, but it says that the session_id is invalid. After reading the documentation I see that there is no session_id at all and Im not able to complete the payment.
Im including response.headers with X-Request-ID. I hope you can help me, because Im not sure where is the issue.
Here are logs from each step:
-
Create TEST Spreedly receiver
RESPONSE:
{âreceiverâ: {âcompany_nameâ: âTESTâ, âreceiver_typeâ: âtestâ, âtokenâ: âRKdpFrcEml84x2ehmKPSP8UpWWIâ, âhostnamesâ: âhttps://elb.depos
it.shopifycs.com/â, âstateâ: âretainedâ, âcreated_atâ: â2020-06-16T11:39:37Zâ, âupdated_atâ: â2020-06-16T11:39:37Zâ, âcredentialsâ: No
ne}} -
Send details to shopify PCI storage
I assume that session_id is response[âtransactionâ][âtokenâ], but it didnt work. I know that ID should be present in response object, but its not
RESPONSE:
{âtransactionâ: {âtokenâ: âAuTyoHsbOdcN1XeNpGxZY7gazDKâ, âtransaction_typeâ: âDeliverPaymentMethodâ, âstateâ: âsucceededâ, 'created_at
â: â2020-06-16T11:39:38Zâ, âupdated_atâ: â2020-06-16T11:39:38Zâ, âsucceededâ: True, âmessageâ: âSucceeded!â, âurlâ: âhttps://elb.depos
it.shopifycs.com/sessionsâ, âresponseâ: {âstatusâ: 200, âheadersâ: âServer: Spreedly Echo Server\r\nConnection: close\r\nContent-Lengt
h: 159â, âbodyâ: â{ âpaymentâ: { âcredit_cardâ:{ ânumberâ: â[FILTERED]â, âmonthâ: â3â, âyearâ: â2032â,âverification_valueâ: â423â,âfir
st_nameâ:âJoeâ,âlast_nameâ:âJonesâ}}}â}, âreceiverâ: {âcompany_nameâ: âTESTâ, âreceiver_typeâ: âtestâ, âtokenâ: âRKdpFrcEml84x2ehmKPSP
8UpWWIâ, âhostnamesâ: âhttps://elb.deposit.shopifycs.com/â, âstateâ: âretainedâ, âcreated_atâ: â2020-06-16T11:39:37Zâ, âupdated_atâ: â
2020-06-16T11:39:37Zâ, âcredentialsâ: None}, âpayment_methodâ: {âtokenâ: âCVTeRM6zywaU66Z12hYnnfanAuEâ, âcreated_atâ: â2020-06-16T11:3
9:29Zâ, âupdated_atâ: â2020-06-16T11:39:38Zâ, âemailâ: [email removed] âdataâ: None, âstorage_stateâ: âusedâ, âtestâ: True, âmetad
ataâ: None, âcallback_urlâ: None, âlast_four_digitsâ: â4444â, âfirst_six_digitsâ: â555555â, âcard_typeâ: âmasterâ, âfirst_nameâ: âJoeâ
, âlast_nameâ: âJonesâ, âmonthâ: 3, âyearâ: 2032, âaddress1â: None, âaddress2â: None, âcityâ: None, âstateâ: None, âzipâ: None, âcount
ryâ: None, âphone_numberâ: None, âcompanyâ: None, âfull_nameâ: âJoe Jonesâ, âeligible_for_card_updaterâ: True, âshipping_address1â: No
ne, âshipping_address2â: None, âshipping_cityâ: None, âshipping_stateâ: None, âshipping_zipâ: None, âshipping_countryâ: None, âshippin
g_phone_numberâ: None, âpayment_method_typeâ: âcredit_cardâ, âerrorsâ: , âfingerprintâ: âb5fe350d5135ab64a8f3c1097fadefd9effbâ, âver
ification_valueâ: ââ, ânumberâ: âXXXX-XXXX-XXXX-4444â}}}
RESPONSE HEADER:
{âConnectionâ: âkeep-aliveâ, âContent-Typeâ: 'application/json; charset=utf-8
â, âServerâ: âopenrestyâ, âX-Frame-Optionsâ: âSAMEORIGINâ, âX-XSS-Protectionâ: â1; mode=blockâ, âX-Content-Type-Optionsâ: ânosniffâ, â
ETagâ: âW/â1c33b88b87529b380485817bf94ef227ââ, âCache-Controlâ: âmax-age=0, private, must-revalidateâ, âX-Request-Idâ: âa327f0bf-8492-
48ba-b080-075c2def3a09.core_b44eb2bdf52ed838â, âAccept-Rangesâ: âbytesâ, âDateâ: âTue, 16 Jun 2020 11:39:38 GMTâ, âViaâ: â1.1 varnishâ
, âX-Served-Byâ: âcache-fra19142-FRAâ, âX-Cacheâ: âMISSâ, âX-Cache-Hitsâ: â0â, âX-Timerâ: âS1592307578.435751,VS0,VE430â, âStrict-Tran
sport-Securityâ: âmax-age=31557600â, âtransfer-encodingâ: âchunkedâ}
- Succesfully creating checkout in Shopify:
https://smisklep.myshopify.com/admin/api/2020-04/checkouts.json
INFO 2020-06-16 11:39:41,128 connection 45 140630351705856 â 201 Created 2480b
- Trying to process payment:
BODY IN PROCESS PAYMENT
{âpaymentâ: {ârequest_detailsâ: {âip_addressâ: â172.19.0.1â, âaccept_languageâ: âenâ, âuser_agentâ: âPostmanRuntime/7.20.1â}, âamountâ: â99.00â, âsession_idâ: âAuTyoHsbOdcN1XeNpGxZY7gazDKâ, âunique_tokenâ: âc3e474fe-4f13-4d44-ae9b-951a4d8bce5eâ
}}
RESPONSE:
{âerrorsâ: {âsession_idâ: [{âcodeâ: âinvalidâ, âmessageâ: âis invalidâ, âoptionsâ: {}}]}}
RESPONSE HEADERS:
{âDateâ: âTue, 16 Jun 2020 11:39:41 GMTâ, âC
ontent-Typeâ: âapplication/json; charset=utf-8â, âTransfer-Encodingâ: âchunkedâ, âConnectionâ: âkeep-aliveâ, âSet-Cookieâ: '__cfduid=d
6e5021a5eb2570b1d22b5f1fb18c2aed1592307581; expires=Thu, 16-Jul-20 11:39:41 GMT; path=/; domain=.myshopify.com; HttpOnly; SameSite=Lax
', âX-Sorting-Hat-PodIdâ: â160â, âX-Sorting-Hat-ShopIdâ: â40129527969â, âReferrer-Policyâ: âorigin-when-cross-originâ, âX-Frame-Option
sâ: âDENYâ, âX-ShopIdâ: â40129527969â, âX-ShardIdâ: â160â, âX-Stats-UserIdâ: ââ, âX-Stats-ApiClientIdâ: â3905589â, âX-Stats-ApiPermiss
ionIdâ: â253829120161â, âX-Shopify-API-Versionâ: â2020-04â, âStrict-Transport-Securityâ: âmax-age=7889238â, âX-Request-Idâ: â3f9c24ac-
a741-4df5-8576-e2910805e585â, âX-Shopify-Stageâ: âproductionâ, âContent-Security-Policyâ: âdefault-src âselfâ data: blob: âunsafe-inli
neâ âunsafe-evalâ https://* shopify-pos://; block-all-mixed-content; child-src âselfâ https:// shopify-pos://; connect-src âselfâ w
ss:// https://*; frame-ancestors ânoneâ; img-src âselfâ data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn
.net https://cdn.shopify.cn https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net https://api.stripe.co
m https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com
https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.
com âselfâ âunsafe-inlineâ âunsafe-evalâ; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=create&source%5Bapp%5D=
Shopify&source%5Bcontroller%5D=admin%2Fcheckouts%2Fpayments&source%5Bsection%5D=admin_api&source%5Buuid%5D=3f9c24ac-a741-4df5-8576-e29
10805e585â, âX-Content-Type-Optionsâ: ânosniffâ, âX-Download-Optionsâ: ânoopenâ, âX-Permitted-Cross-Domain-Policiesâ: ânoneâ, âX-XSS-P
rotectionâ: â1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fchecko
uts%2Fpayments&source%5Bsection%5D=admin_api&source%5Buuid%5D=3f9c24ac-a741-4df5-8576-e2910805e585â, âX-Dcâ: âgcp-us-east1,gcp-us-east
1â, âCF-Cache-Statusâ: âDYNAMICâ, âcf-request-idâ: â035e8698ff0000c26d8c10c200000001â, âExpect-CTâ: âmax-age=604800, report-uri=âhttps
://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ctââ, âServerâ: âcloudflareâ, âCF-RAYâ: â5a44406e6c8fc26d-FRAâ, âalt-svcâ: âh3-27="
:443"; ma=86400â}
Waiting for your response!
Ewelina