The return URL is already set in form form as a hidden field
mijn vraag is kan ik de plaats opzoeken waar de hidden field zou moeten zijn
(op mijn site als je betaald met paypal het geld komt wel aan ...maar de mensen krijgen een foutmelding,
dus ik vermoed dat de foutmelding komt via de auto return
foutmelding is : eeror occurred! whoops an error ha occured the payment was stopped if the problem persist please contact us
maar het geld overmaken is wel juist en komt goed aan
of is mijn return url niet goed bij PayPal ( want ik weet niet wat ik daar zou moeten invullen
<?php
/**
* @title Stripe
*
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Module / Payment / Inc / Class
* @version 1.0
*/
namespace PH7;
class Stripe extends Framework\Payment\Gateway\Api\Stripe
{
use Api; // Import the Api trait
/**
* @param string $sPrice Normal price format (e.g., 19.95).
* @return integer Returns amount in cents (without points) to be validated for Stripe.
*/
public static function getAmount($sPrice)
{
return str_replace('.', '', $sPrice);
?>
[size=xsmall]Toevoeging op 13/03/2017 22:00:34:[/size]
wat bedoel je met generate functie ? of waar vind ik deze
<?php
/**
* @title PayPal Class
*
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2012-2016, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / Framework / Payment / Gateway / Api
* @version 1.1
*/
namespace PH7\Framework\Payment\Gateway\Api;
defined('PH7') or exit('Restricted access');
use PH7\Framework\File\Stream, PH7\Framework\Url\Url;
/**
* @param boolean $bSandbox Default FALSE
* @return void
*/
public function __construct($bSandbox = false)
{
if ($bSandbox) $this->_sUrl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';;
$this->param('cmd', '_xclick');
}
/**
* Get Checkout URL.
*
* @return string
* @internal We added an empty parameter for the method only to be compatible with the API interface.
*/
public function getUrl($sParam = '')
{
return $this->_sUrl;
}
/**
* Get message status.
*
* @return string
*/
public function getMsg()
{
return $this->_sMsg;
}
/**
* Check if the transaction is valid.
*
* @return boolean
* @internal We added two empty parameters for the method only to be compatible with the API interface.
*/
public function valid($sParam1 = '', $sParam2 = '')
{
// If already validated, just return last result
if (true === $this->_bValid || false === $this->_bValid) return $this->_bValid;
$this->setParams();
$mStatus = $this->getStatus();
// Valid
if (0 == strcmp('VERIFIED', $mStatus))
{
if ($_POST['payment_status'] == 'Completed')
{
$this->_bValid = true;
$this->_sMsg = t('Transaction valid and completed.');
}
else
{
$this->_bValid = false;
$this->_sMsg = t('Transaction valid but not completed.');
}
}
// Invalid
elseif (0 == strcmp('INVALID', $mStatus))
{
$this->_bValid = false;
$this->_sMsg = t('Invalid transaction.');
}
// Bad Connection
else
{
$this->_bValid = false;
$this->_sMsg = t('Connection to PayPal failed.');
}
return $this->_bValid;
}
/**
* Connect to Paypal.
*
* @return mixed (boolean | string) Message from the transaction status on success or FALSE on failure.
*/
protected function getStatus()
{
$rCh = curl_init($this->_sUrl);
curl_setopt($rCh, CURLOPT_POST, 1);
curl_setopt($rCh, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rCh, CURLOPT_POSTFIELDS, $this->_sRequest);
curl_setopt($rCh, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($rCh, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($rCh, CURLOPT_HTTPHEADER, array('Host: www.paypal.com';));
$mRes = curl_exec($rCh);
curl_close($rCh);
unset($rCh);
return $mRes;
}
/**
* Set the data parameters POST from PayPal system.
*
* @return object this
*/
protected function setParams()
{
foreach ($this->getPostDatas() as $sKey => $sValue)
$this->setUrlData($sKey, $sValue);
return $this;
}
/**
* Set data URL e.g., "&key=value"
*
* @param string $sName
* @param string $sValue
* @return object this
*/
protected function setUrlData($sName, $sValue)
{
$this->_sRequest .= '&' . $sName . '=' . Url::encode($sValue);
return $this;
}
/**
* Get the Post Data.
*
* @return array
*/
protected function getPostDatas()
{
$rRawPost = Stream::getInput();
$aRawPost = explode('&', $rRawPost);
$aPostData = array();
foreach ($aRawPost as $sKeyVal)
{
$aKeyVal = explode ('=', $sKeyVal);
if (count($aKeyVal) == 2)
$aPostData[$aKeyVal[0]] = Url::encode($aKeyVal[1]);
unset($aKeyVal);
}
unset($aRawPost);
[size=xsmall]Toevoeging op 13/03/2017 22:15:18:[/size]
<?php
tinyMCEPopup.requireLangPack();
var defaultFonts = "" +
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
"Courier New, Courier, mono=Courier New, Courier, mono;" +
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
"Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
"Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
var defaultTextStyle = "normal;italic;oblique";
var defaultVariant = "normal;small-caps";
var defaultLineHeight = "normal";
var defaultAttachment = "fixed;scroll";
var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
var defaultPosH = "left;center;right";
var defaultPosV = "top;center;bottom";
var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
var defaultBorderWidth = "thin;medium;thick";
var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
function init() {
var ce = document.getElementById('container'), h;
if (!f.positioning_clip_same.checked) {
s = "rect(";
s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
s += ")";
if (s != "rect(auto auto auto auto)")
ce.style.clip = s;
} else {
s = "rect(";
t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
s += t + " ";
s += t + " ";
s += t + " ";
s += t + ")";
if (s != "rect(auto auto auto auto)")
ce.style.clip = s;
}
ce.style.cssText = ce.style.cssText;
}
function isNum(s) {
return new RegExp('[0-9]+', 'g').test(s);
}
function showDisabledControls() {
var f = document.forms, i, a;
for (i=0; i<f.length; i++) {
for (a=0; a<f[i].elements.length; a++) {
if (f[i].elements[a].disabled)
tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
else
tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
}
}
}
function fillSelect(f, s, param, dval, sep, em) {
var i, ar, p, se;