Sunday, 28 March 2010

Configuring ZenCart and PayPal: Error 10413 solved

Now that PayPal is coming to South Africa, I figured that I’d upgrade my ZenCart site to connect to PayPal’s express checkout. 
I enabled ZenCart’s “PayPal Express Checkout” payment module and started configuring the parameters.
Oops, I needed to enter some API credentials – so I followed the instructions on how to get those.
I upgraded my PayPal account to “Premier” level so that I could accept payments and get an ‘API username’ and ‘API Password’ and ‘Signature’, and pointed it to “Sandbox” mode.
Sandbox mode? – yup, mmm… that should have got me thinking – but it didn’t. 
image
I then (naively) tried to process a transaction from my ZenCart using my real PayPal logins and got the following error “10002 Security error - Security header is not valid”.  That gave me further clues that I couldn’t use my real PayPal logins and API settings and use the “Sandbox” mode.  I needed to create new dummy accounts and logins and APIs on the sandbox.PayPal server.

imageSo, I registered as a developer on the https://developer.paypal.com/ site and downloaded the “PayPal_Sandbox_UserGuide” and a few clicks later I was creating the sandbox parameters and users that I could use to test my shopping cart.  I created a few users with different accounts, in different parts of the world, with lots of money so that they could purchase to their hearts’ content.
image
image

Then I got to the difficult part. I thought that it would be easy to go from the shopping cart to PayPal and process the payments – BUT, it wasn’t – sometimes the purchases went through fine – others it didn’t.  I didn’t realise that the small transactions worked fine – but not the ones over R1,000.  I kept on getting the error “10413 Transaction refused because of an invalid argument. See additional error messages for details. - The totals of the cart item amounts do not match order amounts.”  I Goggle’d a bit – but nothing really helped, until I found this posting by Levi Senft: “ZenCart and PayPal: 10413 Transaction refused because of an invalid argument. Solved!”.  The posting explains how the comma separator is the cause of the problems, as well as a fix.
image
I modified the paypalwpp.php file as directed and voila – it was solved.  No more error 10413 (that was really starting to haunt me!)

I’m looking forward to many transactions facilitated by PayPal in South Africa.

Update 07April2010:
I’m not sure why, but I started getting the 10413 error again.  Perhaps I didn’t test the above solution thoroughly enough.  I Google’d some more and found this solution by “gmail”: http://www.zen-cart.com/forum/showpost.php?p=675592&postcount=62:
PayPalZenCartError10413That seemed to work first time – but beware it’s not thoroughly tested.  You can download the modified paypalwpp.php file to save you some typing:  It INcludes both fixes described above  paypalwpp.php

If this still doesn’t help you – then look at the log files: /includes/modules/payment/paypal/logs (ensure that the folder is writable (ie: chmod 777))

I then had problems when shipping charges were included….
The same problem as “Zubey” had here.
Whenever tax was added to on either products or shipping. If tax is removed from both it all works fine.

[ITEMAMT] => 0.20
[AMT] => 0.20
[SHIPPINGAMT] => 0.00 **** when this = 0
[TAXAMT] => 0.00 & this = 0, all works fine ****
[L_NUMBER0] =>
[L_QTY0] => 1
[L_NAME0] => TEST Product No.2 $0.20
[L_AMT0] => 0.20

A bit more searching found me this article:
From http://www.zen-cart.com/forum/showpost.php?p=531979&postcount=7
and I changed these settings and it worked:
Config->My Store-> Basis of Product Tax=Shipping and Basis of Shipping Tax=Shipping
and in Module->Shipping (for each shipping module set): Tax Basis = Store

I hope this is the last time I say that “it’s working” and it isn’t!

Friday, 26 March 2010

Connecting your laptop to your TV (make your own 7 pin SVideo to RCA cable)

Following on from the article describing how to make a 4 pin SVideo to RCS cable, Anonymous requested the cable for a 7 pin SVideo to RCS cable.  So here are the instructions… note, I haven’t tested this – just info that I’ve put together from the http://www.allpinouts.org/index.php/S-Video_7_PIN site. 

So, if you have a laptop with a 7 pin S-Video output and want to watch a DVD on your TV (that didn’t have an S-Video input), here’s how to make your own cable (and save about R150). 
See below for the wiring – you’ll need a ceramic capacitor in the wiring.
Remember, the S-Video plug does not “carry” video signal and the audio – you will need 2 cables: 1 for the video (this one) and another for audio.
image {Thanks to www.allpinouts.org for the images and diagrams pasted below !}

Video cable:

Here’s a 7 pin S-Video plug: image (plugged into the laptop’s S-Video output, and the TV end soldered onto a RCA jack and plugged into the video-in socket on the TV)

Here’s the RCA plug: image  

Here’s the wiring of the S-Video to RCA cable:
image

Pin S-Video

Description

Pin RCA

1

GND Ground (Y)

Ground

2

GND Ground (C)

Ground

3

Y Intensity (Luminance)

Signal

4

C Color (Chrominance)

Signal through 470pF Ceramic Capacitor

5

- -

- -

6

V Composite Video

- -

7

VGND Composite Ground

- -

Notes (from allpinouts.org):
* Those 7 pin connectors seen on some PC graphics cards are non-standard connectors for carrying S-video.
* Generally the first four pins on those 7-pin connectors on the same places as the standard four pin S-video connector have practically always the same functionality as those pins in S-video connector.
* The other three pins can have then some extra signals which are not part of S-video (usually some pins of those carry composite video and some control signals, but the use of those three extra pins vary quite much).

* Larger capacitor values will also work, but cause picture to become "softer".
* The impedances and signal levels not matched exactly right, but near enough to work acceptably.


image
Audio cable:
The audio cable had a small stereo jack on it and plugged into the laptop’s headphone jack, and the TV end had two RCA male connectors and plugged into the audio-in (“Left and Right”) sockets on the TV.

www.allpinouts.org
While investigating this article I Googled into www.allpinouts.org which is an absolute mine of valuable information regarding pinouts of cables and connectors for all sorts of devices.  If you need to know how to wire up a connector or cable, then www.allpinouts.org will be your last stop!image

If you have a pre-payment meter, then you can save 24.8% on your electricity if you buy now, only 6 days to go!

Eskom electricity tariffs will go up by 24.8% on 01 April 2010 - that leaves 6 days for you to stock up on cheaper electricity:
I'm going to save that 24.8% by pre-purchasing as much electricity as I can afford before 01 April 2010 – just like I did last year (and the year before).

Once I've purchased all that electricity, I'll want to make it last as
loooong as possible - I'll do that by checking where the biggest savings can be made by re-analysing my household's usage and cut down on the most expensive appliances: Saving electricity tips

See here for this posting (still relevant) for all the answers and the "Electricity Tariff Calculator tool":
Beat Eskom price increases

This year's increase details:

When are the tariffs going up?
@ 23h59 on Wed night 31 March 2010.
How much will the increases be?
2010's increase is, on average 24.8% (see here for NERSA’s media release)

The posting answers questions like:

How full can your pre-payment meter go?

How much can I purchase on my credit card?

Which tariff plan am I on?

If I fill my meter up too much will I lose my free 50 kWh per month?


And while you're saving money, why not ready the blog "Why pay cash for pre-paid electricity when you can use your credit card?" and earn cash back and "reward points".


image image

How to save electricity:

*) turn down the temperature setting on your thermostat
- here's where and how: Where is my geyser's thermostat? How do I turn it down?
*) use less hot water (ie. Install a low‑flow shower head
). See here to purchase RST Profilence (RST contact details) and here for a report on savings (water and electricity
*) Shower, don't bath: see here for report on how much less power a shower uses than a bath
*) Install a geyser blanket to insulate your geyser and pipes. See here for a report on savings when using a geyser blanket (30% improvement)
*) use the ‘
Electricity Usage Calculator’ to see where you ‘spend’ your electricity.
*) Reduce your pool pump's ON time per day
*) Install ceiling insulation. See here for more info and suppliers
*) Lastly, use solar power to heat your geyser: install solar panels. If you are building a new house or if you replace your geyser, then install solar panels and a time switch. See here for non-savings installing a time switch if you don't have a solar geyser: non-savings report



image
Oh, and while we’re talking about rate increases – don’t forget that Metrorail plans to increase train fares on April 1.  The fare increase, the first since 2003, will see customers paying between R40 and almost R100 more than the current prices for a Metroplus monthly ticket.

Live Traffic Feed

 

Be notified of
page updates
it's private
powered by
ChangeDetection

Copyright © 2008 HandyTechTipper. All articles are released under the Creative Commons Attribution 2.5 South Africa license, unless where otherwise stated.