NoWayHome Posted March 8 Share Posted March 8 <?php if (!defined('FLUX_ROOT')) exit; if (empty($amount)) { return false; } $session = Flux::$sessionData; $customDataArray = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id); $customDataEscaped = htmlspecialchars(base64_encode(serialize($customDataArray))); $businessEmail = htmlspecialchars(Flux::config('PayPalBusinessEmail')); $donationCurrency = htmlspecialchars(Flux::config('DonationCurrency')); $creditExchangeRate = Flux::config('CreditExchangeRate'); $donationCredits = floor($amount / $creditExchangeRate); $itemName = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits))); ?> <form action="https://<?php echo Flux::config('PayPalIpnUrl') ?>/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations" /> <input type="hidden" name="notify_url" value="<?php echo $this->url('donate', 'notify', array('_host' => true)) ?>" /> <input type="hidden" name="return" value="<?php echo $this->url('main', 'index', array('_host' => true)) ?>" /> <input type="hidden" name="custom" value="<?php echo $customDataEscaped ?>" /> <input type="hidden" name="business" value="<?php echo $businessEmail ?>" /> <input type="hidden" name="item_name" value="<?php echo $itemName ?>" /> <input type="hidden" name="amount" value="<?php echo (float)$amount ?>" /> <input type="hidden" name="no_shipping" value="0" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="currency_code" value="<?php echo $donationCurrency ?>" /> <input type="hidden" name="tax" value="0" /> <input type="hidden" name="lc" value="US" /> <input type="hidden" name="bn" value="PP-DonationsBF" /> <p style="text-align: center"><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" /></p> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /> </form> Anyone can please help me on changing this web function? Because it shown donation doesn't support in my country, I wish to change it to Buynow. I have done the link at paypal but don't how to change those code such as: $session = Flux::$sessionData; $customDataArray = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id); $customDataEscaped = htmlspecialchars(base64_encode(serialize($customDataArray))); $businessEmail = htmlspecialchars(Flux::config('PayPalBusinessEmail')); $donationCurrency = htmlspecialchars(Flux::config('DonationCurrency')); $creditExchangeRate = Flux::config('CreditExchangeRate'); $donationCredits = floor($amount / $creditExchangeRate); $itemName = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits))); I have tried myself but failed, im new to this... Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted March 9 Share Posted March 9 On 3/8/2022 at 12:39 PM, NoWayHome said: https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif replace with your own image button, or go Paypal generate a new Buy Now codes instead? Quote Link to comment Share on other sites More sharing options...
0 NoWayHome Posted March 12 Author Share Posted March 12 On 3/9/2022 at 7:58 PM, Emistry said: replace with your own image button, or go Paypal generate a new Buy Now codes instead? Thanks for you reply. What I means is the after click on the button which I have changed to BuyNow but it still in donate function. Quote Link to comment Share on other sites More sharing options...
Anyone can please help me on changing this web function?
Because it shown donation doesn't support in my country, I wish to change it to Buynow.
I have done the link at paypal but don't how to change those code such as:
$session = Flux::$sessionData; $customDataArray = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id); $customDataEscaped = htmlspecialchars(base64_encode(serialize($customDataArray))); $businessEmail = htmlspecialchars(Flux::config('PayPalBusinessEmail')); $donationCurrency = htmlspecialchars(Flux::config('DonationCurrency')); $creditExchangeRate = Flux::config('CreditExchangeRate'); $donationCredits = floor($amount / $creditExchangeRate); $itemName = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits)));I have tried myself but failed, im new to this...
Link to comment
Share on other sites