How can I ensure the security of my payment system via PayPal?
I use the vue-paypal-check create the frontend PayPal button for the payment.
the code is bellow:
<Pay-Pal
v-if="paypal_live_id && paypal_sandbox_id"
:amount="amount"
currency="USD"
:client="credentials"
:env="paypal_env"
@payment-authorized="payment_authorized_cb"
@payment-completed="payment_completed_cb"
@payment-cancelled="payment_cancelled_cb"
:items="pay_items"
>
</Pay-Pal>
some dota is bellow:
data(){
return {
paypal_env: this.$GLOBAL_CONST.PAYMENT.PAYPAL_ENV,
paypal_sandbox_id: undefined,
paypal_live_id: undefined,
}
},
computed: {
credentials() {
return {
sandbox: this.paypal_sandbox_id,
production: this.paypal_live_id,
}
},
},
the callback method of pay success:
payment_completed_cb(res){
some method to access API for payment success // there will request the API for change the order status or reduce the balance.
},
but I have a question, if someone of customer is evil with technology, he call the payment_completed_cb
directly, not pass the paypal payment.
How can I prevent this?
from How can I ensure the security of my payment system via PayPal?
No comments:
Post a Comment