Braintree 3D Secure 2.0 SCA(Strong Customer Authentication) Implementation demo example

Braintree PHP v3.40.0

Braintree Sandbox Javascript v3

Dropin UI integration

3D Secure 2.0 implementation (SCA complaint)

Demo link –

http://demo.ilovephp.net/braintree/client/?amt=15

Visa

  • 4000000000000002
  • 01/2020
Mastercard

  • 5200000000000007
  • 01/2020
Amex

  • 340000000003961
  • 01/2020

 

If you are interested in script, contact us 🙂

Ref. –
https://developers.braintreepayments.com/guides/3d-secure/client-side/javascript/v3
https://developers.braintreepayments.com/guides/3d-secure/migration/javascript/v3#if-you-are-based-in-europe-and-already-use-3ds

Rename git branch locally and remotely

Sometimes by mistake we have a situation to rename the remote and local git branch name. Below steps will help to do same –

1. Rename your local branch.

2. Delete the old-name remote branch and push the new-name local branch.

3. Reset the upstream branch for the new-name local branch.

Switch to the branch and then:

 

WHMCS Stripe Checkout Plugin

whmcs-stripe-php

whmcs-stripe-php

Stripe checkout is the easiest payment flow on web and mobile.

Product features :

  • Account Registration :

    Click “Remember me” to securely store your credit card info for faster checkout on this and other sites that use Stripe.
    en_step1

  • One-Click Payments

    On this computer, when you come back to any participating site, your credit card info will already be filled in: just click Payto confirm your purchase.

    You can edit the card number if you need to. Stripe will store the one you used most recently.en_step2

  • Authentication

    Your credit card is linked to your email address and your mobile phone number.

    To pay with Stripe on a different computer, or after you log out, just enter your email address during checkout and Stripe will instantly send you a text message to verify your identity.

    Message and data rates may apply. Frequency of messages depends on user. For help, reply back with HELP. To stop, reply back with STOP.en_step3

  • Easy to install :

Stripe checkout plugin is very easy to install with your existing WHMCS plugin.

Screenshots :

Demo_of_stripe_checkout

Price : € 10 only

Drop a comment below, if you are interested for demo.

Python programming basics learning

Python-programming-basics

Python-programming-basics

If you are looking forword to learn basics of python programming, then you definitely like my below post. its quite simple and easy for those who have minimal programing knowledge.

How setup python on your local system and run it?

Basic programming syntax and code snippets

 

Reference/Usefull sites:

https://www.python.org/

http://www.newthinktank.com/2014/11/python-programming/

https://developers.google.com/edu/python/

 

EMAIL DO’s AND DONT’s

Donts of Email Etiquette

  1. Leaving the subject blank – always include a relevant subject. This even applies to mails that you reply to or forward to
  2. Typing in capital letters – this is considered to be shouting
  3. Sending emails to the entire organization that is relevant only to a few staff
  4. Storing out of date mail and never deleting them or the attachments
  5. Use of quirky and difficult to read fonts in an email
  6. Replying to all, instead of just to the sender
  7. Marking everything you send as high importance
  8. Sending mail with typing or spelling errors

Dos of Email Etiquette

  1. Be concise and to the point
  2. Answer all questions
  3. Use proper spelling, grammar & punctuation
  4. Use templates for frequently used responses
  5. Answer swiftly- usually within 24 hours
  6. Do not attach unnecessary files
  7. Use proper structure & layout
  8. Read the email before you send it
  9. Take care with abbreviations and emoticons
  10. Use active instead of passive
  11. Avoid long sentences
  12. Use cc: field sparingly
  13. Keep the paragraphs short
  14. Use bullet points if manuy points need to be explained
  15. Make sure your e-mail includes a courteous greeting and closing. Helps to make your e-mail not seem demanding or terse.
  16. Are you using proper sentence structure? First word capitalized with appropriate punctuation? Multiple instances of !!! or ??? are perceived as rude or condescending.
  17. When sending large attachments, always “zip” or compress them before sending.
  18. Only use Cc: when it is important for those you Cc: to know about the contents of the email. Overuse can cause your emails to be ignored.
  19. Include addresses in the To: field for those who you would like a response from.
  20. Include addresses in the Cc: field for those who you are just FYI’ing.
  21. Never expose your friend’s or contact’s email address to strangers by listing them all in the To: field. Use BCC:!
  22. Eliminate big words and overly formal language

Substitute words

  1. Talk about>> discuss
  2. Ask for>> enquire
  3. Help>> assist
  4. Think about>> consider
  5. Get>> receive
  6. Buy>> purchase
  7. Get together>> meet
  8. Let someone know>> inform someone
  9. Get in touch with someone>> contact someone

Useful Language

  1. Thanks for your email
  2. Just a brief note to say/let you know
  3. There are a couple of things, I’m not sure about
  4. Do call me if you’d like to discuss this further
  5. This has been due to/this is because
  6. It was a pleasure dealing with you
  7. Nice to hear from you
  8. I am attaching a copy of…
  9. Your request was forwarded to me
  10. I am afraid I could not open the document
  11. I look forward to your reply
  12. I am also sending a hard copy

Requests

  1. Could you
  2. Please could you
  3. I would be grateful if you could
  4. Can you
  5. Do you think you could.

Language To Be Avoided

  1. Please revert back/ reply back>> Use: revert/ reply
  2. Awaiting for your reply>> Use: Awaiting your reply/ waiting for your reply
  3. Please confirm me/ confirm us>> just use please confirm
  4. I suggest you>> I suggest that you…. Eg: I suggest that you upgrade to the next package

Simple html tooltip

A tooltip is often used to specify extra information about something when the user moves the mouse pointer over an element:

Basic Tooltip

Top Arrow

Left Arrow

Right Arrow

 

Get the client/user/visitor IP address using PHP

The simplest way to get the visitor’s/client’s IP address is using the $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘REMOTE_HOST’] variables.

However, sometimes this does not return the correct IP address of the visitor, so we can use some other server variables to get the IP address.

 

WHMCS stripe pay plugin

whmcs-stripe-php

whmcs-stripe-php

Do you want to accept credit cards on your website and save users confusion and time? This credit card gateway extension for WHMCS lets you accept credit card payments directly on your website via Stripe payment gateway.

With this extension your customer can use their credit cards during the checkout process and Stripe.com handles the rest. This means a smoother experience for your users as they never have to leave your website for making payments.

This is a free and open source Stripe Payment Gateway for WHMCS that supports one time and recurring payments without ever having a credit card number hit your WHMCS server.

Overview :

Stripe pay payment gateway allows the WHMCS billing system to use Stripe’s one time and reoccurring payment gateway capabilities. Stripe provides the unique ability to take a client’s credit card information without ever having the client leave your site, but it also allows for credit card data to never get stored in or even pass through your own server, eliminating costly concerns over PCI compliance. This gateway for WHMCS is being released free for anyone, although it should still be considered in beta as there are likely still bugs to work out of it.

You can sign up for a Stripe account at https://stripe.com.

Stripe API version :

  1. Stripe API 4.12.0 (Release date 05/06/2017)
  2. A Stripe Elements integration with js version v3

Requirements :

  1. PHP 5.3.3 and later.
  2. WHMCS (V7.X, V6.X)
  3. cURL must be enabled (This is most likely already enabled on your server, but you can contact your hosting provider if you are unsure)
  4. SSL certificate installed (in order to process live transactions)
  5. Stripe merchant account

Instructions For Use :

  1. Copy the file in the repository’s root folder called stripe.php and place it into the /modules/gateways/ folder of your WHMCS installation.
  2. From within the callback folder of the repository, copy the other stripe.php file and place it into the /modules/gateways/callback folder of your WHMCS installation.
  3. Copy the ccpay.php file from the repository into the root directory of your WHMCS installation.
  4. Finally, copy the clientareacreditcard-stripe.tpl file into the root level of the theme folder you are currently using for WHMCS. For example, if you’re using the default theme, then copy this file to /templates/default/.
  5. Add a webhook in Stripe to https://yourwhmcsinstall.com/modules/gateways/callback/stripe.php.

In the end, your folder structure should look roughly like the diagram below, with a ccpay.php file in the root of your install, a stripe.php in /modules/gateways/callback, a stripe.php in /modules/gateways/, a clientareacreditcard-stripe.tpl in the root of your WHMCS active template folder, and the lib folder of the Stripe API in the newly-created /modules/gateways/stripe/ folder.

You may now activate this new payment gateway from within WHMCS through the Setup > Payments > Payment Gateways screen. This module should be listed as Stripe. You can then fill in the appropriate API key information as well as a required email address where the gateway can send you any serious errors that come up while billing clients or communicating with Stripe.

To download source code Click here !!!

Fork on Github

Support Information :

I’m always looking to improve this code, so if you see something that can be changed or if you have an idea for a new feature or any other feedback, send me an email to sagasdeshmukh91@gmail.com, or send me a message on Twitter (@starsagar91), and I’ll get right back to you. If you decide to use this module in your WHMCS install, send me a message to say hello (and let me know what you think too) and it’ll make my day. Thanks!

How do MySQL indexes work?

What is MySQL indexes ?

A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records.

How do MySQL indexes work?

Basically an index on a table works like an index in a book (that’s where the name came from):

Let’s say you have a book about databases and you want to find some information about, say, storage. Without an index (assuming no other aid, such as a table of contents) you’d have to go through the pages one by one, until you found the topic (that’s a full table scan). On the other hand, an index has a list of keywords, so you’d consult the index and see that storage is mentioned on pages 113-120,231 and 354. Then you could flip to those pages directly, without searching (that’s a search with an index, somewhat faster).

Of course, how useful the index will be, depends on many things – a few examples, using the simile above:

  • if you had a book on databases and indexed the word “database”, you’d see that it’s mentioned on pages 1-59,61-290, and 292 to 400. In such case, the index is not much help and it might be faster to go through the pages one by one (in a database, this is “poor selectivity”).
  • For a 10-page book, it makes no sense to make an index, as you may end up with a 10-page book prefixed by a 5-page index, which is just silly – just scan the 10 pages and be done with it.
  • The index also needs to be useful – there’s generally no point to index e.g. the frequency of the letter “L” per page.