This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blinkai.server.service; | |
import static com.amazonaws.services.s3.model.CannedAccessControlList.PublicRead; | |
import static com.blinkai.server.util.Constants.S3_BUCKET_NAME; | |
import static com.blinkai.server.util.StringUtils.isEmpty; | |
import static org.mockito.ArgumentMatchers.any; | |
import static org.mockito.ArgumentMatchers.eq; | |
import static org.mockito.Mockito.doReturn; | |
import static org.mockito.Mockito.doThrow; | |
import static org.mockito.Mockito.times; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CheckIfWeHaveFirstAndLastName": { | |
"name": "GetNameFromContext", | |
"next": { | |
"yes": "CheckIfWeHavePhone", | |
"no": "WelcomeAndAskForFirstName" | |
} | |
}, | |
"WelcomeAndAskForFirstName": { | |
"name": "CollectName", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xfeD8fe26C923241407cA36F39ec34A5DCFDE0fec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.paypal.api.payments.CreditCard; | |
import com.paypal.base.rest.APIContext; | |
import com.paypal.base.rest.PayPalRESTException; | |
public class JavaSampleOne { | |
public static void main(String[] args) { | |
// Replace these values with your clientId and secret. You can use these to get started right now. | |
String clientId = "AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS"; | |
String clientSecret = "EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ### Create Patch Request | |
List<Patch> patchRequest = new ArrayList<Patch>(); | |
// ### Amount | |
// Let's update the payment amount as an example. | |
Amount amount = new Amount(); | |
amount.setCurrency("USD"); | |
// Total must be equal to sum of shipping, tax and subtotal. | |
amount.setTotal("17.50"); | |
amount.setDetails(new Details().setShipping("11.50").setTax("1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS `tilupay` /*!40100 DEFAULT CHARACTER SET latin1 */; | |
USE `tilupay`; | |
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) | |
-- | |
-- Host: localhost Database: tilupay | |
-- ------------------------------------------------------ | |
-- Server version 5.5.42 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Just for error purposes | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
// 1. Autoload the SDK Package. This will include all the files and classes to your autoloader | |
require __DIR__ . '/PayPal-PHP-SDK/autoload.php'; | |
// 2. Provide your Secret Key. Replace the given one with your app clientId, and Secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dirname=PayPalPHPSDK$(date +%s) | |
mkdir $dirname | |
cd $dirname | |
php -r "readfile('https://getcomposer.org/installer');" | php | |
php composer.phar require paypal/rest-api-sdk-php | |
php -f vendor/paypal/rest-api-sdk-php/sample/index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Autoload the SDK Package. This will include all the files and classes to your autoloader | |
require __DIR__ . '/PayPal-PHP-SDK/autoload.php'; | |
// 2. Define PP_CONFIG_PATH directory | |
if(!defined("PP_CONFIG_PATH")) { | |
define("PP_CONFIG_PATH", __DIR__); | |
} | |
// 3. Lets try to create a Payment | |
// https://developer.paypal.com/docs/api/payments/#payment_create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;## This is an example configuration file for the SDK. | |
;## The sample scripts configure the SDK dynamically | |
;## but you can choose to go for file based configuration | |
;## in simpler apps (See bootstrap.php for more). | |
[Account] | |
acct1.ClientId = AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS | |
acct1.ClientSecret = EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL | |
;Connection Information | |
[Http] |
NewerOlder