pronamic / wp-pronamic-pay

The Pronamic Pay plugin allows you to easily accept payments with payment methods like credit card, iDEAL, Bancontact and Sofort through a variety of payment providers on your WordPress website.
https://pronamicpay.com
34 stars 14 forks source link

Store `_pronamic_payment_issuer` in JSON #229

Closed remcotolsma closed 2 years ago

remcotolsma commented 2 years ago

Currently the issuer property is specific used for iDEAL or creditcard issuers. Therefore it is probably more suitable for payment meta. Should we store this in payment.meta.ideal_issuer, payment.meta.creditcard_issuer or payment.meta.issuer?

Schermafbeelding 2021-10-04 om 14 15 58

https://docs.mollie.com/reference/v2/payments-api/create-payment

@rvdsteege ?

rvdsteege commented 2 years ago

payment.meta.issuer is fine with me.

I don't think it makes sense to differentiate between payment.meta.ideal_issuer and payment.meta.creditcard_issuer, as there will usually only be a single issuer in use for a payment.

If there are other parameters (I can't think of any now), we could also consider a payment.payment_method:

payment {
    "payment_method": {
        "id": "ideal",
        "issuer": "ideal_INGBNL2A"
    }
}

But as the issuer value is not a 'registered constant' within the plugin and could be 'any value', I feel it is more appropriate to store it as payment meta.

remcotolsma commented 2 years ago

Done: