SEOClerks

finish my payment gatway of

finish my payment gatway of

ve 70% installed the payment gateways




only a hour or two work left

the return from stripe and pay pal need finishing
user id need adding to fields
with a datestamp and username for item product id

need add to the history tab
also add a history to and from

paysafe no included ill get this finished when i get my paysafe accountsorted

my code is bleow


Requirements

 
<?php

/**

* Stripe - Payment Gateway integration example (Stripe Checkout)

* ==============================================================================

*

* @version v1.0: stripe_pay_checkout_demo.php 2016/10/05

* @copyright Copyright (c) 2016, http://www.ilovephp.net

* @author Sagar Deshmukh <[email protected]>

* You are free to use, distribute, and modify this software

* ==============================================================================

*

*/

// Stripe library

require 'stripe/Stripe.php';

$params = array(

"testmode" => "on",

"private_live_key" => "sk_live_xxxxxxxxxxxxxxxxxxxxx",

"public_live_key" => "pk_live_xxxxxxxxxxxxxxxxxxxxx",

"private_test_key" => "sk_test_5db3sJ7QmSHAgxs8XsL5BaUq",

"public_test_key" => " pk_test_oTVUBFAEt2am1vCRo8NLVgnR"

);

if ($params['testmode'] == "on") {

Stripe::setApiKey($params['private_test_key']);

$pubkey = $params['public_test_key'];

} else {

Stripe::setApiKey($params['private_live_key']);

$pubkey = $params['public_live_key'];

}

if(isset($_POST['stripeToken']))

{

$amount_cents = str_replace(".","","10.52"); // Chargeble amount

$invoiceid = "14526321"; // Invoice ID

$description = "Invoice #" . $invoiceid . " - " . $invoiceid;

try {

$charge = Stripe_Charge::create(array(

"amount" => $amount_cents,

"currency" => "usd",

"source" => $_POST['stripeToken'],

"description" => $description)

);

if ($charge->card->address_zip_check == "fail") {

throw new Exception("zip_check_invalid");

} else if ($charge->card->address_line1_check == "fail") {

throw new Exception("address_check_invalid");

} else if ($charge->card->cvc_check == "fail") {

throw new Exception("cvc_check_invalid");

}

// Payment has succeeded, no exceptions were thrown or otherwise caught

$result = "success";

} catch(Stripe_CardError $e) {

$error = $e->getMessage();

$result = "declined";

} catch (Stripe_InvalidRequestError $e) {

$result = "declined";

} catch (Stripe_AuthenticationError $e) {

$result = "declined";

} catch (Stripe_ApiConnectionError $e) {

$result = "declined";

} catch (Stripe_Error $e) {

$result = "declined";

} catch (Exception $e) {

if ($e->getMessage() == "zip_check_invalid") {

$result = "declined";

} else if ($e->getMessage() == "address_check_invalid") {

$result = "declined";

} else if ($e->getMessage() == "cvc_check_invalid") {

$result = "declined";

} else {

$result = "declined";

}

}



echo "<BR>Stripe Payment Status : ".$result;



echo "<BR>Stripe Response : ";



print_r($charge); exit;

}

>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Lucky Chips payment</title>

<style type="text/css">

.auto-style2 {

text-align: center;

}

</style>

<div class="auto-style2">

</head>

<body>

<center><img src="https://hostiso.com/wp-content/uploads/2016/05/hostiso-stripe.png"></center>

<div align="center">

<form action="" method="POST">

<br>

<input name="payamount" value="00.00" type="text" /><p><br>

<script

<img src="https://checkout.stripe.com/checkout.js" class="stripe-button"

<br> data-key="<?php echo $params['public_test_key']; ?>"

data-amount= payamount

data-name= $username

data-description= ""

data-image="http://www.ilovephp.net/wp-content/uploads/2016/03/small-3.jpg"

data-locale="auto"

data-zip-code="true">

</script>

<br>

</form>

</div>

</body>

</p>

<center><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTOG5xle74HYI4xnP2svsu6xPu1dtluhgZDJqDTacKXORxknbLU"></center>

</div>

<div align="center">

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input name="payamount2" value="00.00" type="text" /><span lang="en-gb">

</p></span> <input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="[email protected]"><input type="hidden" name="item_name" value="Memorex 256MB Memory Stick"><input type="hidden" name="item_number" value="MEM32507725"><input type="hidden" name="amount" value="payamount2"><input type="hidden" name="tax" value="1"><input type="hidden" name="quantity" value="1"><input type="hidden" name="currency_code" value="USD"><!-- Enable override of buyers's address stored with PayPal . --><input type="hidden" name="address_override" value="1"><!-- Set variables that override the address stored with PayPal. --><input type="hidden" name="first_name" value="John"><input type="hidden" name="last_name" value="Doe"><input type="hidden" name="address1" value="345 Lark Ave"><input type="hidden" name="city" value="San Jose"><input type="hidden" name="state" value="CA"><input type="hidden" name="zip" value="95121"><input type="hidden" name="country" value="US"><input type="image" name="submit" hight="120"

src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"

alt="PayPal - The safer, easier way to pay online" height="35">

</form>

</p>

<center><img src="https://tse3.mm.bing.net/th?id=OIP.cFgZ7zfIhY2xu9Ti7BT9WAHaB4&pid=15.1&P=0&w=561&h=143"></center>

</p><center>

</p><center><img src="https://tse2.mm.bing.net/th?id=OIP.2E30qbdYZDkIqTBH2A0ssgHaCd&pid=15.1&P=0&w=574&h=192" id="img" style="width: 100%; height: 294px;"></center>

<h4>enter your paysafecard pin below</h4>

<p>

</center>

</div>

<p>

<center><img src="https://www.gamesdeal.com/media/wysiwyg/payment/paying_with_paysafecard_easy_EN.png" id="img" style="width: 100%; height: 294px;"></center>

</html>


Skills Required

Php

Bids

No bids made yet - be the first!

Bid On Listing

Bid On Listing Created 6 years ago in Programming

Other jobs by rlencouk