|
|
|
@ -13,6 +13,8 @@ if (!defined('_ECRIRE_INC_VERSION')){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
include_spip('formidablepaiement_fonctions');
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Rediriger vers le checkout apres un paiement qui demande confirmation
|
|
|
|
|
* (type paypal express)
|
|
|
|
@ -34,8 +36,7 @@ function formidablepaiement_formulaire_charger($flux){
|
|
|
|
|
|
|
|
|
|
// verifier que la transaction en session est bien associee a ce formulaire
|
|
|
|
|
$id_formulaire = formidable_id_formulaire($id);
|
|
|
|
|
$parrain = "form{$id_formulaire}:";
|
|
|
|
|
if (strncmp($trans['parrain'], $parrain, strlen($parrain))==0){
|
|
|
|
|
if ($trans['parrain'] === formidablepaiement_parrain($id_formulaire)){
|
|
|
|
|
// on reaffiche le modele de paiement qui demande confirmation
|
|
|
|
|
$form = recuperer_fond("modeles/formidablepaiement-transaction", array('id_transaction' => $id_transaction, 'transaction_hash' => $trans['transaction_hash']));
|
|
|
|
|
$flux['data'] =
|
|
|
|
@ -94,7 +95,7 @@ function formidablepaiement_formulaire_fond($flux){
|
|
|
|
|
function formidablepaiement_bank_dsp2_renseigner_facturation($flux){
|
|
|
|
|
// si c'est une transaction associee a un form
|
|
|
|
|
if ($id_transaction = $flux['args']['id_transaction']
|
|
|
|
|
and preg_match(",form\d+:,", $flux['args']['parrain'])
|
|
|
|
|
and $id_formulaire = formidablepaiement_is_parrain_formidable($flux['args']['parrain'])
|
|
|
|
|
and $id_formulaires_reponse = $flux['args']['tracking_id']){
|
|
|
|
|
|
|
|
|
|
include_spip('formidable_fonctions');
|
|
|
|
@ -136,7 +137,7 @@ function formidablepaiement_bank_dsp2_renseigner_facturation($flux){
|
|
|
|
|
function formidablepaiement_bank_traiter_reglement($flux){
|
|
|
|
|
// si c'est une transaction associee a un form
|
|
|
|
|
if ($id_transaction = $flux['args']['id_transaction']
|
|
|
|
|
and preg_match(",form\d+:,", $flux['args']['avant']['parrain'])
|
|
|
|
|
and $id_formulaire = formidablepaiement_is_parrain_formidable($flux['args']['avant']['parrain'])
|
|
|
|
|
and $id_formulaires_reponse = $flux['args']['avant']['tracking_id']){
|
|
|
|
|
|
|
|
|
|
include_spip('formidable_fonctions');
|
|
|
|
@ -164,7 +165,8 @@ function formidablepaiement_affiche_enfants($flux){
|
|
|
|
|
|
|
|
|
|
$reponse = sql_fetsel('*', 'spip_formulaires_reponses', 'id_formulaires_reponse=' . intval($id_formulaires_reponse));
|
|
|
|
|
|
|
|
|
|
$where = "parrain LIKE " . sql_quote('form' . $reponse['id_formulaire'] . ':%') . " AND tracking_id=" . intval($id_formulaires_reponse);
|
|
|
|
|
$parrain = formidablepaiement_parrain($reponse['id_formulaire']);
|
|
|
|
|
$where = "parrain=" . sql_quote($parrain) . " AND tracking_id=" . intval($id_formulaires_reponse);
|
|
|
|
|
$flux['data'] .= recuperer_fond("prive/objets/liste/transactions", array('where' => $where));
|
|
|
|
|
}
|
|
|
|
|
return $flux;
|
|
|
|
@ -174,7 +176,8 @@ function formidablepaiement_affiche_milieu($flux){
|
|
|
|
|
if ($flux['args']['exec']=='formulaires_reponses'
|
|
|
|
|
and $id_formulaire = $flux['args']['id_formulaire']){
|
|
|
|
|
|
|
|
|
|
$where = "parrain LIKE " . sql_quote('form' . $id_formulaire . ':%');
|
|
|
|
|
$parrain = formidablepaiement_parrain($id_formulaire);
|
|
|
|
|
$where = "parrain=" . sql_quote($parrain);
|
|
|
|
|
$flux['data'] .= recuperer_fond("prive/objets/liste/transactions", array('where' => $where));
|
|
|
|
|
}
|
|
|
|
|
return $flux;
|
|
|
|
|