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

As a developer I'd like for the GraphQL implementation to be completely headless so a visitor never visits any Magento backend URL. #4

Open
paales opened this issue Apr 13, 2022 · 5 comments

Comments

@paales
Copy link

paales commented Apr 13, 2022

Just talked with Sylvester de Vries about possible improvements to the GraphQL setup. We're developing a PWA solution for Magento 2 called GraphCommerce.

We currently have a customer that is scheduled to be released in the coming months and wil use MultiSafePay's GraphQL implementation. The goal is that the module runs completely in a headless mode and a visitor will never touch a Magento URL directly, all communication should happen via GraphQL.

I've taken a look at the GraphQL schema and it seems to be 90% the way there, so that is great! We've got a few feature requests:

1. As a developer I’d like to give a return URL when placing an order, so that we can easily work with theayment gateway without having to configure frontend URL’s.

input PlaceOrderInput {
    multisafepay_return_url: String @doc(description: "Optionally send a URL where the visitor is returned after completing the MultiSafePay order, the URL should be in the format of `http://mydomain.com/my/path?mykey={{transaction_id}}`")
}

2. As a developer I’d like to be able to process the transaction for a customer via GraphQL so that we can get the payment status back.

type Mutation {
    multisafepayProcessTransaction(input: MultisafepayProcessTransactionInput): MultisafepayProcessTransactionOutput
}

input MultisafepayProcessTransactionInput {
    transaction_id: String! @doc(description: "The payment token added to the return URL")
}

type MultisafepayProcessTransactionOutput {
    payment_status: MultisafepayPaymentStatusEnum
    cart: Cart @doc(description: "The cart is only available when the payment status is failed, canceled or expired. In this case the cart is reactivated")
}

enum MultisafepayPaymentStatusEnum {
    PAID
    AUTHORIZED
    CANCELED
    PENDING
    ERROR
    FAILED
}

Of course this is written with the limited knowledge of the module, but I think this is about in the right direction. If you have any questions, let me know.

@vinodsowdagar
Copy link
Member

Hi @paales ,

Thank you for the suggestions.

I will discuss it with our development team and come back to you later.
If you have questions or comments in the meantime, please let us know.

@paales
Copy link
Author

paales commented Apr 21, 2022

We can hop on a call if you'd like :)

@vinodsowdagar
Copy link
Member

Hi @paales ,

Based on your feedback we have created a few backlog items:

  • Add GraphQL query for adding custom storefront return and cancel url
  • Make a reason available for when a user has canceled the payment, so that it can be used to show more engaging error messages after the user has been redirected back to the store.
  • Add MultiSafepay prefix to the queries and mutations, to prevent collisions with other payment modules

When i have an update regarding these requests, i will let you know.

@paales
Copy link
Author

paales commented Sep 9, 2022

@Vinod-MultiSafepay Any progress on the first two points?

@Hexmage
Copy link

Hexmage commented Mar 27, 2023

Just making a note to track progress on this issue. Because this is a superior implementation vs the magento controller.

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

3 participants