PhonePe / pg-sdk-react-native-sample

Sample App to demonstrate integration of PhonePe PG SDK React Native package.
MIT License
9 stars 5 forks source link

error : "Transaction Interrupted!" in Android #8

Closed aurangblackbuck closed 5 months ago

aurangblackbuck commented 9 months ago

Getting this error in Android:

{ "error": "Transaction Interrupted!", "status": "FAILURE" }

It is working fine in iOS.

I tried searching for the solution everywhere but there is no proper channel where we can raise the issue of React-native PhonePe SDK.

My Code:

fetch(${BASE_URL}api/phonepe/checksum, { method: 'POST', headers: { Accept: 'application.json', 'Content-Type': 'application/json', }, body: JSON.stringify(data), }) .then(response => response.json()) .then(res => { if (res.body) { const {base64RequestBody} = res.body; const dropDownValue = '/pg/v1/pay'; // packageName = 'com.phonepe.app'; PhonePePaymentSDK.startPGTransaction( base64RequestBody, res.checksum, dropDownValue, headers, null, Platform.OS == 'ios' ? '' : null, ) .then(a => { if (a.status === 'SUCCESS') { checkPaymentStatus(res.body); } else { Alert.alert(a.error); } }) .catch(e => { console.log('141 PHONEPE ERROR', e); }); } else { Alert.alert('Something went wrong BD606'); } }) .catch(error => { //handle error console.warn(error); });

This is urgent for me, quick help will be appreciated.

Thank you

aurangblackbuck commented 9 months ago

@AnshumanPhonePe Please, If you can look into this. if you have time.

kushalAppiness commented 9 months ago

Even i am getting the same issue , { error: "Transaction Interrupted!" , status: "FAILURE"} when made a request using production credentials

aurangblackbuck commented 9 months ago

@kushalAppiness I checked with the PhonePe team over mail. They sent this response:

I am sending the package signature to them over the mail. let's see if that helps.

You can also check with them over this email: PG Support merchant-pgsupport@phonepe.com

Hi,

Good day! Please confirm whether you have received app id. If not then we would like to request you to share Android signature once you added the release signing key to get app id from us.

Please refer to the below link and share Android signature asap.

React Native SDK: https://developer.phonepe.com/category/v1/hybrid-sdk-android-and-ios/react-native-sdk-integration/#:~:text=Example%3A%0A%20%20if(Platform.OS%20%3D%3D%3D%20%27android%27)%7B%0A%20%20%20%20%20PhonePePaymentSDK.getPackageSignatureForAndroid().then(packageSignture%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20ToastAndroid.show(packageSignture%2CToastAndroid.LONG)%0A%20%20%20%20%20%7D)%0A%20%20%7D

​ Please note the below points: For Production, share the package signature of the release build that will be published to the Playstore to generate the App ID. For Production, do not share the package signature from the Debug or Test Build which won't work.

Feel free to reach out to us in case of any queries.

Regards,

NitinVermaPpe commented 5 months ago

follow this doc: https://developer.phonepe.com/v1/docs/react-native-sdk-integration-standard if you still face any issue, reach out the integration team (you can find the contact email in readme)