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

Alipay.setAlipaySandbox(true) failed #58

Closed
DingChenyu opened this issue Jan 8, 2020 · 2 comments
Closed

Alipay.setAlipaySandbox(true) failed #58

DingChenyu opened this issue Jan 8, 2020 · 2 comments

Comments

@DingChenyu
Copy link

_reactNativeAlipay.default.setAlipaySandbox is not a function

@DingChenyu
Copy link
Author

已解决,需在node_modules>@0x5e>react-native-alipay>android>src>main>java>com>reactlibrary>AlipayModule.java file里:
step1:
import com.alipay.sdk.app.EnvUtils
step2:
@ReactMethod
public void setAlipaySandbox(Boolean isSandbox) {
if(isSandbox){
EnvUtils.setEnv(EnvUtils.EnvEnum.SANDBOX);
}else {
EnvUtils.setEnv(EnvUtils.EnvEnum.ONLINE);
}
}

@0x5e
Copy link
Owner

0x5e commented May 7, 2020

#40 已合入

@0x5e 0x5e closed this as completed May 7, 2020
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

2 participants