pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

Add support for payment slug #146

Closed remcotolsma closed 12 months ago

remcotolsma commented 1 year ago
$payment->set_slug( $slug );

$slug = $payment->get_slug();

We can use this for the following issue:

$payment->set_transaction_id( $response->get_omnikassa_order_id() ); 

change to something like:

$payment->set_slug( 'rabo-smart-pay-order-' . $response->get_omnikassa_order_id() ); 

https://github.com/pronamic/wp-pay-core/blob/5859217757f9229f671c51b035cc191365c871b2/src/Payments/PaymentsDataStoreCPT.php#L274-L292

https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-includes/post.php#L4073-L4769