HOMO CMD24 (id 36939583973678)
Web Payment
doWebPayment (light) - doWebPayment (full) - getWebPaymentDetails
Demo that shows the usage of Payline webPayment API
display example only html code | php code | css code
span style="color: #ff0000;">'../initSDK.php'; use Payline\PaylineSDK; //VERSION 'version''WS_VERSION']; // PAYMENT 'payment']['amount''amount''payment']['currency''currency''payment']['action''PAYMENT_ACTION''payment']['mode''PAYMENT_MODE']; // ORDER 'order']['ref''ref''order']['amount''amount''order']['currency''currency''order']['date''d/m/Y H:i'); // CONTRACT NUMBERS 'payment']['contractNumber''CONTRACT_NUMBER'";"'CONTRACT_NUMBER_LIST''contracts'";"'SECOND_CONTRACT_NUMBER_LIST''secondContracts'] = $secondContracts; // URLS 'notificationURL''NOTIFICATION_URL''returnURL''RETURN_URL''cancelURL''CANCEL_URL']; // options 'customPaymentPageCode''CUSTOM_PAYMENT_PAGE_CODE''customPaymentTemplateURL''CUSTOM_PAYMENT_TEMPLATE_URL''languageCode''LANGUAGE_CODE']; // BUYER 'buyer']['legalStatus''buyerLegalStatus''buyer']['title''buyerTitle''buyer']['lastName''buyerLastName''buyer']['firstName''buyerFirstName''buyer']['email''buyerEmail''buyer']['mobilePhone''mobilePhone''buyer']['customerId''customerId''buyer']['accountCreateDate''buyerAccountCreateDate''buyer']['accountAverageAmount''buyerAverageAmount''buyer']['accountOrderCount''buyerOrderCount''buyer']['walletId''buyerWalletId''buyer']['walletDisplayed''buyerWalletDisplayed''buyer']['walletSecured''buyerWalletSecured''buyer']['walletCardInd''buyerWalletCardInd''buyer']['ip''buyerIp''buyer']['legalDocument''legalDocument''buyer']['birthDate''birthDate''buyer']['fingerprintID''fingerprintID']; // BILLING ADDRESS 'billingAddress']['title''billingAddressTitle''billingAddress']['firstName''billingAddressFirstName''billingAddress']['lastName''billingAddressLastName''billingAddress']['name''billingAddressName''billingAddress']['street1''billingAddressStreet1''billingAddress']['street2''billingAddressStreet2''billingAddress']['county''billingAddressCounty''billingAddress']['cityName''billingAddressCity''billingAddress']['zipCode''billingAddressZipCode''billingAddress']['country''billingAddressCountry''billingAddress']['state''billingAddressState''billingAddress']['phoneType''billingAddressPhoneType''billingAddress']['phone''billingAddressPhone']; // SHIPPING ADDRESS 'shippingAddress']['title''shippingAddressTitle''shippingAddress']['firstName''shippingAddressFirstName''shippingAddress']['lastName''shippingAddressLastName''shippingAddress']['name''shippingAddressName''shippingAddress']['street1''shippingAddressStreet1''shippingAddress']['street2''shippingAddressStreet2''shippingAddress']['county''shippingAddressCounty''shippingAddress']['cityName''shippingAddressCity''shippingAddress']['zipCode''shippingAddressZipCode''shippingAddress']['country''shippingAddressCountry''shippingAddress']['state''shippingAddressState''shippingAddress']['phoneType''shippingAddressPhoneType''shippingAddress']['phone''shippingAddressPhone']; // EXECUTE 'result']['code'] == '00000''data-template']=="redirect""location:".$response['redirectURL'// affichage du wigdet "<!DOCTYPE html><html><head><title>Payline API Widget</title>""<meta name='viewport' content='width=device-width, initial-scale=1'>""<meta http-equiv='X-UA-Compatible' content='IE=edge'>""<meta charset='UTF-8'>""<!--SCRIPTS-->"'ENVIRONMENT'"<script src='""'></script>""<script src='""'></script>""<script src='""'></script>""<!--SCRIPTS END-->""<!--STYLES -->"'ENVIRONMENT'"<link rel='stylesheet' href='""'>""<link rel='stylesheet' href='""'>""<link rel='stylesheet' href='""'>""<!--STYLES END-->""</head><body>""<div id='PaylineWidget' data-token='".$response['token']."' data-template='"'data-template']."' ></div>""</body></html>"'ERROR : '.$response['result']['code']. ' '.$response['result']['longMessage'].' <BR/>'; }
"../demos/web.php""post""payline-form" Do Web Payment minimal informations "row" "ref"Order reference "text""ref""ref""<?php echo 'PHP-'.time()?>"> <span class="help">(required)</span> </div> <div class="row"> <label for="amount">Amount</label> <input type="" name="amount" id="amount" value="33300"> <span class="help">(required)</span> </div> <div class="row"> <label for="currency">Currency</label> <input type="" name="currency" id="currency" value="978"> <span class="help">(required)</span> </div> </fieldset> <fieldset> <h4>User Experience : redirection / lightbox / inside the shop</h4> <div class="row"> <label for="">template</label> <select name="" id=""> <option value="" selected>redirect</option> <option value="lightbox">lightbox</option> <option value="tab">in-shop tab</option> <option value="column">in-shop column</option> </select> </div> </fieldset> <input type="submit" name="submit" class="submit" value="doWebPayment"> </form>
/* @group Forms *//* @end */