├── .gitignore ├── SampleApp ├── debug.keystore ├── README.md ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── dimens.xml │ │ │ ├── values-sw600dp │ │ │ │ └── dimens.xml │ │ │ ├── values-sw720dp-land │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── paypal │ │ │ └── example │ │ │ └── paypalandroidsdkexample │ │ │ └── SampleActivity.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── paypal │ │ └── example │ │ └── paypalandroidsdkexample │ │ └── test │ │ ├── PaymentTest.java │ │ └── TestHelper.java ├── .gitignore ├── gradlew.bat ├── build.gradle └── gradlew ├── SampleApp-Kotlin ├── debug.keystore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── README.md ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── dimens.xml │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── paypal │ │ └── example │ │ └── paypalandroidsdkexample │ │ └── SampleActivity.kt ├── .gitignore ├── build.gradle ├── gradlew.bat └── gradlew ├── aars └── PayPalAndroidSDK-2.16.0.aar ├── CONTRIBUTING.md ├── .github └── ISSUE_TEMPLATE.md ├── docs ├── ja │ ├── future_payment_error_codes.md │ ├── profile_sharing_server.md │ ├── single_payment.md │ ├── future_payments_mobile.md │ ├── profile_sharing_mobile.md │ ├── README.md │ └── future_payments_server.md ├── future_payment_error_codes.md ├── supplemental_errors.md ├── single_payment.md ├── future_payments_mobile.md ├── profile_sharing_mobile.md ├── profile_sharing_server.md └── future_payments_server.md ├── LICENSE ├── acknowledgments.md ├── README.md └── CHANGELOG.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /SampleApp/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/debug.keystore -------------------------------------------------------------------------------- /SampleApp-Kotlin/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/debug.keystore -------------------------------------------------------------------------------- /aars/PayPalAndroidSDK-2.16.0.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/aars/PayPalAndroidSDK-2.16.0.aar -------------------------------------------------------------------------------- /SampleApp/README.md: -------------------------------------------------------------------------------- 1 | PayPal Android SDK Sample App 2 | ============================= 3 | 4 | All users can build this sample app as-is. 5 | -------------------------------------------------------------------------------- /SampleApp/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /SampleApp-Kotlin/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /SampleApp/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp-Kotlin/README.md: -------------------------------------------------------------------------------- 1 | PayPal Android SDK Sample App - Kotlin 2 | ============================= 3 | 4 | This is the PayPal Android SDK Sample App using the Kotlin Language. 5 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paypal/PayPal-Android-SDK/HEAD/SampleApp-Kotlin/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SampleApp/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PayPal SDK Example 5 | 6 | 7 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PayPal SDK Example 5 | 6 | 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribute to the PayPal Android SDK 2 | 3 | We love your contributions. If you're looking to submit changes to the sample app or documentation available within this repo, feel free to submit a PR. 4 | -------------------------------------------------------------------------------- /SampleApp/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10dip 4 | 10dip 5 | 6 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10dip 4 | 10dip 5 | 6 | -------------------------------------------------------------------------------- /SampleApp/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SampleApp/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 22 16:47:15 CDT 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip 7 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 29 16:07:52 CDT 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip 7 | -------------------------------------------------------------------------------- /SampleApp/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /SampleApp/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Eclipse settings files 23 | .settings/ 24 | 25 | # IntelliJ project files 26 | *.iml 27 | *.ipr 28 | *.iws 29 | .idea/ 30 | 31 | # Misc 32 | .DS_Store 33 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Eclipse settings files 23 | .settings/ 24 | 25 | # IntelliJ project files 26 | *.iml 27 | *.ipr 28 | *.iws 29 | .idea/ 30 | 31 | # Misc 32 | .DS_Store 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | ### General information 3 | 4 | * SDK/Library version: 5 | * Environment: 6 | * `PayPal-Debug-ID` values: 7 | * Android Version and Device: 8 | 9 | ### Issue description 10 | 11 | 12 | -------------------------------------------------------------------------------- /SampleApp/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/ja/future_payment_error_codes.md: -------------------------------------------------------------------------------- 1 | # 今後の支払い(Future Payments)に関するエラーコード 2 | 3 | 以下のエラーコードは、[REST決済APIエラーコード](https://developer.paypal.com/webapps/developer/docs/api/#errors)の補足です。 4 | 5 | ##### invalid_request 6 | 7 | **内部エラー** 8 | 9 | この支払いは、PayPalでは完了できません。 10 | 11 | _または_ 12 | 13 | **アクセストークンが無効です** 14 | 15 | アクセストークンが無効または期限切れです。アクセストークンは、元のリクエストトークンを使用して更新する必要があります。 16 | 17 | _または_ 18 | 19 | **リフレッシュトークンが無効です** 20 | 21 | リフレッシュトークンが無効または期限切れです。ユーザーの同意を得て、期限切れまたは無効なリフレッシュトークンを置き換える新しいリフレッシュトークンを取得してください。 22 | 23 | ##### REQUIRED_SCOPE_MISSING 24 | 25 | **アクセストークンに必要なスコープがありません** 26 | 27 | このタイプのリクエストに必要な正しいスコープを使用して、ユーザーの同意を得てください。 28 | 29 | ##### INSUFFICIENT_FUNDS 30 | 31 | **買い手は支払えません - 資金不足です** 32 | 33 | 買い手は、有効な支払い方法(クレジットカードや銀行口座など)をPayPalアカウントに追加する必要があります。 34 | 35 | ##### TRANSACTION_REFUSED_PAYEE_PREFERENCE 36 | 37 | **マーチャントの個人設定で特定取引の自動拒否が設定されています** 38 | 39 | マーチャントのアカウントは、この特定タイプの取引を拒否するよう設定されています。 40 | 41 | ##### INVALID_FACILITATOR_CONFIGURATION 42 | 43 | **この取引は無効なファシリテーター設定により処理できません。** 44 | 45 | この種類の取引を処理するには、適切なアカウント設定が必要です。 46 | 47 | -------------------------------------------------------------------------------- /docs/future_payment_error_codes.md: -------------------------------------------------------------------------------- 1 | # Error Codes related to Future Payments 2 | 3 | The following error codes supplement the [REST Payment API error codes](https://developer.paypal.com/webapps/developer/docs/api/#errors). 4 | 5 | ##### invalid_request 6 | 7 | **Internal error** 8 | 9 | This payment cannot be completed through PayPal. 10 | 11 | _or_ 12 | 13 | **Invalid access token** 14 | 15 | Access token is invalid or expired. The access token needs to be refreshed using the original request token. 16 | 17 | _or_ 18 | 19 | **Invalid refresh token** 20 | 21 | Refresh token is invalid or expired. Obtain consent from the user and get a new refresh token to replace your expired or invalid refresh token. 22 | 23 | ##### REQUIRED_SCOPE_MISSING 24 | 25 | **Access token does not have required scope** 26 | 27 | Obtain user consent using the correct scope required for this type of request. 28 | 29 | ##### INSUFFICIENT_FUNDS 30 | 31 | **Buyer cannot pay - insufficient funds** 32 | 33 | Buyer needs to add a valid funding instrument (e.g. credit card or bank account) to their PayPal account. 34 | 35 | ##### TRANSACTION_REFUSED_PAYEE_PREFERENCE 36 | 37 | **Merchant profile preference is set to automatically deny certain transactions** 38 | 39 | The merchant account preferences are set to deny this particular kind of transaction. 40 | 41 | ##### INVALID_FACILITATOR_CONFIGURATION 42 | 43 | **This transaction cannot be processed due to an invalid facilitator configuration.** 44 | 45 | You must have the right account configuration to process this kind of transaction. 46 | 47 | -------------------------------------------------------------------------------- /docs/supplemental_errors.md: -------------------------------------------------------------------------------- 1 | Supplemental Errors 2 | =================== 3 | 4 | The PayPal REST API errors are documented [here](https://developer.paypal.com/docs/api/#errors). The errors listed on this payge may also be encountered when making payments: 5 | 6 | - **PAYMENT_CREATION_ERROR** 7 | - There was a problem setting up the payment. This error is usually related the payment methods available in the users account and the merchant requirements. 8 | - **PAYMENT_CREATION_ERROR_EXPIRED_PAYMENT_CARD** 9 | - There was a problem setting up the payment. The only card available in the user's account is expired. 10 | - **PAYMENT_CREATION_ERROR_INSTANT_PAYMENT_REQUIRED** 11 | - There was a problem setting up the payment. The payment requires an instant payment but this is not available in the user's account. 12 | - **PAYMENT_CREATION_ERROR_NEED_CONFIRMED_CARD** 13 | - There was a problem setting up the payment. The payment requires a confirmed card but one is not available in the user's account. 14 | - **PAYMENT_CREATION_ERROR_NEED_PHONE_NUMBER** 15 | - There was a problem setting up the payment. The payment requires a phone number but one is not available in the user's account. 16 | - **PAYMENT_CREATION_ERROR_NEED_VALID_FUNDING_INSTRUMENT** 17 | - There was a problem setting up the payment. The user's account does not contain a valid way to make this payment. 18 | - **PAYMENT_CREATION_ERROR_NEGATIVE_BALANCE** 19 | - There was a problem setting up the payment. The user's account balance is negative and no other viable options are present. 20 | - **PAYMENT_CREATION_ERROR_SENDING_LIMIT_REACHED** 21 | - There was a problem setting up the payment. The user's sending limit has been reached at this time. 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The PayPal Android SDK Sample App is released under the BSD License: 2 | 3 | Copyright (c) 2014-2016 PayPal Holdings, Inc. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | The views and conclusions contained in the software and documentation are those 27 | of the authors and should not be interpreted as representing official policies, 28 | either expressed or implied, of the FreeBSD Project. 29 | -------------------------------------------------------------------------------- /SampleApp-Kotlin/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | 19 |