json API does not return process link for gateway payment (Stripe)

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
HADA
Posts: 5
Joined: 13 Apr 2021, 15:46

json API does not return process link for gateway payment (Stripe)

Post by HADA » 13 Apr 2021, 15:54

Hi aimeos,

I'm working with aimeos on laravel for a big project, i'm first testing the api to see how we will manage things.

Everything looks fine, but i have a small issue after creating order invoice. The response does not contain process link to proceed the payment or (gateway redirection)

Code: Select all

 {
    "meta": {
        "total": 1,
        "prefix": null,
        "content-baseurl": "http://aimeos.localhost",
        "csrf": {
            "name": "_token",
            "value": "PAC8hnfmOfIs8g1v2lTiqXYl52e8RQ6pTPL06OMU"
        }
    },
    "links": {
        "self": "http://aimeos.localhost/jsonapi/order"
    },
    "data": {
        "id": "20",
        "type": "order",
        "links": {
            "self": {
                "href": "http://aimeos.localhost/jsonapi/order?id=20",
                "allow": [
                    "GET"
                ]
            },
            "process": {
                "href": "",
                "allow": [
                    "POST"
                ],
                "meta": {
                    "paymenttoken": {
                        "code": "paymenttoken",
                        "type": "string",
                        "label": "Authentication token",
                        "public": false,
                        "default": "",
                        "required": true
                    },
                    "payment.cardno": {
                        "code": "payment.cardno",
                        "type": "container",
                        "label": "Credit card number",
                        "public": true,
                        "default": "",
                        "required": false
                    },
                    "payment.expiry": {
                        "code": "payment.expiry",
                        "type": "container",
                        "label": "Expiry",
                        "public": true,
                        "default": "",
                        "required": false
                    },
                    "payment.cvv": {
                        "code": "payment.cvv",
                        "type": "container",
                        "label": "Verification number",
                        "public": true,
                        "default": "",
                        "required": false
                    }
                }
            }
        },
        "attributes": {
            "order.id": "20",
            "order.type": "jsonapi",
            "order.statusdelivery": -1,
            "order.statuspayment": -1,
            "order.datepayment": null,
            "order.datedelivery": null,
            "order.relatedid": null
        },
        "relationships": {}
    },
    "included": []
}
I'm using Stripe by the way, configured and tested from the front interface, and it works fine.

Is there someway i could solve this or it's json api does not manage stripe yet (aimeos 2021.04)

Thank you

User avatar
aimeos
Administrator
Posts: 7918
Joined: 01 Jan 1970, 00:00

Re: json API does not return process link for gateway payment (Stripe)

Post by aimeos » 15 Apr 2021, 06:50

Stripe implements CC handling using their Javascript library, which creates the form, sends the data to their servers and returns a token for the payment. Thus, there's no redirect to the Stripe server at all for the customer.

If you want to build a PWA, you have to add Stripe JS and implement calling the Stripe JS methods in the frontend yourself.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply