Example #1
0
 */
?>
<noscript>Javascript is required for this widget</noscript>
<label title="Input your transaction ID if you are having trouble with the Shop Flow">Transaction ID</label>
<input type="text" title="your Transaction ID then click ok" name="txn_id" id="txn_id" maxlength="18" value="" />
<input type="submit" class="txn_helper_button" value="ok" />
<div id="txn_result" class="txn_res"></div>
<script>
(function($){
	$('.txn_helper_button').first().click(function(){
		$('.txn_res').addClass('loading');
		var t=$('#txn_id');
		if(t.data('txn')){$('#txn_result').html('still processing... please wait'); return ;}
		if(!t.get(0)) {return;}
		url='<?php 
echo RJDGPP::getURI('/JSON.php');
?>
';
		txn_id=t.val();
		txn_id=txn_id.trim();
		t.data('txn',true);

		$.ajax({
			url:url,
			data:JSON.stringify({'txn_id':txn_id,'q':'helper'}),
			dataType:'json',
			type:'post',
			async:'true'
		}).success(function(d){
			if(d && d.response=='success' && typeof d.data.link!='undefined'){
				$('#txn_result').html('<span><a href="'+d.data.link+'" target="_blank">' + d.data.name +'</a><span>');
Example #2
0
<?php

/**
 * paypal startflow
 * assignments must be made on this page
 */
require_once dirname(__FILE__) . '/../../../../wp-load.php';
require_once 'paypalfunctions.php';
$url = RJDGPP::getURI('/paypal');
?>
<html><body><?php 
$paymentAmount = $_REQUEST['price'];
$item_name = $_REQUEST['item_name'];
$item_id = $_REQUEST['item_id'];
$s = $_REQUEST['s'];
//prepare txn
$txn = new RJDGPPTXN();
$txn->shop_id = $item_id;
$txn->name = $item_name;
$txn->session_id = $s;
$PaymentOption = "PayPal";
if ($PaymentOption == "PayPal" && !empty($paymentAmount) && !empty($item_name)) {
    $currencyCodeType = "USD";
    $paymentType = "Sale";
    $returnURL = $url . "/return.php";
    $cancelURL = $url . "/cancel.php";
    $items = array();
    $items[] = array('name' => $item_name, 'amt' => $paymentAmount, 'qty' => 1, 'item_id' => $item_id);
    $resArray = SetExpressCheckoutDG($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $items);
    $ack = strtoupper($resArray["ACK"]);
    if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") {
Example #3
0
<?php

require_once dirname(__FILE__) . '/../../../../wp-load.php';
/**
 * 
 * 	Process the problems internals here
 * update shopping cart, get token.
 * 
 */
?>
<html><head><?php 
wp_head();
?>
</head><body style="background:none">
<div id="show_loading" style="height:30px;width:30px;margin:auto;content:'';display:block;position:relative;background:url(<?php 
echo RJDGPP::getURI('/img/loading_wheel.gif');
?>
) no-repeat 0 0;"></div>
<script>
window.onload = function(){
	 if(window.opener){
		 window.close();
	} 
	 else{
		 if(top.dg.isOpen() == true){
              top.dg.closeFlow();
              return true;
          }
     }                              
};
jQuery('#show_loading').remove();