Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_hasJavaListener: undefined #2

Open
yayo127 opened this issue Jul 7, 2016 · 4 comments
Open

_hasJavaListener: undefined #2

yayo127 opened this issue Jul 7, 2016 · 4 comments

Comments

@yayo127
Copy link

yayo127 commented Jul 7, 2016

Hi, When I compile and add the items send this error, if I do not add the items works:

var PayPal = require("de.appwerft.paypal");
var item1 = PayPal.createPaymentItem({
    name: "My item",
    price: 23,
    sku: "my-item",
    quantity: 1,
    currency: "USD" // Any ISO-4217
});
var configuration = PayPal.createConfiguration({
    merchantName: "John Doe",
    merchantPrivacyPolicyURL: "http://google.com",
    merchantUserAgreementURL: "http://google.com",
    locale: "en" // Any ISO 639-1
});
var payment = PayPal.createPayment({
    // Required
    configuration: configuration,
    currencyCode: "USD",
    amount: 23, // Has to match the amount of your items if you set them
    shortDescription: "Your shopping trip at FooBar",
    intent: PayPal.PAYMENT_INTENT_SALE, // or: PAYMENT_INTENT_AUTHORIZE, PAYMENT_INTENT_ORDER
    items: [item1],
    // Optional, you can also just specify the amount
    //shipping : 10.0,
    //tax : 123
});

payment.addEventListener("paymentDidCancel", function(e) {
    Ti.API.warn("paymentDidCancel");
});

payment.addEventListener("paymentDidComplete", function(e) {
    Ti.API.warn("paymentDidComplete");
});
payment.show(); 
[ERROR] :  KrollProxy: (KrollRuntimeThread) [2,392] Error creating proxy
[ERROR] :  KrollProxy: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.util.ArrayList
[ERROR] :  KrollProxy:  at de.appwerft.paypal.PaymentProxy.handleCreationDict(PaymentProxy.java:225)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.KrollProxy.handleCreationArgs(KrollProxy.java:227)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.KrollProxy.setupProxy(KrollProxy.java:135)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:143)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:319)
[ERROR] :  KrollProxy:  at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203)
[ERROR] :  KrollProxy:  at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR] :  KrollProxy:  at android.os.Looper.loop(Looper.java:137)
[ERROR] :  KrollProxy:  at 

> `org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)
@hansemannn
Copy link
Contributor

@AppWerft ?

@AppWerft
Copy link
Owner

I don't see the lines before. You should see: importing of items from basket.

@hansemannn
Copy link
Contributor

The issue also looks quite outdated, so you might want to try the latest version.

@AppWerft
Copy link
Owner

I think too, the conversion to array is in a totally other line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants