我是Android开发中的新手,我试图将付费朋友与我的Android应用程序集成,我已经完成了但现在我想将其作为每月订阅,这意味着当用户注册第一个时时间可以自由报名,然后从下个月开始,他需要先支付薪水,然后才能到那里。这是我目前支付薪水的代码
public class Paypal extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Intent i = new Intent(this, PaypalExpressCheckout.class);
//this.startActivity(i);
invokeSimplePayment();
}
//===============================================================
private void invokeSimplePayment(){
try{
PayPalPayment newPayment = new PayPalPayment();
newPayment.setSubtotal(BigDecimal.valueOf(0.99));
newPayment.setCurrencyType("USD");
//.setCurrency("USD");
newPayment.setRecipient("waleed@balianti.com");
newPayment.setMerchantName("balianti");
PayPal pp = PayPal.getInstance();
if(pp==null)
pp = PayPal.initWithAppID(this, "APP-80W284485P519543T", PayPal.ENV_SANDBOX);
Intent paypalIntent = pp.checkout(newPayment, this);
this.startActivityForResult(paypalIntent, 1);
}catch(Exception e){e.printStackTrace();}
}
}
请告诉我我的所作所为。