thenbrent / paypal-digital-goods Goto Github PK
View Code? Open in Web Editor NEWThe missing PayPal Digital Goods PHP library. Discontinued - PayPal no longer offer the Digital Goods product.
License: Other
The missing PayPal Digital Goods PHP library. Discontinued - PayPal no longer offer the Digital Goods product.
License: Other
Hi.
I have a problem. It's give me an error "Calling PayPal with action CreateRecurringPaymentsProfile has Failed: The token is invalid" after I pay it give me this error. I use this to code to initial and create pay button.
can you help me?
Are you using return.php to verify the payments? If yes, could you provide your IPN implementation please
Hi i was using the code of Paypal Digital Goods with the this example (https://github.com/thenbrent/paypal-digital-goods-php-examples/blob/master/example-purchase.php) and after i click the button, i get this message below.
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie
/n
Can you tell me what's wrong ?
User's using PayPal's 2FA (two factor authentication) security can't login using the Digital Goods API. They basically get a user/password combination error on every login request. As this is a growing feature that's being actively promoted by PayPal to improve user security, it would be good to support if possible.
I think that PAYMENTREQUEST_0_NOTIFYURL
should be used (twice) instead of NOTIFYURL
for the subscription class too.
This will not give a tab as you expect:
date( 'Y-m-d\TH:i:s', time() + ( 24 * 60 * 60 ) ),
corrected:
date( "Y-m-d\tH:i:s", time() + ( 24 * 60 * 60 ) ),
Would payments (specifically recurring payments) work if the PayPal button was hosted on a static page, the callback URL was the only scripted page, and that page instantiated a new PayPal_Subscription{} object and called start_subscription() upon it?
e.g. /donate.html -> PayPal.com -> /process.php -> thank-you.html
Think of the paypal button on a site generated by Jekyll or Pelican.
Thanks!
Hi, it would be nice if we can install this via composer.
Just like modern php package.
Thank you
http://paypal.brentshepherd.com/
There is an error on the main example. Will this ever be fixed?
SetExpressCheckout failed: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure(35)
how can we add paypal landing page option ,
LANDINGPAGE = billing
LANDINGPAGE = buyer
Might be good to add a note saying reoccurring payments don't work from German PayPal accounts due to some regulatory issue (spent a week with PayPal tech support before they told me that lol)
Hi,
is this Class actual maintained or is it outdated?
Cheers
I have a question. But I did not know how to discuss it without posting it as an "issue".
I am loading the "Pay With PayPal" through AJAX because the when the user enters a coupon code I have to reload the button with the new price.
Unfortunately, the PayPal window does not open in a light-box after doing this.
I have tried
$('#paypal-submit').live("click", function(){
var dg = new PAYPAL.apps.DGFlow({
trigger: "paypal-submit"
});
});
And :
$('#paypal-submit').live("click", function(){
var dg = new PAYPAL.apps.DGFlow();
dg.startFlow('https://www.sandbox.paypal.com/incontext?token=EC-5B05061913748630E');
});
Is there a solution this problem?
Hello,
buyer is getting following error message after clicking login...
We are unable to complete your request at this time. Please try again later. We apologize for the inconvenience.
I have embedded flow for paypal adaptive payment with code
<script src="https://www.paypalobjects.com/js/external/dg.js" type="text/javascript"></script>
<body>
<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay" target="PPDGFrame" class="standard">
<label for="buy">Buy Now:</label>
<input type="image" id="submitBtn" value="Pay with PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif">
<input id="type" type="hidden" name="expType" value="light">
<input id="paykey" type="hidden" name="paykey" value="<?php echo $PayKey ?>">
</form>
<script type="text/javascript" charset="utf-8">
var embeddedPPFlow = new PAYPAL.apps.DGFlow({trigger: 'submitBtn'});
</script>
</body>
</html>
From the page http://localhost/ecommerce/subscription/1/register -[before_pay_url] I am going to mini-window.
In the Pay() request- I set the return_url as http://localhost/ecommerce/paypal/adaptive_payments/payment_details - [after_pay_url]
After the completion of payment from mini-window there is the close button.Now on click of that close button I want to goto url [after_pay_url]
But what is happening is that on click of close button the contents of [after_pay_url] are displayed on same page [before_pay_url]
So the question is how could I get redirected to page on click on close button of embedded paypal mini-browser
Please update the demo, there seems to be an encoding error.
To allow guest checkout, as explained here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout
Hello,
cheers for fantastic script. I have a question regarding subscription postback, is there a way to make a a postback every month/week whenever recurring payment is done? I would like to have some kind of "notification" when user cancels subscription.
Is it possible to allow users to choose the payment method when using subscriptions also is it possible to have guest payments?
Hi , i saw the doc but i have not found where i'm i supposed to add the invoice id or user id with items so i can save data about the used who purchased ,
Thank you
I Downloaded and installed the example.
I tried to test it with the prefilled API data and my own - both ways got that error:
Screenshot
I tested it locally and on my webhost. Is there anything I forgot to fill in?
The git installation doesn't work for me, I had to download it classes for the lib manually and remove this line of code '/paypal-digital-goods/' from the functions.php
First, I would like to thank you in this great library! Its awesome!
And now I have one question. How to open pay window on same window or on other tab or something.. because he open two more popup-s, look the picture. Is there any chance to fix it on something or must be something like that to secure payment?
Code working fine on my localhost but throwing error on actual domain
Fatal error: Uncaught exception 'Exception' with message 'SetExpressCheckout failed: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure(35)' in /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php:214 Stack trace: #0 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(162): PayPal_Digital_Goods->call_paypal('SetExpressCheck...') #1 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(301): PayPal_Digital_Goods->request_checkout_token() #2 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(327): PayPal_Digital_Goods->get_buy_button(Array) #3 /nfs/c11/h05/mnt/204951/domains/8print.co/html/estimate.php(386): PayPal_Digital_Goods->print_buy_button() #4 {main} thrown in /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php on line 214
If it can be done via paypal-configuration-class.php then this class can be more useful for developers.
Thanks in advance
$api_request .= '&L_PAYMENTREQUEST_0_ITEMCATEGORY'.$item_count.'=Digital'
or
$api_request .= '&L_PAYMENTREQUEST_0_ITEMCATEGORY'.$item_count.'=Physical'
The most common error with Paypal Express Checkout is people not having a valid funding source (code 10486).
I'm confused on how to integrate this properly. Paypal currently simply says 'Something went wrong, please try again later', but there's a way to redirect the user to their funding source page while being able to complete the payment after selecting a working funding source: https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486
I'd love to see this error handled correctly, and possibly a way to handle other errors too.
Hi Brent,
The plugin works perfectly in Paypal sandbox mode.
However, enabling live mode result the following error:
Calling PayPal with action SetExpressCheckout has Failed: You are not signed up to accept payment for digitally delivered goods.
I would appreciate any help you provide.
Regards
Mahmoud
Is there such a thing already? I'm trying to figure out how to detect on my site if a user cancels the subscription directly with PayPal.
In main class there are some exit calls, but this seems to be not so good solution. I just had to change it in my project. Most simpe solution would be replacing exit => throw new Exception and done. That adds possibility to handle errors in my code however I want.
At the begining, I really thought that
if( isset( $_GET['PayerID'] ) ) {
$paypal = create_example_purchase();
$response = $paypal->process_payment();
} else {
$paypal = create_example_subscription();
$response = $paypal->start_subscription();
}
is just being used for connection reasons but what it does is create another payment - and the confusion led me into charging my customer another amount than the customer agreed on.
Basically, I can charge my customer anything I want - at least in Sandbox.
Is Paypal really allowing the merchants to charge more then the user agreed on?
Don't get me wrong - i just want to draw my security line in further coding.
Test with your example pages, purchase method works well.
Subscription Method interrupts after Login on Paypal (Sandbox) -> Cancel Payment.
looks like the problem is only for german subscribers
Can you confirm?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.