#Updating PaymentProcessor session data

1 messages · Page 1 of 1 (latest)

stiff gazelle
#

Hi guys, thanks for the awesome product.

I am trying to create a custom PaymentProcessor and having some issues.
When a user enters their card info I want to save that data into to the session data, but I am getting the following error:

The payment provider saltpay is of type PaymentProcessor. PaymentProcessors cannot update payment session data.

My question is, if a PaymentProcessor cannot update payment session data, then how do I access data entered from the frontend in my PaymentProcessor?

quasi geode
#

To access them you can look at the payment session data column

stiff gazelle
#

@quasi geode thanks for the answer.

But how do I add data to the payment session data column from the front-end?

await medusaClient.carts.updatePaymentSession(
  paymentSession.cart_id,
  paymentSession.provider_id,
  {
    data: {
      cardInfo: {
        card: data.card,
        expiry: data.expiry,
        cvc: data.cvc,
      },
    },
  },

This does not work, gives me the error above:
The payment provider saltpay is of type PaymentProcessor. PaymentProcessors cannot update payment session data.

quasi geode
#

Indeed, i see what you mean, could you open an issue on github please 🙏

stiff gazelle
#

Will do, thanks!