Created : 23 May 2020
Last Modified : 23 May 2020

***********************************************************************************
Contents:

A. SUMMARY
B. FILE STRUCTURE
C. INSTALLATION INSTRUCTION
D. HOW IT WORKS
E. CONFIGURATION SETTINGS
F. DATABASE TABLES MODIFIED
G. LANGUAGE SETTINGS CHANGED
H. CHANGE LOGS
I. TROUBLESHOOTING
J. FAQ
K. COPYRIGHT NOTICE
L. TERMS AND CONDITIONS


***********************************************************************************

A. SUMMARY
==========
This interface is for use with Stripe payment gateway.

Features:

Both normal checkout and one-page checkout method are supported by this module.

To use this module, you must register an account first with Stripe.
You can register at https://dashboard.stripe.com/register

IMPORTANT NOTE:
It is strongly recommended to have SSL certificate installed on shopping cart site for security and PCI compliance.

If you do not have any SSL Certificate in your current site, you can purchase SSL from us at:
https://www.vpcart.com/virtprog/instantssl1yr.htm

***********************************************************************************

B. FILE STRUCTURE
===================

Files included in the zip are:
- $READ_ME_FIRST_stripe900.HTML
- stripe_execute.asp
- stripe_process.asp
- stripeconfig.asp
- stripegateway.asp
- stripeshoppayment.asp
- stripeshopxmlhttp.asp
- admin/stripe_getrefundamt.asp
- admin/stripe_refundvoid.asp
- admin/stripe_setup.asp
- admin/stripe_setup_config.asp
- admin/stripe_setup_process.asp
- admin/stripe_subs.asp
- admin/stripeshopxmlhttp.asp
- admin/js/stripe/striperefund.js
- admin/sqlscripts/stripe/*

***********************************************************************************

C. INSTALLATION INSTRUCTION
============================

1. Upload the below files and folder to your VPCart 9.00 root folder.
- stripe_execute.asp
- stripe_process.asp
- stripeconfig.asp
- stripegateway.asp
- stripeshoppayment.asp
- stripeshopxmlhttp.asp

2. Upload the below files to your ADMIN folder. If you have renamed your ADMIN folder, then this must be placed in the renamed folder.
- admin/stripe_getrefundamt.asp
- admin/stripe_refundvoid.asp
- admin/stripe_setup.asp
- admin/stripe_setup_config.asp
- admin/stripe_setup_process.asp
- admin/stripe_subs.asp
- admin/stripeshopxmlhttp.asp
- admin/js/stripe/striperefund.js
- admin/sqlscripts/stripe/*

3. Log into super admin and execute page below:
http://www.yourdomain.com/<your admin folder>/stripe_setup.asp

Note: Replace the below with your VPCart site
{ www.yourdomain.com } : your site domain
{ your admin folder } : your admin folder

Click Install Now button.

4. After installation completed, you should see message below:
_______________________________________________________
The Stripe Payment solution initial setup has now been completed.

Please go to modules configuration page for further setup.
_______________________________________________________

5. Please click the "modules configuration page" link to setup.

- Enable? : Set to Yes to enable Stripe Payment gateway.

- Secret Key : Please enter your Stripe Secret Key. You can refer to their guide on how to get this Secret Key:
https://support.stripe.com/questions/locate-api-keys-in-the-dashboard

- Enter 3 digit of currency format : USD
Stripe supports many other currencies worldwide. For the list of supported currencies, you can refer at:
https://stripe.com/docs/currencies

6. Click Save button.

7. In your VPCart admin, please go to top menu: Advanced Settings > Software Configuration.

8. Enter xallowcreditcards in the top right search box and click search icon.

9. Please set the config xallowcreditcards to No.

10. You are done.

***********************************************************************************

D. HOW IT WORKS
===============

When customers do a checkout, they will see the credit card form on the checkout page.



They enter the card details and the sensitive card info will be sent to Stripe. A token representing this information is returned to your server to use. This ensures that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way. This token cannot be used more than once. The token will be used to capture a payment.

On a success payment, Stripe will return response with Payment ID and Status to your VPCart site.

VPCart will update the following Orders table fields as below eg :
ocardtype : Stripe
oauthorization : Stripe Payment ID=ch_xxxxxxxxxxxxxxxxxxx Status=succeeded

If no Payment ID and succeeded Status returned in the response from Stripe, then it will be marked as Stripe-Declined.

VPCart will update the following Orders table field as below eg :

ocardtype : Stripe-Declined
oauthorization : Declined [reason for the decline]

And redirect customers back to shopcheckout.asp.asp to retry their payment.


Stripe Refund process


You can do refunds for any online purchases paid using Stripe directly from within the VPCart orders administration.

Go to : Store > Orders and locate the column "Payment Status". For any success payment, you can see a link for Refund.



To do a refund for an order, click the Refund link.

It will then take you to the Refund form as shown on screenshot below:



There are two Refund type you can choose:

1) Full refund.

If you choose Full refund, it will send the full order amount to Stripe for the refund.

Example, if the total order amount is $50 then Full refund process will send the total $50 refund request to Stripe.

2) Partial refund.

It's flexible that you can do partial refund to your customers more than once on your liking.

For example, a total order amount is $50, and you wish to do refund in partial eg
First refund $25
Second refund $25

The Partial refund can handle this for you.

Simply choose the Partial option, and you will see the amount textbox. Enter eg 25 into it and click Refund to proceed.



For a success refund, the following Orders table fields will be updated:

ocardtype :
Stripe-Refund (For a full refund)
Stripe-Partial Refund (For a partial refund)

oauthorization : Added the Date and time of the refund, Refund ID, Refunded amount eg
Date=5/23/2020 5:05:33 AM
Refund ID: re_1GlpY9JmLUaK6FGOTkyFWyib : US$20.00


NOTE : If you do more than one refund for an order, then it can be tracked from this oauthorization value eg:



The example above showing that first refund US$41.00 is made and then followed by second refund US$5.50

The following fields in Orders table are used for refund process:

- ostriperefundid (new field) : The latest refund id made for the order
- ostriperefunddatetime (new field) : The last refund process date and time.
- oauthorization : All the refund date, refund id and refund amount in each refund request will be appended to the existing payment status.
- orefundtype : R (full refund) or S (partial refund).

For any successful refund, VPCart will deduct the refunded amount to the total order amount (orderamount field).
Also, in your order details page in administration, merchants able to see the total of refunded amount.


***********************************************************************************

E. CONFIGURATION SETTINGS
=================

New configs:
- xstripe_enable
- xstripe_secretkey
- xstripe_currency

F. DATABASE TABLES MODIFIED
===========================

Orders table, new fields:

- ostriperefundid text 100
- ostriperefunddatetime text 50

Orders table, existing field size changed:
- oauthorization field size increased to text 4000


G. LANGUAGE SETTINGS CHANGED
============================

New language keywords added:

- langstriperefundcolumntitle : Stripe Refund
- langstriperefundamounterrormsg : Refund amount should not exceed order amount.
- langstriperefundamountinvalid : Invalid refund amount.
- langstriperefund : Refund

H. CHANGE LOGS
============================

NONE

***********************************************************************************

I. TROUBLESHOOTING
============================

Please submit a ticket to our helpdesk at https://helpdesk.vpcart.com and our support team will assist you.

***********************************************************************************

J. FAQ
============================

NONE

***********************************************************************************
K. COPYRIGHT NOTICE
============================

Copyright (c) 1999-2020 Rocksalt International Pty. Ltd.
All rights reserved.

This software and documentation constitute a published work and
contains valuable trade secrets and proprietary information
belonging to Rocksalt International Pty. Ltd. .
None of the foregoing material may be copied,
duplicated or disclosed without the express written permission
of Rocksalt International Pty. Ltd. .

LICENSEE ACCEPTS VP-ASP Shopping Cart "AS IS" "WITH ALL FAULTS",
Rocksalt International Pty. Ltd. accepts no responsibility for the
operation or performance of the VP-ASP Shopping Cart.
The entire risk of use and consequences of use of the
VP-ASP Shopping Cart falls completely on the Licensee
and Rocksalt International Pty. Ltd. shall not be liable in any respect
for any claims, loss or injury alleged to have resulted
from use of or in reliance on VP-ASP Shopping Cart.

Licensee acknowledges that it has read the foregoing
disclaimers of warranty and limitation of liability
and understands that Licensee assumes
the entire risk of using VP-ASP Shopping Cart.


***********************************************************************************

L. TERMS AND CONDITIONS
============================
ROCKSALT INTERNATIONAL GRANTS TO THE LICENSEE A NON-EXCLUSIVE,
NON-SUB LICENSABLE, NONTRANSFERABLE LICENSE
TO INSTALL AND USE THIS APPLICATION ON A SINGLE DOMAIN FOR
A SINGLE SHOP.

THE CODE IN THE APPLICATION MAY BE MODIFIED FOR USE IN
SETTING UP A SINGLE SHOPPING SITE ON THE WORLD WIDE WEB.

LICENSEE MAY MAKE A COPY OF THE APPLICATION FOR
BACK-UP AND ARCHIVAL PURPOSES, PROVIDED THAT ANY COPY
MUST CONTAIN ALL PROPRIETARY NOTICES INCLUDED
WITH THE APPLICATION.

LICENSEE IS PROHIBITED FROM SELLING OR DISTRIBUTING
THE APPLICATION IN ANY MANNER.

LIMITATION OF LIABILITY.

ROCKSALT INTERNATIONAL AND ITS LICENSORS SHALL
NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE OR ANY
THIRD PARTY AS A RESULT OF USING OR DISTRIBUTING THIS
APPLICATION.

IN NO EVENT WILL ROCKSALT INTERNATIONAL OR ITS LICENSORS
BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
OR FOR DIRECT, INDIRECT, SPECIAL,
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LI
ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE,
EVEN IF ROCKSALT INTERNATIONAL HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.