Skip to main content

Posts

Showing posts from May, 2020

Twitter API Twitter asking for user permission each time

SOLUTION:- Twitter Login API Asking for  user's authorize permission each time When we integrate twitter login in NodeJS, PHP, express, react, Fastify or any framework, we face an issue like if a user is logged in by using twitter OAuth and granted permission to access twitter profile data, and if he logged out from our site try to login again, twitter ask for permission each time. So today we solve this problem by using a simple change Open your code and find https://twitter.com/oauth/authorize?oauth_token= in your code. this is the URL where we redirect to the user after clicking on 'Login with twitter' in our website, and here we are using authorize() function of twitter API that functions always ask for permission to the user each time he tries to log in, so instead of authorizing function we will use authenticate() that will check if a user is already logged in then it will not show permission popup and redirect the user to callback URL. To Replace https://t...

CakePHP Paypal payment gateway Integration

How to Integrate Paypal Payment Gateway with Cakephp Cakephp 3 is a PHP framework that is the most popular for rapid application development and Paypal is the most popular payment gateway. So today we will learn how to integrate Paypal with CakePHP. For this tutorial, I am using CakePHP 4 which is the latest version of CakePHP but steps will be the same for CakePHP 3x. So Keep following the below steps. First, we will create a sandbox account to test our payment gateway later and we need to create both accounts personal and business so we can test, so if you have already created that then skip this step, and if you want to create a new sandbox test account then click here. Also, we need client id and secret that we can get by creating an app in the PayPal developer account. Go to the developer website and click on My Apps & Credentials then click on Create App Button Then fill the App name and select a business account that we have recently creat...

How to Create Paypal sandbox business and personal test accounts

Create Paypal sandbox business and personal test accounts Paypal is the most popular payment gateway that is used by many websites and its easy to integrate PayPal payment gateway in web applications. Paypal provides Sandbox test accounts for testing so we can test our website payment functionality without any hesitation. So today we learn how to create sandbox credentials that we can use for testing. Open paypal.com or https://developer.paypal.com/classic-home/  and login with your live credentials or developer account credentials. Now go to https://developer.paypal.com/developer/accounts/ and click on Create Account button After clicking on it, You will see a popup like below Now you can select a Personal account or business account by selecting Account Type and then click on the create button. It will create your test accounts, I have created both business and personal account so you can see its showing 2 accounts there. d Now click on t...