Closed remcotolsma closed 1 year ago
The client received the following response form support@memberpress.com:
Hi Renee.
After looking into everything you submitted, here's the response from one of our developers:
Without looking through all of their code to see what they are doing, it is hard to tell what could be wrong. The transaction created in MemberPress is correct, as you can see from the screenshot, so sometime after we create it, they alter it further before sending it to the payment processor.
The customer can loop us in with the Pronamic team so we can answer questions if we need to, but it's not something we can fix on our side."
Kind regards.
We just mailed support@memberpress.com the following message:
Hello Sinisa,
Earlier Renee from patterndrawing.online (CC) had contact with you about this. The Pronamic Pay plugin also contains a number of MemberPress gateways, including the popular Dutch payment method iDEAL. We extend your
MeprBaseRealGateway
class and implement theprocess_payment($txn)
function. We expect the$txn
parameter to contain the correct information for the payment. However, if amounts including VAT have been entered and this has been indicated in the settings, this is not always the case. As soon as a discount code is applied for the first payment, things go wrong. This is also easy to reproduce with your ownMeprPayPalStandardGateway
gateway. You probably end up not using the$txn->total
value within the PayPal Standard gateway, so there won't be any problems. However, we must pass on the total to the popular Dutch iDEAL payment provider Mollie. You can debug by changingMeprPayPalStandardGateway.php
like this:/** * Redirects the user to PayPal checkout * * @param MeprTransaction $txn * @throws MeprGatewayException * @throws Exception */ public function process_payment_form($txn) { var_dump( $txn );exit;
See attachments for screenshots. As far as we can judge, developers like should be able to count on the correct transaction amounts/total in
proces_payment_form($txn)
and/orprocess_payment($txn)
functions. Why does the transaction object not contain the correct amounts at this point, how should we or you solve this? You developers are also welcome to comment at https://github.com/pronamic/wp-pronamic-pay-memberpress/issues/13.Remco Tolsma Pronamic
🖇️
⏳ Waiting on response from MemberPress.
No fix from MemberPress unfortunately:
We have passed your feedback on to the development team. They have logged it and will keep it in mind, but at this time have not road mapped any changes.
As I mentioned in our previous conversation, there is a way to get the information for the proper transaction amount through the trial amount on the subscription object. I recommend updating your code since it won't be changed in MemberPress for some time.
Solved this by merging the PR from @rvdsteege:
With the inclusive tax setting the
$memberpress_transaction->total
value does not have the correct value at this point:https://github.com/pronamic/wp-pronamic-pay-memberpress/blob/b5b6be195ea345698a97a895b25f6b67697ac9ef/src/Pronamic.php#L104-L114
The
total
property contains the "Sub-Total" value of66.53
from the screenshot, thetax_amount
value of11.55
is a mystery to me.