generate printable bank giro deposit slip - pdf-generation

I am trying to generate a Bank Deposit slip (ideally a PDF) with incremental serial numbers everytime someone clicks and downloads one. Now I know how to generate PDFs etc programmatically but I wonder if there is a 'best practice' way to do this kinda thing before I start generating this deposit slip pixel by pixel on a PDF? There must be some templates out there I can use?
Any ideas on what approach to be followed in this case?

It is a kind of thing that evolves your invoice system, customers (if you have one), products/services that you are negociating, and of course a place in a database to save all your transactions.
I was staked in Bank Slip, but now I found a simple solution, I'm going to share here with you, perhapes is not the best solution, but apparently was good to me, actually I'm building this.
I'll talk here about the structure to accomodate the transactions datas, here I go:
A table in your database, I had called it bank_slip
here goes the fields for bank_slip
id | invoice_number | transferor | code_transferor | amount_title | due_date | our_number | drawee | fines
Now I will explain the process to generate a bank slip »»
I supose that you have already an invoice system working in your system and it must be integrated with your customers and products/services of course.
Once you have invoice, customer and products/services you can start to work in your bank slip.
In the invoice system you need to call the bank slip. Why there? 'cause there you have all the necessarie information to generate your bank slip such as the struct of your table bank_slip showed above. You will pass all the information of your customer, service and invoice across pages via form (POST or GET).
Then you need some class to generate the bank slip for you. I'm using this one --- http://www.boletophp.com.br/#download
The class was built to work with the mainly banks of Brazil, but of course you will need to find something that fits in your country, I think it is not the worst part of the job.
The worst for me was to integrate it to my system already in use and working, but like I explained above it fit like a gloves to me.
I hope you can find a solution to your problem.

Related

What kind of data format is that?

I found this record in the database which is used to hold multiple values.
I want to know what is this format called so that I know how to deal with it?
a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:1:" ";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:29:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:8:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:5:"yoast";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:16:"http://yoast.com";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:17:"tweaking websites";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:13:"lastbuilddate";a:1:{i:0;a:5:{s:4:"data";s:31:"fri, 30 mar 2012 09:19:49 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:5:"en-us";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:9:"generator";a:1:{i:0;a:5:{s:4:"data";s:39:"http://wordpress.org/?v=3.4-alpha-19827";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:5:"image";a:1:{i:0;a:6:{s:4:"data";s:5:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:6:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:5:"yoast";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:3:"url";a:1:{i:0;a:5:{s:4:"data";s:69:"http://yoast.com/wp-content/themes/yoast-v2/images/yoast-logo-rss.png";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:16:"http://yoast.com";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:5:"width";a:1:{i:0;a:5:{s:4:"data";s:3:"144";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:6:"height";a:1:{i:0;a:5:{s:4:"data";s:3:"103";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:17:"tweaking websites";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}s:4:"item";a:20:{i:0;a:6:{s:4:"data";s:15:" ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:7:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:42:"7 ways to increase sales by creating trust";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://feedproxy.google.com/~r/joostdevalk/~3/1ssu1jmtutq/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:69:"http://yoast.com/7-ways-to-increase-sales-by-creating-trust/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubdate";a:1:{i:0;a:5:{s:4:"data";s:31:"mon, 26 mar 2012 13:09:54 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:2:{i:0;a:5:{s:4:"data";s:22:"usability & conversion";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:28:"conversion rate optimization";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:25:"http://yoast.com/?p=45457";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"ispermalink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:778:"<p>the key to conversing a visitor into a client is the creation of trust. your product can be the greatest thing on earth or the dullest office supply ever, both can be sold online when your visitor knows you are the best supplier for that product or service. we often advise on how to gain [...]</p><p>7 ways to increase sales by creating trust is a post by <a rel="author" href="http://yoast.com/author/michiel/">michiel heijmans</a> on yoast - tweaking websites.a good wordpress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? check out my thoughts on wordpress hosting!</p>";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:16:"michiel heijmans";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:6576:"<p>the key to conversing a visitor into a client is the creation of trust. your product can be the greatest thing on earth or the dullest office supply ever, both can be sold online when your visitor knows you are the best supplier for that product or service.</p><p>we often advise on how to gain trust in our <a title="website review" href="http://yoast.com/hire-me/website-review/">website reviews</a>, and i've compiled a list of some of the advice we've given over time. of course, trust can be earned in more ways than this, but we'll give you these seven to start with.</p><h2>1. use clear and normal language</h2><p>this is an often overseen issue that causes a lot of misgrief with your visitors. you should speak their language, not drown them in a sea of technical specs you don't even understand yourself. use a clear and direct style of writing. keep your audience in mind. do not focus on telling them what you want to tell them, focus on providing as many arguments as possible why their quality of life improves after buying that specific product.</p><h2>2. testimonials</h2><p>do not brag about your products yourself. if your products or services are really that good, i'm sure you'll find someone else that can do the bragging for you. make sure your visitor understand that the testimonial is written by an actual customer, by listing at least name and company and if the customer agrees, even a picture of him. video seems to be the next big thing in testimonials, by the way. in my opinion, that video testimonial should be accompanied by a written excerpt:</p><div id="attachment_45461" class="wp-caption alignright" style="width: 590px"><img class="size-large wp-image-45461" title="testimonials as seen on cloversites.com" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/testimonials-cloversites.com_-590x472.png" alt="testimonials as seen on cloversites.com" width="580" height="464" /><p class="wp-caption-text">testimonials as seen on cloversites.com</p></div><h2>3. verified signs</h2><p>everyone can create a verified sign, so don't let those verified signs fool you. but the majority of your visitors actually believe that you are the 'most appreciated hairdresser of mississippi' or the 'best plummer 2006'. man, i hate those signs. but when the signs are from well-known companies, they really do add value to a webshop:</p><div id="attachment_45459" class="wp-caption alignright" style="width: 590px"><img class="size-large wp-image-45459" title=""verified" signs" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/verified-signs-dx.com_-590x76.png" alt=""verified" signs" width="580" height="74" /><p class="wp-caption-text">"verified" signs</p></div><p>by investing in the guidelines of the right verification companies â the webshop shows that it has been keeping the customer in mind when setting up the website.</p><h2>4. pictures</h2><p>if you recognize the woman on this picture, please call the following toll-free number...:</p><p><img class="alignright size-large wp-image-45460" title="stock photography" src="http://cdn2.yoast.com/wp-content/uploads/2012/03/picture-stock-590x314.png" alt="stock photography" width="580" height="308" /></p><p>you can do better than that stock photo. listing actual pictures of yourself and/or your employees pushes conversion due to recognition and identification.</p><h2>5. list your physical address</h2><p>this one is really simple: people want to know there is a place to go to in case of problems (if any). having an actual store next to your webshop works even better, especially if a lot of your customers are relatively local.</p><p>in the netherlands digitalstreet.nl made this concept into a huge success, even though they're located in the south-west of the netherlands (quite near to where we are), people come from all over the netherlands because they'd rather buy the product in the store. there are more stories like that, but even if you don't want to do that, just listing your address on check-out pages increases trust a lot.</p><h2>6. what happens after check-out?</h2><p>there's this hesitation in almost all buying decisions: right before you click the pay now button. what's going to happen next? am i charged for taxes, import, anything else? can i select a wrapping paper? explain what happens after clicking that button. that way the customer is included in your ordering process and there are absolutely no suprises. that can be done with just a few short lines of text:</p><p><img class="alignright size-large wp-image-45458" title="checkout message on bloomingdales.com" src="http://cdn.yoast.com/wp-content/uploads/2012/03/checkout-bloomingdales.com_-590x244.png" alt="checkout message on bloomingdales.com" width="580" height="239" /></p><h2>7. show you care about more than making money</h2><p>the most important thing is that your website has to reflect your believe in the product or service you provide. just a list of products is not enough. also tell your customer about your company, your main values or mission statement. i really love the 1% for the planet from yvon chouinard (patagonia) and craig mathews (blue ribbon flies) http://www.onepercentfortheplanet.org. next to showing that you are involved, it also creates a huge sympathy and trust factor.</p><h2>we'd love to hear your tips!</h2><p>if you are selling products or services on your website, you must have thought about this subject. i'm curious: what have you done on your website to increase trust? what are you going to do?</p><p>7 ways to increase sales by creating trust is a post by <a rel="author" href="http://yoast.com/author/michiel/">michiel heijmans</a> on yoast - tweaking websites.a good wordpress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? check out my thoughts on wordpress hosting!</p><img src="http://feeds.feedburner.com/~r/joostdevalk/~4/1ssu1jmtutq" height="1" width="1"/>";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/commentapi/";a:1:{s:10:"commentrss";a:1:{i:0;a:5:{s:4:"data";s:65:"http://yoast.com/7-ways-to-increase-sales-by-creating-trust/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:2:"33";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:29:"http://search.yahoo.com/mrss/";a:2:{s:9:"thumbnail";a:1:{i:0;a:5:{s:4:"data";s:0:"";s:7:"attribs";a:1:{s:0:"";a:1:{s:3:"url";s:90:"http://cdn3.yoast.com/wp-content/uploads/2012/03/testimonials-cloversites.com_-125x125.png";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"content";a:4:{i:0;a:6:{s:4:"data";s:4:" ";s:7:"attribs";a:1:{s:0:"";a:2:{s:3:"url";s:81:"http://cdn.yoast.com/wp-content/upload73
It is a PHP serialized object, i.e. an object serialized with serialize() function: http://php.net/manual/en/function.serialize.php
For instance (from the manual):
class A {
public $one = 1;
public function show_one() {
echo $this->one;
}
}
$a = new A;
$s = serialize($a);
file_put_contents('store', $s);
Gives:
O:1:"A":1:{s:3:"one";i:1;}
You can use deserialize($sVarwiththeSerializedData) to revert it to the original state .

Unique Credit Card processing requirement?

I am working with a client to migrate their 12 year old ecommerce site to a more modern platform. The manner in which they process credit cards is something I don't have experience with, and either I can't seem to punch the right combination of words to get google to spit out what i'm looking for, or this is an oddity.
Their business does not process any credit card transactions itself. They use mals ecommerce shopping cart, and when customers place orders, the credit card information is stored there, but not processed. Their partner then logs into Mals and is able to retrieve all the card information and then process it externally on their own equipment.
Is there a common name for this process
Is this an acceptable practice (It seems kinda sketchy to me)
If so, can someone point me in the right direction for research

how to read file in cucumber

I'm a newbie to cucumber. I've the following scenario that I want to code in cucumber:
Feature: Withdraw Fixed Amount
The "Withdraw Cash" menu contains several fixed amounts to
speed up transactions for users.
Scenario Outline: Withdraw fixed amount
Given I have <Balance> in my account
When I choose to withdraw the fixed amount of <Withdrawal>
Then I should receive <Received> cash
And the balance of my account should be <Remaining>
Examples:
| Balance | Withdrawal | Received | Remaining |
| $500 | $50 | $50 | $450 |
| $500 | $100 | $100 | $400 |
I 'd like to read the data (Examples:)from a file like this:
$500;$50;;$50;$450
$500;$100;$100;$400
I'm not sure if I can read data from cucumber's feature file or in the step definitions. Could someone please shed some lights on this? Many thanks!
No it's not possible to 'generate' scenarios in Cucumber. Each row in your example table runs as an individual scenario, and Cucumber must know up-front which scenarios are to be run.
That said, there are 2 possibilities, I'd consider both to be quite unattractive:
Write the entire scenario in code in a single step def e.g.:
Scenario: Withdraw fixed amount
Given withdrawing should work correctly
#steps.rb
Given /^withdrawing should work correctly$/ do
# Read values from file
# For each row in the file, do everything the scenario would do
end
This works but will have the serious drawback of revealing nothing about the behaviour of the system through the Gherkin feature.
Code gen the feature file. Use a templating language such as ERB to transform a feature file, inserting whatever example rows are necessary, as a task which occurs before running Cucumber. Effective, but at the cost of a LOT of complexity.
In both situations you're removing the numbers from the feature file, which immediately negates its function as a central source of documentation, readers would have to refer back to the 'numbers' file in order to figure out the actual behaviour of the system.
What you requested is overkill. Examples are here to help you identify possible cases in clear format, but not for mass data handling.
Each row in Examples should be meaningful otherwise you are wasting resources.
For example. With $100 balance, withdrawal of $20 should leave $80. But $20 may be a hardcoded number, so you need one more case to verify that, say withdrawing $30.
The ATM system may have a daily withdrawal limitation of $1000. So, if you ask for $1200, the system should only give you $1000. You need another row to test that.
Every case above is meaningful. And I don't think there are so much cases that you need a CSV file to handle it. Manual typing is good enough.

address finder using post codes in magento1.6

After searching the web and seeing that the PAF file is not free I'm guessing there is no way to do this.. but.. does anyone know of a free system that can find a list of address with a postcode. It just seems odd to me that google can show all address wherever you click on a map. It knows the bounds of a postcode area, but there seems to be no way of listing all those address.
I need a free solution. I'm aware of postcode anywhere and that their sales people are very active within stackoverflow, but I cannot afford to pay their prices on this project.
This project only requires UK and india postcodes.
If I understand correctly, you are looking for a list/database of all mailable addresses within a certain postcode? Is that right? That will be difficult to find, at least for free. I know you don't need US data, but for reference, the US Postal Service is not allowed to give out this type of information, even for a fee, due to privacy concerns. I assume that other countries have similar policies.
I work for a US-based address verification service called SmartyStreets so I have some experience with this. There are third party services, you mentioned one, that have aggregated their own lists from various sources and can generate "saturation" mailing lists for specific postal codes. However, due to the cost involved in generating and maintaining these lists, I doubt that you will find this type of list for free.

Barcode Encryption of Personal Identifiers (or alternatives suggested by you)

I am trying to create a health application of a rather sensitive nature which will require some form of cryptography/obfuscation. There is a health study in which once a year, known individuals with permanent and recognisable identifier numbers (eg KIG0005001 as an individuals identifier) walk into the clinic, are identified, have their blood tested as part of a study. Next year, the same happens again, as this is a longitudinal study. Now the results of the blood test should NOT be able to be traceable to an actual individual (HIV status, etc are highly sensitive bits of information that should not be linkable with actual individuals due to their right to privacy), but it is IMPERATIVE that we can identify year on year which blood samples belong to one unique individual (without knowing WHO the individual actually is, the emphasis is on the blood samples being traceable to one individual, not the individual).
My idea (and here is where am asking for your expertise in cryptography and obfuscation) is that when the individual visits the clinic they come with an identifying card with their regular id number KIG0005001 . This number is entered into a system where via an algorithm/encryption it spits out a barcode (based on the original id KIG0005001 , therefore any future visits should produce the SAME barcode for a particular individual) which can be printed out as stickers. These barcode stickers are the ones to be used to identify the samples (stick em on the samples). The stickers should have the following information in them: unique identifier (via barcode?), the round number that the sample was taken (samples will be taken once a year, so year 1= round 1) and date sample taken.
Is this possible? What are the alternatives? How/What should I do in terms of transforming KIG0005001 into an encrypted barcode which is repeatable year on year (so blood sample can always be traced back to the same source). Am programming in Java.
Thanks in advance,
Tumaini
To answer this question, I don't think it needs to be in the barcode section.
First of all, there is no way to keep everything 100% secure... but you can make it more complicated to be understood by a human.
It's the same thing as the passport controversy... A biometric passport must be secure: it's not possible to read the information without knowing the "private key". But let's say you read and record everybody's passport that enters your store and save it to a database. You will be able to trace who is coming back and even what they previously bought since you have their passport's ID...
To make the life harder for your employees, you need to generate an ID that will match the real person's ID. So if the employee is testing the blood of KIG0005001, they will receive a different unique ID for that day; the computer will know how to link them up. So that your employee has no idea who is this number at that moment...
Cryptography is probably useless here since you work with IDs. Even a gibberish data repeated multiple time is still an ID.

Resources