solidusio / solidus_affirm

Affirm payment option for your Solidus storefront
BSD 3-Clause "New" or "Revised" License
6 stars 17 forks source link

Getting must be valid amount response message from Affirm #76

Open sandeep18051989 opened 1 year ago

sandeep18051989 commented 1 year ago

I am working on an Affirm payment method integration. Sending checkut object to Affirm, but getting an error message: { "status_code": 400, "type": "invalid_request", "message": "Invalid Request: Must be valid Amount" }

Given below is the checkout object I am sending with public API key as well: { "merchant": { "user_confirmation_url": "http://localhost/Able9B6750Test3/Affirm/Confirm", "user_cancel_url": "http://localhost/Able9B6750Test3/Checkout/Payment", "public_api_key": "ABCDEFGHI", "user_confirmation_url_action": "GET", "name": "W2M.Affirm" }, "shipping": { "name": { "first": "Market", "last": "aa" }, "address": { "line1": "5628 W 120TH ST", "line2": "", "city": "ALSIP", "state": "IL", "zipcode": "60803-3410", "country": "United States" }, "phone_number": "1-888-128-3772", "email": "admin@gmail.com" }, "billing": { "name": { "first": "Web2Market", "last": "Web2Market" }, "address": { "line1": "5628 W 120TH ST", "line2": "", "city": "ALSIP", "state": "IL", "zipcode": "60803-2210", "country": "United States" }, "phone_number": "1-888-968-3772", "email": "skumar@web2market.com" }, "items": [ { "display_name": "Prima Chain Lock (66\", Heavy Duty); Universal", "sku": "0300-0103 ", "unit_price": 101, "qty": 1, "item_image_url": "http://localhost/Able9B6750Test3/Assets/ProductImages/0300-0103.jpg", "item_url": "http://localhost/Able9B6750Test3/Abandoned-Products/Prima-Chain-Lock-66-Heavy-Duty-Universal", "categories": [ [ "Springs" ] ] } ], "discounts": null, "metadata": { "shipping_type": "Free Shipping", "mode": "redirect" }, "order_id": "6260588", "currency": "USD", "financing_program": "", "shipping_amount": 0, "tax_amount": 10, "total": 111 }

Also, checkout oubject is being build while I am on payment page and it has orderID and OrderNumber required. But, Order is not yet generated on my ecommerce website. What should I do ?