multiple currencies and payment gateways

Author Message

Quynh Nguyen

Sunday 05 April 2009 8:38:31 am

Hi,

I met the problem when implementation the shopping cart and payment gateway. Because there are many payment gateways and each of them are supporting some currencies but not all.

In product class I remove old price attribute and use multiple-currencies. It is easy...

Then I add more extension to my website: ezpaypal to use paypal payment gateway. And develop another payment gateway (similar to ezpaypal - eZRedirectGateway). Because paypal is only support some mainly currencies, I need more for my local customers. The code in ezpaypal is very clearly and simple, so make a clone and modify so easy too...

Problem is: when payment gateway call function createRedirectionUrl($process) it get the amount to send to payment gateway.

        $amount         = urlencode( $order->attribute( 'total_inc_vat' ) );

I don't know how to get the amount belong to payment gateway that user choices, for example:
- ezpaypal: use to pay USD
- my gateway: use to pay VND

Please help me. It is really important and urgent!

Thanks so much!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:52:49
Script start
Timing: Jan 18 2025 10:52:49
Module start 'layout'
Timing: Jan 18 2025 10:52:49
Module start 'content'
Timing: Jan 18 2025 10:52:49
Module end 'content'
Timing: Jan 18 2025 10:52:49
Script end

Main resources:

Total runtime0.7337 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1797152.6406
Module start 'layout' 0.00530.0035 741.820339.4766
Module start 'content' 0.00880.7234 781.2969401.9922
Module end 'content' 0.73220.0015 1,183.28918.1250
Script end 0.7337  1,191.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4632160.0002
Check MTime0.00160.2150160.0001
Mysql Total
Database connection0.00070.096310.0007
Mysqli_queries0.693594.5120460.0151
Looping result0.00050.0652440.0000
Template Total0.698995.320.3495
Template load0.00190.261320.0010
Template processing0.697094.993920.3485
Template load and register function0.00020.020710.0002
states
state_id_array0.00160.221610.0016
state_identifier_array0.00220.293620.0011
Override
Cache load0.00150.2039140.0001
Sytem overhead
Fetch class attribute can translate value0.00050.072210.0005
Fetch class attribute name0.00080.108910.0008
XML
Image XML parsing0.00010.016510.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00070.0999100.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs