Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Update SDK to 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjacunski committed May 1, 2014
1 parent 0fabcdf commit e3450d1
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 7 deletions.
11 changes: 11 additions & 0 deletions SampleApp/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
Binary file modified SampleApp/libs/PayPalAndroidSDK.jar
Binary file not shown.
Binary file modified SampleApp/libs/armeabi-v7a/libcardioRecognizer.so
Binary file not shown.
Binary file modified SampleApp/libs/armeabi-v7a/libcardioRecognizer_tegra2.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import com.paypal.android.sdk.payments.PayPalAuthorization;
import com.paypal.android.sdk.payments.PayPalConfiguration;
import com.paypal.android.sdk.payments.PayPalFuturePaymentActivity;
import com.paypal.android.sdk.payments.PayPalItem;
import com.paypal.android.sdk.payments.PayPalPayment;
import com.paypal.android.sdk.payments.PayPalPaymentDetails;
import com.paypal.android.sdk.payments.PayPalService;
import com.paypal.android.sdk.payments.PaymentActivity;
import com.paypal.android.sdk.payments.PaymentConfirmation;
Expand Down Expand Up @@ -64,19 +66,47 @@ protected void onCreate(Bundle savedInstanceState) {
}

public void onBuyPressed(View pressed) {
// PAYMENT_INTENT_SALE will cause the payment to complete immediately.
// Change PAYMENT_INTENT_SALE to PAYMENT_INTENT_AUTHORIZE to only authorize payment and
// capture funds later.
PayPalPayment thingToBuy =
new PayPalPayment(new BigDecimal("1.75"), "USD", "hipster jeans",
PayPalPayment.PAYMENT_INTENT_SALE);
/*
* PAYMENT_INTENT_SALE will cause the payment to complete immediately.
* Change PAYMENT_INTENT_SALE to PAYMENT_INTENT_AUTHORIZE to only authorize payment and
* capture funds later.
*
* Also, to include additional payment details and an item list, see getStuffToBuy() below.
*/
PayPalPayment thingToBuy = getThingToBuy(PayPalPayment.PAYMENT_INTENT_SALE);

Intent intent = new Intent(SampleActivity.this, PaymentActivity.class);

intent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingToBuy);

startActivityForResult(intent, REQUEST_CODE_PAYMENT);
}

private PayPalPayment getThingToBuy(String environment) {
return new PayPalPayment(new BigDecimal("1.75"), "USD", "hipster jeans",
environment);
}

/*
* This method shows use of optional payment details and item list.
*/
private PayPalPayment getStuffToBuy(String environment) {
PayPalItem[] items =
{
new PayPalItem("old jeans with holes", 2, new BigDecimal("87.50"), "USD",
"sku-12345678"),
new PayPalItem("free rainbow patch", 1, new BigDecimal("0.00"),
"USD", "sku-zero-price"),
new PayPalItem("long sleeve plaid shirt (no mustache included)", 6, new BigDecimal("37.99"),
"USD", "sku-33333")
};
BigDecimal subtotal = PayPalItem.getItemTotal(items);
BigDecimal shipping = new BigDecimal("7.21");
BigDecimal tax = new BigDecimal("4.67");
PayPalPaymentDetails paymentDetails = new PayPalPaymentDetails(shipping, subtotal, tax);
BigDecimal amount = subtotal.add(shipping).add(tax);
return new PayPalPayment(amount, "USD", "hipster jeans", environment);
}

public void onFuturePaymentPressed(View pressed) {
Intent intent = new Intent(SampleActivity.this, PayPalFuturePaymentActivity.class);
Expand Down
Binary file modified libs/PayPalAndroidSDK.jar
Binary file not shown.
Binary file modified libs/armeabi-v7a/libcardioRecognizer.so
Binary file not shown.
Binary file modified libs/armeabi-v7a/libcardioRecognizer_tegra2.so
Binary file not shown.
8 changes: 7 additions & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
PayPal Android SDK release notes
================================
2.2.0
-----
* Add support for multiple items per payment.
* Update PayPal logo.
* Update card.io library to 3.1.5.

2.1.0
----
-----
* Add integration with PayPal Wallet App (available only on the Samsung app store)
* In live environment, if the newly released PayPal Wallet app with authenticator is present on a user's device, the PayPal Wallet app will log the user in to the SDK.
* Fix issue where some email addresses would not be accepted.
Expand Down

0 comments on commit e3450d1

Please sign in to comment.