The module use the amount of commerce_order_total to process the payment in commerce_sermepa_process_transaction.

But if you have used the hook_commerce_sermepa_gateway to alter the amount, later, when it is processed the payment amount it's not the right one.

And sermepa returns the right amount payed in the variable Ds_Amount.

In line 531 of commerce_sermepa.module:
$transaction->amount = $order->commerce_order_total[LANGUAGE_NONE][0]['amount'];

I propose instead:
$transaction->amount = $feedback_parameters['Ds_Amount'];

CommentFileSizeAuthor
#2 commerce_sermepa-2947208-2.patch713 bytesdrupalgin
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Carlitus created an issue. See original summary.

drupalgin’s picture

Status: Active » Needs review
StatusFileSize
new713 bytes

I added patch

carlitus’s picture

thanks @drupalgin ;)

facine made their first commit to this issue’s fork.

  • facine committed a57cfb0c on 7.x-1.x
    Issue #2947208: Use Ds_Amount in commerce_sermepa_process_transaction
    
facine’s picture

Status: Needs review » Fixed

Fixed, thank you!

Please download and review the latest dev release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.