Payment Widget Support

Payment Widget Integration

You can easily integrate 2000Charge' Payment Widget which enables all the necessary processes for making a fast, secure, simple and personalized checkout.

Click on "Pay with 2000Charge" to see our Payment Widget in live mode. If you want to see how it works, you need to fill out the required fields to complete the transaction.

Tokenization

Payments processed by 2000Charge® are Tokenized and use SSL Encryption. Sensitive payment information is automatically converted to a uniqe token which is sent to our secure servers for validation. All sensitive consumer data that should not be stored, transferred or logged on your server for security reasons is securely processed by our company with the highest PCI security standards.

Widget Flow

Local Payments Widget Flow

Supported Payment Options

SEPA Direct Debit
ideal payment method
giropay payment method
eps payment method
POLi Payment Method

How to implement

After creating a test account download and extract ttc-php-sdk to your server.

Locate the ttc-php-sdk/TwoThousandCharge.php file and insert your Public and Secret API keys.

You must insert your API keys. After the registration process you will be provided with the API Test Keys and API Production Keys, the parameters needed to start accepting payments through our payment system.

NOTE: Production API Keys are avaliable once you are verified, and are used to proccess live transactions.

Insert the script below before the opening tag of your webpage, ie
<!DOCTYPE html>
<html>


        <?php require_once 'ttc-php-sdk/TwoThousandCharge.php';

        $product_data = (object) array(

                'currency' => "USD";
                'amount' => "125.00";
                'productDescription' => "Red T-shirt";
                'formPost' => isset($_POST) ? $_POST : '', 
                'successUrl' => "https://2000charge.com/message/success.html";
                'cancelUrl' => "https://2000charge.com/message/failure.html";
                );
        $transaction_status = $TwoThousandCharge->transaction($product_data);
        ?>
        

Insert the script below before the closing </head> tag of your webpage

                                   
            <script>
            var AP_BUTTONS = ['PaymentButton1'];
            </script>
        
    

You are required to embed the payment widget code to your page.



        <form method="post">
            <div 
            data-ttc-amount="<?php echo $product_data->amount; ?>"
            data-ttc-button-text="Pay using 2000Charge Widget"
            data-ttc-company-name="2000Charge"
            data-ttc-currency="<?php echo $product_data->currency; ?>"
            data-ttc-description="<?php echo $product_data->productDescription; ?>"
            data-ttc-extra="extra desc area"
            data-ttc-public-key="<?php echo $TwoThousandCharge->getPublicKey(); ?>"
            data-ttc-setup="SET_FORM_VALUES"
            data-ttc-theme="dark"
            id="PaymentButton1"
            </div 
        </form>

    

We have also additional widget theme that can be set using additional paramater:

data-ap-theme="light"

In your webpage include folowing javascript file:

<script src="https://widget.alternativepayments.com/v2AP/js/payment-button.js" type="text/javascript"></script>
                                                

After line 178 in ttc-php-sdk/lib/TwoThousandCharge/request.php you will see:

$curl = curl_init($url);
/* Begin windows ssl line. This next line is for windows ssl. remove if not on windows using ssl */
/* curl_setopt($curl, CURLOPT_CAINFO, 'C:\Program Files (x86)\PHP\v5.6\extras\ssl\curl-ca-bundle.crt'); */
/* end windows using ssl */

Line 180 needs to be enabled and pointing to your .crt file if you are in a Windows hosting environment and using SSL.