pronamic / wp-pronamic-pay-pay-nl

Pay.nl driver for the WordPress payment processing library.
http://www.wp-pay.org/gateways/pay-nl/
3 stars 1 forks source link

Update API requests from GET to POST method #4

Closed rvdsteege closed 1 year ago

rvdsteege commented 1 year ago

@remcotolsma mentioned:

Wij doen volgens mij momenteel altijd een GET request: https://github.com/pronamic/wp-pronamic-pay-pay-nl/blob/62a7b9463b12ed4c098944868e23b87a8fb2085c/src/Client.php

Maar de Pay. documentatie geeft aan dat we voor het opstarten van een betaling/transactie een POST request moeten doen?

https://docs.pay.nl/developers#transaction-start

This PR updates the API request method from GET to POST.

rvdsteege commented 1 year ago

@remcotolsma I've made the changes as discussed at Pronamic HQ:

I also noticed HTTP Basic authentication at https://docs.pay.nl/developers#authentication, but we're using token (40 characters) and serviceId (SL-...) parameters. To update to HTTP Basic auth, we would also need a setting for the account code:

De username is bij een PAY. API altijd waarde van de account code en begint met AT- […]

Question: do we want to add the extra account code gateway setting for HTTP Basic auth and continue to use the current implementation as fallback, so the plugin will continue to work after update?