Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

CCGV 5.16 integration with payment module


4 replies to this topic

#1 dlagon

  • Community Member
  • 4 posts
  • Real Name:Thomas Danielsson

Posted 08 August 2006, 11:23

Hi,
Most of the contribution developer of CCGV knows that it changes the total amount of the order and sends it to the payment module for payment. It also recalculates the tax to and sends it to the payment module if this is choosen. Well, this works perfect for payment modules that only needs the credit card number, valid throu date and the total amount to proceed this payment. But there are some payment services that redirects the user to a secure site on the payment providers server and let the user state the card number there instead. The payment service that I'm trying to integrate needs the cart information (article number, product name, quantity and price) in order to calculate the total amount that will be drawn from the users credit card account. This is already taken care of. The only problem is that osCommerce or the CCGV contribution sends the cart information as is it without any discount reduced on the price. This will result that the paysite will show the original total amount without the discount since it calculates the total amount based on the cart information.
If the CCGV contribution is configured to recalculate the tax then this is going to mess upp the calculation on the paysite even more.

Is there any way that I can get the discount amount from the payment module? If I can get this value then I could program it in the payment module to send this amount too and the paysite will know that it should reduce the total amount with this amount. It would be great if I could get the name of the discount coupon or the gift voucher too?

Please give me some advice to solve this problem.
Thank you!

Thomas

Edited by dlagon, 08 August 2006, 11:24.


#2 dlagon

  • Community Member
  • 4 posts
  • Real Name:Thomas Danielsson

Posted 14 August 2006, 09:20

Isn't there anyone who can help me with this? Is it really impossible to get these information from the payment module?

/Thomas

#3 dlagon

  • Community Member
  • 4 posts
  • Real Name:Thomas Danielsson

Posted 15 August 2006, 13:42

Please... anyone? I just need a confirm if it is impossible to get the discount amount from the payment module side...

#4 Vger

  • Community Member
  • 16,978 posts
  • Real Name:R Anthony
  • Gender:Not Telling

Posted 15 August 2006, 15:02

Most payment modules require amending to work with CCGV. It depends entirely upon the payment module - each fix is different.

Vger

#5 dlagon

  • Community Member
  • 4 posts
  • Real Name:Thomas Danielsson

Posted 15 August 2006, 15:14

View PostVger, on Aug 16 2006, 01:02 AM, said:

Most payment modules require amending to work with CCGV. It depends entirely upon the payment module - each fix is different.

Vger

Thank you for your answer Vger. I understand that every payment module is different. Maybe I've described my question badly.

I'm developing the payment module so I know how this module works. The problem is that I need to get the discount amount from osCommerce shop in order to send it to the payment gateway so the payment gateway can reduce the total amount with this discount amount.

I wonder if there is any code or function that I may use to get this value. For example:
I can get the tax rate value that is connected to the order by using this line:
$tax_rate = tep_get_tax_rate(MODULE_PAYMENT_SHIPPING_FEE_TAX, $order->delivery['country']['id'], $order->delivery['zone_id']);

Is there any equal call to get the discount amount?

Thank you for your time.

/Thomas