Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ Paymentwall_Base::setAppKey('YOUR_APPLICATION_KEY'); // available in your Paymen
Paymentwall_Base::setSecretKey('YOUR_SECRET_KEY'); // available in your Paymentwall merchant area
$pingback = new Paymentwall_Pingback($_GET, $_SERVER['REMOTE_ADDR']);
if ($pingback->validate()) {

// check if $pingback->getPingbackUniqueId() was already processed to avoid duplicate product delivery

$productId = $pingback->getProduct()->getId();
if ($pingback->isDeliverable()) {
// deliver the product
Expand Down Expand Up @@ -131,6 +134,9 @@ Paymentwall_Base::setAppKey('YOUR_APPLICATION_KEY'); // available in your Paymen
Paymentwall_Base::setSecretKey('YOUR_SECRET_KEY'); // available in your Paymentwall merchant area
$pingback = new Paymentwall_Pingback($_GET, $_SERVER['REMOTE_ADDR']);
if ($pingback->validate()) {

// check if $pingback->getPingbackUniqueId() was already processed to avoid duplicate product delivery

$virtualCurrency = $pingback->getVirtualCurrencyAmount();
if ($pingback->isDeliverable()) {
// deliver the virtual currency
Expand Down Expand Up @@ -204,6 +210,9 @@ Paymentwall_Base::setAppKey('YOUR_APPLICATION_KEY'); // available in your Paymen
Paymentwall_Base::setSecretKey('YOUR_SECRET_KEY'); // available in your Paymentwall merchant area
$pingback = new Paymentwall_Pingback($_GET, $_SERVER['REMOTE_ADDR']);
if ($pingback->validate()) {

// check if $pingback->getPingbackUniqueId() was already processed to avoid duplicate product delivery

$products = $pingback->getProducts();
if ($pingback->isDeliverable()) {
// deliver products from the cart
Expand Down Expand Up @@ -478,4 +487,4 @@ if (!empty($response['success'])) {
var_dump($response['error']);
var_dump($response['code']);
}
```
```