开发者

In AS3, how to set return variable for returning from paypal to merchant site?

I am trying to implement paypal payment in as3. But the return variable conflicts with an as3 keyword. So how to set return va开发者_开发百科riable for returning from paypal to merchant site.


Just because a property name conflicts with compiler keywords, does not make it impossible to use it:

 object["return"] = value;
 object["void"] = value;

Basically you can use any reserved keyword as property name. I think that should solve your problem.


This will be difficult to answer since you've not stated the type of API that you are using with Paypal but I'll just answer with the most used system atm.

The return variable may be defined as a string so you should be able to assign it's value to any variable name of your choice. For example, if you are getting a responce from the API as a url encoded string such as:

accepted=true&redirect=newpage.htm&class=test

This entire thing is simply a string, so you could split the string and/or manipulate it however you desire, when using AS3, you might be storing them as a VO, you can itterate the VO objects and reassign their variable names since the way that AS3 stores these is within a dynamic class.

If you need more help, you will need to explain your particular issue more thoroughly or post some of your code so I get get a better idea of what you are trying to do :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜