pronamic / wp-pronamic-pay-memberpress

MemberPress driver for the WordPress payment processing library.
http://www.wp-pay.org/extensions/memberpress/
4 stars 1 forks source link

Problem with taxes and coupon codes follow-up #13 #17

Closed remcotolsma closed 8 months ago

remcotolsma commented 8 months ago

From customer to MemberPress support:

I think something goes wrong with the Coupons and the Tax calculation.

I used a Coupon which gives €39 discount on a subscription price of €195. (all including tax). That is working fine, but with the payment subscription notice and the pdf-invoice something goes wrong.

If someone pays by credit card or Ideal, the payment amount on the subscription notice and the pdf-invoice is €129,93. That should be €156,- (although the correct amount is charged).

I seems that by those subscriptions the amount of €195,- first is reduced with the tax of 21% (which makes €161,16) and then the Couponcode is deducted (which makes €106,55) and then the tax is added: €128,93.

But If someone pays by PayPal direct, the invoice is ok with a payment amount of €156,- on the subscription notice and the pdf-invoice.

See attachments of a payment by Credit card and one by PayPal.

Internal HelpScout ticket: https://secure.helpscout.net/conversation/2436581151/26569

This is issue is probably related to:

remcotolsma commented 8 months ago

I think the MeprTransactionsHelper::get_invoice( $memberpress_transaction ); call from https://github.com/pronamic/wp-pronamic-pay-memberpress/pull/15/files partially solved the problem. However, we also need to save the MemberPress transaction for correct amounts in the notice, invoice PDF, etc. @rvdsteege ?