Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jil can't serialize this string #337

Open
r3faat1 opened this issue Jan 4, 2020 · 0 comments
Open

Jil can't serialize this string #337

r3faat1 opened this issue Jan 4, 2020 · 0 comments

Comments

@r3faat1
Copy link

r3faat1 commented Jan 4, 2020

Jil can't serialize this string:

{"id":"1MX09991P76703211","status":"COMPLETED","intent":"CAPTURE","gross_total_amount":{"value":"39.99","currency":"USD"},"purchase_units":[{"description":"xxx System Utilities Premiere.","amount":{"currency":"USD","total":"39.99"},"payee":{"email":"[email protected]","payee_display_metadata":{}},"items":[{"name":"xxx","sku":"system_utilities","description":"System Utilities Premiere","price":"39.99","currency":"USD","quantity":1}],"shipping_address":{"recipient_name":"test buyer","line1":"1 Main St","city":"San Jose","country_code":"US","postal_code":"95131","state":"CA","type":"HOME_OR_WORK"},"payment_summary":{"captures":[{"id":"8XY540244N4008442","amount":{"currency":"USD","details":{},"total":"39.99"},"status":"COMPLETED","transaction_fee":{"value":"1.46","currency":"USD"},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","create_time":"2020-01-04T20:22:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/capture/8XY540244N4008442","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/capture/8XY540244N4008442/refund","rel":"refund","method":"POST"}]}]},"status":"CAPTURED"}],"payment_details":{"payment_id":"PAYID-LYIPHWA4F595421XN846133F"},"payer_info":{"email":"[email protected]","first_name":"test","last_name":"buyer","payer_id":"F969UESWLW5V4","phone":"408-370-8593","phone_type":"HOME","country_code":"US","shipping_address":{"recipient_name":"test buyer","line1":"1 Main St","city":"San Jose","country_code":"US","postal_code":"95131","state":"CA","type":"HOME_OR_WORK"}},"metadata":{"supplementary_data":[{"name":"risk_correlation_id","value":"EC-1MX09991P76703211"},{"name":"buyer_ipaddress","value":"75.167.162.25"},{"name":"external_channel","value":"WEB"}]},"redirect_urls":{"return_url":"https://www.paypal.com/checkoutnow/error?paymentId=PAYID-LYIPHWA4F595421XN846133F","cancel_url":"https://www.paypal.com/checkoutnow/error"},"links":[{"href":"https://api.sandbox.paypal.com/v1/checkout/orders/1MX09991P76703211","rel":"self","method":"GET"}],"create_time":"2020-01-04T20:21:43Z","update_time":"2020-01-04T20:22:25Z"}

Here it is straight from Visual Studio:

"{\"id\":\"1MX09991P76703211\",\"status\":\"COMPLETED\",\"intent\":\"CAPTURE\",\"gross_total_amount\":{\"value\":\"39.99\",\"currency\":\"USD\"},\"purchase_units\":[{\"description\":\"xxx System Utilities Premiere.\",\"amount\":{\"currency\":\"USD\",\"total\":\"39.99\"},\"payee\":{\"email\":\"[email protected]\",\"payee_display_metadata\":{}},\"items\":[{\"name\":\"xxx\",\"sku\":\"system_utilities\",\"description\":\"System Utilities Premiere\",\"price\":\"39.99\",\"currency\":\"USD\",\"quantity\":1}],\"shipping_address\":{\"recipient_name\":\"test buyer\",\"line1\":\"1 Main St\",\"city\":\"San Jose\",\"country_code\":\"US\",\"postal_code\":\"95131\",\"state\":\"CA\",\"type\":\"HOME_OR_WORK\"},\"payment_summary\":{\"captures\":[{\"id\":\"8XY540244N4008442\",\"amount\":{\"currency\":\"USD\",\"details\":{},\"total\":\"39.99\"},\"status\":\"COMPLETED\",\"transaction_fee\":{\"value\":\"1.46\",\"currency\":\"USD\"},\"payment_mode\":\"INSTANT_TRANSFER\",\"protection_eligibility\":\"ELIGIBLE\",\"pro
tection_eligibility_type\":\"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE\",\"create_time\":\"2020-01-04T20:22:25Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/8XY540244N4008442\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/8XY540244N4008442/refund\",\"rel\":\"refund\",\"method\":\"POST\"}]}]},\"status\":\"CAPTURED\"}],\"payment_details\":{\"payment_id\":\"PAYID-LYIPHWA4F595421XN846133F\"},\"payer_info\":{\"email\":\"[email protected]\",\"first_name\":\"test\",\"last_name\":\"buyer\",\"payer_id\":\"F969UESWLW5V4\",\"phone\":\"408-370-8593\",\"phone_type\":\"HOME\",\"country_code\":\"US\",\"shipping_address\":{\"recipient_name\":\"test buyer\",\"line1\":\"1 Main St\",\"city\":\"San Jose\",\"country_code\":\"US\",\"postal_code\":\"95131\",\"state\":\"CA\",\"type\":\"HOME_OR_WORK\"}},\"metadata\":{\"supplementary_data\":[{\"name\":\"risk_correlation_id\",\"value\":\"EC-1MX09991P76703211\"},{\"name\":\"buyer_ipad
dress\",\"value\":\"75.167.162.25\"},{\"name\":\"external_channel\",\"value\":\"WEB\"}]},\"redirect_urls\":{\"return_url\":\"https://www.paypal.com/checkoutnow/error?paymentId=PAYID-LYIPHWA4F595421XN846133F\",\"cancel_url\":\"https://www.paypal.com/checkoutnow/error\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/checkout/orders/1MX09991P76703211\",\"rel\":\"self\",\"method\":\"GET\"}],\"create_time\":\"2020-01-04T20:21:43Z\",\"update_time\":\"2020-01-04T20:22:25Z\"}"

Exception Thrown: Jil.DeserializationException: 'Expected character: '\''

Update: Another issue trying to serialize stripe payment result. "Paid" should have been true, but came back as "False". No exception thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant