Categories
User Help

How to remove white space after parsing from JSON with sed

How can I remove any white space if any after parsing from JSON? whereami -r Parse result without sed. { "ip": "95.16.15.10", "country_code": "US", "country_name": "United States", "region_code": "NY", "region_name": "New York", "city": "The Bronx", "zip_code": "10473", "time_zone": "America/New_York", "latitude": 40.822, "longitude": -73.86, "metro_code": 501 } Working one but with space. whereami -r | sed […]

Categories
CMS Magento Mastering Development

How to pass the card details for the Magento API [POST]: V1/carts/mine/payment-information for the payment method stripe_payments_checkout_card

I have an iOS native app which communicates through Magento Rest APIs with my Magento Store, I would like to know how to pass the card details (Token, CVV, Exp Year, Exp Month, Last 4) in JSON format for the payment method "method":"stripe_payments_checkout_card" in the Magento API: [POST] V1/carts/mine/payment-information Note: I use the Stripe Official […]

Categories
CMS Magento Mastering Development

No such entity cartId when send POST on /rest/default/V1/carts/mine/payment-information

According to documentation – https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-order.html I’m trying to make call on /rest/default/V1/carts/mine/payment-information with body: { "paymentMethod": { "method": "stripe_payments" }, "billing_address": { "email": "jdoe@example.com", "region": "New York", "region_id": 43, "region_code": "NY", "country_id": "US", "street": [ "123 Oak Ave" ], "postcode": "10577", "city": "Purchase", "telephone": "512-555-1111", "firstname": "Jane", "lastname": "Doe" } } and getting error: { […]

Categories
CMS Magento Mastering Development

Error when trying to add an order via the API

The url for shipping is: V1/guest-carts//payment-information https://store.upc.tax/rest/default/V1/guest-carts/5Shn4DiClYehFeJpq0lzwGy78O4e5I7h/payment-information I try to add a purchase order with a guest cart, it throws the following error: { "message": "\"%fieldName\" is required. Enter and try again.", "parameters": { "fieldName": "email" } } The json that I send is composed as follows: { "paymentMethod": { "method": "banktransfer" }, "billing_address": { […]