-
Atos Payment Module (French Users) -- need to customize payment amount
I'm desperate on this - I've searched high and low on multiple forums (even OsC where I was treated very harshly for daring to use zc instead of OsC) and cannot find anyone who has successfully installed the Atos payment module which will allow me to use the credit card payment facility offered by French banks. I'm stuck because of a silly language configuration problem so if anyone can help, please holler !
Thanks
Pete
-
Only 1% of the order is sent to the gateway
I use a contributed payment module (Atos, found on the French Zen Cart site) and it works perfectly except that it only sends 1% of the order to the payment gateway and ignores the 70% discount I give (via another add-on) when the order is placed (the rest is payable when the goods are ready). This only occurs with this module, Paypal IPN works perfectly. Where can I find where the error is coming from ? Any ideas anyone ? This is ruining my sleep !
Thanks
Pete
-
Re: Atos Payment Module (French Users)
-
Re: Only 1% of the order is sent to the gateway
OK, I've figured the 1% problem, the gateways needs 2 decimal places to be displayed in the on-line store so that's sorted. However, it still insists on ignoring the discount given when the order is placed taking only the sub total + shipping whereas only the amount immediately due - 30% of the order total - should be sent to the gateway. I'm nearly there !
Any ideas ?
Cheers
Pete
-
Re: Only 1% of the order is sent to the gateway
Quote:
Originally Posted by
petek
it still insists on ignoring the discount given when the order is placed taking only the sub total + shipping whereas only the amount immediately due - 30% of the order total - should be sent to the gateway.
Check what fields it's calculating the transaction total from, and compare that against the other working module.
-
Re: Only 1% of the order is sent to the gateway
Quote:
Originally Posted by
DrByte
Check what fields it's calculating the transaction total from, and compare that against the other working module.
Precisely but for people who aren't php wizkids, its always a pain locating the correct line of code that's causing the bother ! Oh well, there's no other way I suppose.
Thanks
Pete
-
Re: Atos Payment Module (French Users)
Quote:
Originally Posted by
petek
even OsC where I was treated very harshly for daring to use zc instead of OsC
You've got to feel sorry for them really. It can't be easy being fully committed to a cart while knowing deep down that there's a much better one that they could be using instead.
-
Re: Atos Payment Module (French Users)
Quote:
Originally Posted by
kuroi
You've got to feel sorry for them really. It can't be easy being fully committed to a cart while knowing deep down that there's a much better one that they could be using instead.
Oh, they're very bolshy. When I opted for zc, I was under the impression that OsC basically wasn't being developed any more. Not true it would appear. And they do have masses more info on their site (particularly the OsC French-language site) !
Cheers
-
Re: Only 1% of the order is sent to the gateway
The other module that works is Paypal IPN.
In the confirmation function of Atos, I have this line of code which in case I'm mistaken is how the order is retreived :
PHP Code:
$sips = $this->makeRequest($order->info['total'], $currency);
whilst in Paypal, the equivalent (appears) to be this :
PHP Code:
$this->totalsum = $order->info['total'];
They are similar but I could be off the mark.
Any ideas ?
-
Where is the order total field ?
Hi,
In one (custom) module, I think it retrieves the order info here :
PHP Code:
$sips = $this->makeRequest($order->info['total'], $currency);
. I have problems with this modules which ignores all discounts.
In this (Paypal IPN - works perfactly) module, I see this :
PHP Code:
$this->totalsum = $order->info['total'];
. Paypal works fine; I'd like to know why the other doesn't but I'm having a little difficulty understanding exactly where and how the payment modules get their order info from. Can someone enlighten me ?
Thanks
Pete
-
Re: Where is the order total field ?
-
Re: Only 1% of the order is sent to the gateway
Me again. If I read $order in the Atos module, I get this :
PHP Code:
order Object
(
[info] => Array
(
[order_status] => 1
[currency] => EUR
[currency_value] => 1.00000000
[payment_method] =>
[payment_module_code] =>
[coupon_code] =>
[shipping_method] => Frais de Livraison (Montant)
[shipping_module_code] => flat_flat
[shipping_cost] => 60
[subtotal] => 955
[tax] => 0
[total] => 1015
[tax_groups] => Array
(
[Taux de Taxes Inconnu] => 0
)
[comments] =>
[ip_address] => XXXXXXXXX - XXXXXXXXXXXXX
)
whereas doing the same thing with the Paypal module, I get this
PHP Code:
order Object
(
[info] => Array
(
[order_status] => 1
[currency] => EUR
[currency_value] => 1.00000000
[payment_method] =>
[payment_module_code] =>
[coupon_code] =>
[shipping_method] => Frais de Livraison (Montant)
[shipping_module_code] => flat_flat
[shipping_cost] => 60
[subtotal] => 955
[tax] => 0
[total] => 346.5
[tax_groups] => Array
(
[Taux de Taxes Inconnu] => 0
)
[comments] =>
[ip_address] => XXXXXXXXXXXXXXXX - XXXXXXXXXXXXXXX
)
The two [total] fields send different values. Why ? I want the Atos module to pick up the same total as Paypal, ie the deposit due when the order is placed. How can I get the Atos module to behave in the same way as Paypal's ?
Cheers
Pete
-
PHP Code
Is there anywhere in the forums where we could submit php code problems ? I'm not talking about anything vastly complicated because there are specialist forums out there but it would be nice if we could post a snippet or two so as to obtain some quick advice from fellow Zen users !
Cheers
Pete
-
Re: PHP Code
This facility already exists
i.e.
when posting message, require code insert,
click hash key icon..WRAP code tags around
selected text.
-
Re: PHP Code
I know the wrap-around function exists but what I meant was is there a specific place to post ? There doesn't appear to be.
I have a problem with a piece of code but will make one or two more tests before posting here.
Cheers
Pete
-
PHP If...Else question
Simple for the php savvies really : in a payment module, for orders having a value of >200, I want 30% of the order to be sent to the bank. For the rest, 100% of the order is due. Here is the code (which doesn't work) :
PHP Code:
$sips = $this->makeRequest($order->info['total'], $currency);
if ($sips > 200) {
echo $sips = $this->makeRequest($order->info['total']*0.30, $currency);
} else {
echo $sips = $this->makeRequest($order->info['total'], $currency);
}
echo '">'."\n";
Only the first part of the code, ie:
PHP Code:
echo $sips = $this->makeRequest($order->info['total']*0.30, $currency);
works, the second part, ie :
PHP Code:
echo $sips = $this->makeRequest($order->info['total'], $currency);
}
doesn't. Why not ?
-
Re: PHP If...Else question
How about separating out the assignment and the echo by changing the whole thing to:
PHP Code:
$sips = $this->makeRequest($order->info['total'], $currency);
if ($sips > 200) {
$sips = number_format($sips*0.30,2);
}
echo $sips . '">'."\n";
-
Re: PHP If...Else question
Thanks. Unfortunately that doesn't work either. In fact, its even worse. Another board, someone told me that I must && statements without saying how. As I only have one variable - $sips - I don't what I'm supposed to compare with it. I'll get there in the end but this is a tad frustrating !
What do you think ?
Cheers
-
$order->info['total']
I see in the payment modules that this line is what fishes out the order amount. The question is : where does the info come from, ie which files ? I ask the question because I need to add an if...else statement so that only 30% of orders over 200 Euros are debited. I've added the statement to the Paypal module and it works but it doesn't work with the custom module : 30% is debitted whether the order exceeds 200 Euros or not.
The custom payment module's order info line is
PHP Code:
$sips = $this->makeRequest($order->info['total'], $currency);
Whereas Paypal's is
PHP Code:
$this->totalsum = $order->info['total'];
They look similar to me !
Thanks
Pete
-
Re: $order->info['total']
How many more threads are you going to open on the same question?
And, which payment module is this for now? You've been talking about paypal, atos, payline ... how many modules are you altering? How many modules do you need to run on your site?
Having your disjointed questions scattered all over makes it hard to follow the "why" behind your posts. And, frankly, when I see that, I click "next" and move on to another topic, ignoring yours.
So ... you might reconsider your approach.
-
Re: $order->info['total']
Sorry about the multiple threads but its pretty obvious that if I don't get any replies, I'm going to try another angle ! I would gladly remove/edit posts but this forum does not provide this possibility.
Payline is dead as my web host doesn't offer Soap support, which Payline needs. Paypal is installed and works but doesn't offer the possibility of debitting the balance of an order when the goods are dispatched - I would have to ask the customers to pay by email which means that if they don't look at their emails then I won't get paid. Atos is the French bank module which allows me to initiate payment of the balance without having to ask the client to do it. So, I'll be using Paypal for goods which are fully paid for when the order is placed (I'll give a small discount for this) and Atos for the others. The only problem remaining is that Atos ignores the "if" statement in the php code where I ask for only orders above 200 Euros to be taken into consideration.
That's the problem in a nutshell.
Thanks
Pete
-
Re: PHP If...Else question
Your original code was a bit dodgy, but could have worked. That which I gave you was syntactically perfect, and would have the same effect as your original code intended but more efficiently.
However, both are clearly incomplete fragments and without more detailed knowledge of the context in which you're trying to use them and a more specific explanation of the results than "that doesn't work", there's not much I can add.
-
Re: PHP If...Else question
The code you gave me just produced a white page. I think the problem is with the actual payment module code. Its the Atos module which is designed for French banks. Very, very widespread in France. The problem is that its getting its order information from I don't where. I've wasted an entire month on this - I think I'll just forget the "30% downpayment on order" and bill the entire whack straight away.
Cheers
Pete
-
Re: PHP If...Else question
Do you have the debug utility installed so that we can see what error is being generated?
(ou il y a une méthode plus vite mais “interdite” pour gagner ces informations que j’ai recommandé hier dans le forum français !)
-
Re: $order->info['total']
Perhaps posting the module files as an attachment might be more useful?
BTW: Several of your multiple discussions have been merged into one
-
1 Attachment(s)
Re: $order->info['total']
-
Re: PHP If...Else question
Yes, I see you've been busy on the Zen Cart France site ! Its a pity the site isn"t updated regularly but I suppose that's down to the limited number of users of ZC in France. I was thinking of offering my services so that I could relay the users' requests here in English because a lot don't have much joy on the French-language forum.
Yes, I have the debug utility but it isn't generating any helpful errors. As I say, I don't think the problem is with the if...else statement (although it could be better !) but is more to do with the dodgy payment module itself. I've sent the file to DrByte so he can see if there's anything obviously wrong with it but if he can't find anything I'll just have to drop the issue and move on. I just hope that 1) cashing 100% of orders when the goods are not yet ready (it can take up to 2 months before goods are dispatched) is not illegal and 2) whether its not commercial suicide to ask for 100% of the payment when the goods are ordered.
Cheers
Pete
-
Re: PHP If...Else question
Try this:
Code:
$sips = $order->info['total'];
//code added by PK
if ($sips >= 200) {
echo $sips = $this->makeRequest($order->info['total']*0.30, $currency);
} else {
echo $sips = $this->makeRequest($order->info['total'], $currency);
}
echo '">'."\n";
//end code added by PK
or even this:
Code:
// NOT NEEDED: $sips = $order->info['total'];
//code added by PK
if ($order->info['total'] >= 200) {
echo $sips = $this->makeRequest($order->info['total']*0.30, $currency);
} else {
echo $sips = $this->makeRequest($order->info['total'], $currency);
}
echo '">'."\n";
//end code added by PK
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Oh boy oh boy, the first one works ! I am deeply indebted to you, many many thanks.
Cheers
Pete
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Everything works except discount coupons - the payment module ignores the discount completely meaning the 30% billed when the order is placed is being based on the initial order amount, ie before the reduction is applied. Not a major problem because I'll be manually billing the correct amount when the rest of the order is due but it looks a little untidy. Any ideas anyone ?
Cheers
Pete
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Me again. Sorry to be insistent but I'd like to sort this out as the site will be going live soon.
Another small issue popped up with the payment module (and I'll start a new thread if you want!) : on the last page of the payment process when payment by bank card has been chosen, near the top of the page at the end of the text describing the payment method chosen, I get this : "Array">". How do I get rid of it ?
Thanks
Pete
-
1 Attachment(s)
Re: Atos Payment Module (French Users) -- need to customize payment amount
Here is a photo of the page showing the offending text.
Cheers
Pete
-
1 Attachment(s)
Re: Atos Payment Module (French Users) -- need to customize payment amount
The screen capture was lousy so I've done it again and have pointed to the text which I want to delete. The problem I think is with the line at the end of the if...else statement which DrByte helped me out with but even if I delete it entirely I still get the "array" word under the explanation of the payment module. Help !
Thanks
Pete
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
For those of you who are still awake :smile: I've found the answer to my little problem which is a franco-french issue and won't interesse anyone else. PM me if you need any info.
Cheers
Pete
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Hi Pete,
Hope you are successfully using your zen cart as I am in the same place you were. We are trying to get the ATOS payment module installed to use LCL in France and are lost in translation.
It is a bit desperate as we have announced launch for Nov. 30th and this is the one crucial snag, even though we have all the information from the bank.
Has anyone succeeded in doing this?
Julie
Quote:
Originally Posted by
petek
I'm desperate on this - I've searched high and low on multiple forums (even OsC where I was treated very harshly for daring to use zc instead of OsC) and cannot find anyone who has successfully installed the Atos payment module which will allow me to use the credit card payment facility offered by French banks. I'm stuck because of a silly language configuration problem so if anyone can help, please holler !
Thanks
Pete
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Hi Julie,
Things have evolved a lot since last April - there's now a new Atos module developed by Christophe - you'll find it here : http://www.zen-cart.com/index.php?ma...oducts_id=1035. I don't use it because it can't accept manual partial payments, ie : a down payment of say a third of the order with the rest debited when the goods are dispatched. This is essential for me but perhaps not for you. It does however accept coupons which the version I use doesn't.
Good luck
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Merci beaucoup,
I will give that a try and mark if resolved.
Je vais essayer et signaler si ça marche.
Julie
-
(french) Atos payment module problem
i installed this atos payment module http://www.zen-cart.com/index.php?ma...oducts_id=1035
then i finished all the settings following READ ME,
the order's placed successfully and i get payment in my bank account.
but in my credit card gateway control panel, no transaction found.
is it the problem of atos module or anything i missed?
any help would be appreciated.
-
Re: (french) Atos payment module problem
That's very odd. There are problems with the ATOS module, but I don't see how money could have been collected by ATOS and paid to your bank account without being recorded in your ATOS-provider's control panel. That's very much a question for your ATOS-provider.
-
Re: (french) Atos payment module problem
hi (i'm french),
which payment module did you install ? sogenactif ?
which release of zencart do you use ?
Which procedure did you follow ? shall you post your guide/tutorial please ?
thank
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
hi (i'm french too),
time was spend since this post, but what about your problem ?
did you success to solve it ?
thanks for reply.
Mike
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Quote:
Originally Posted by
Michael REMY
hi (i'm french too),
time was spend since this post, but what about your problem ?
did you success to solve it ?
thanks for reply.
Mike
The Atos module is available in the "Free Sotware Add Ons" and should work for you. Which bank do you use ? You should be aware that a few banks (mine, Banque Populaire, included) are moving away from Atos to Systempay for which a new module is available on the Zen Cart France website.
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
thank you petek for your reply,
mine bank is Société général, and still use Atos (renamed sogénactif) system.
do you have any information between Zencart and atos in 1.3.8 release ? any problem or all should be Ok normally ?
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Quote:
Originally Posted by
Michael REMY
thank you petek for your reply,
mine bank is Société général, and still use Atos (renamed sogénactif) system.
do you have any information between Zencart and atos in 1.3.8 release ? any problem or all should be Ok normally ?
I think Sogénatif to the Société Générale is the same as Cyberplus to the Banque Populaire. Its still Atos. Atos and 1.3.8a work together fine. Let's hope Atos and 1.3.9 get on just as well !
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Hi there,
Does anyone has tried the atos payment module with zencart 1.3.9h ? any difficulties to get it installed ?
Thanks for your help.
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
Ask your bank. They may have a developer who can help you. My bank does.
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
If you want to use this module with 1.5.1 and with Société Générale and some how the return url is "index.php?main_page=atos_response" and not "main_page=checkout_process" you have to change atos_response/header_php.php:
PHP Code:
//Remember the data from post
$_SESSION['IMO_ATOS_DATA']=$_POST['DATA'];
/* Transaction approved */
/* Check whether the merchant id is the expected one */
zen_redirect(MODULE_PAYMENT_ATOS_PRODUCTION_MODE == 'false'
? zen_href_link(FILENAME_CHECKOUT_PAYMENT,
'info_message=' . urlencode(MODULE_PAYMENT_ATOS_TEXT_CHECKOUT_DEMO),
'SSL')
: zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')); // from checkout success in checkout procees
and modify before_process() from atos.php the line :
PHP Code:
$response = $this->decodeResponse($_SESSION['IMO_ATOS_DATA']);
unset($_SESSION['IMO_ATOS_DATA']);
-
Re: Atos Payment Module (French Users) -- need to customize payment amount
hello, do you make this module work with zen cart 1.51 and php 5.3 ?